java - Difference between SOCKS, DIRECT and HTTP in Sockets programming -


could please advise difference between socks, direct , http type connections in context of sockets programming?

specifically referring android socket classes proxy type enum imagine question applies other languages.

when write application using socket communicate internet @ large, wish use http, might in 1 of 3 different situations:

  1. direction connection internet - can establish tcp/ip connection directly server @ other end.

  2. connection via socks proxy - cannot establish direct connection server @ end end. instead need contact local lan security gateway computer using socks protocol , ask open connection server @ end, open socket socks proxy server , have patch through server forwarding traffic between , target server, assuming local security policy allow that.

  3. connection via http proxy - either cannot establish direct connect internet or useful use proxy performance (caching) reasons. once again, instead of opening connection server @ other end open connection http proxy server close (which may or may on lan) via http protocol , ask conduct on behalf http transaction end device.

these 3 situation described enum values.

in reality, 4th situation exists - of transparent proxy, name implies code not aware of it, hence not represented enum value. in situation act according scenario 1 (direction connection) in reality in scenario 3 (http proxy). redirection target server http proxy happens transparently networking gear on lan (usually router, sometime switch).


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -