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:
direction connection internet - can establish tcp/ip connection directly server @ other end.
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.
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
Post a Comment