Wednesday, March 25, 2009

Comparison between SOCKS and HTTP proxies

SOCKS uses a handshake protocol to inform the proxy software about the connection that the client is trying to make and may be used for any form of TCP or UDP socket connection, whereas a HTTP proxy analyses the HTTP headers sent through it in order to deduce the address of the server and therefore may only be used for HTTP traffic. The following examples demonstrate the difference between the SOCKS and HTTP proxy protocols:

SOCKS

Jonie wishes to communicate with Sophine over the internet, but a firewall exists on his network between them and Jonie is not authorised to communicate through it himself. Therefore, he connects to the SOCKS proxy on his network and sends information about the connection he wishes to make to Sophine. The SOCKS proxy opens a connection through the firewall and facilitates the communication between Jonuie and Sophine.

Http Proxy

Jonie wishes to download a web page from Sophine, who runs a web server. Jonie cannot directly connect to Sophine server, as a firewall has been put in place on her network. In order to communicate with the server, Jonie connects to his network's HTTP proxy. His internet browser (ie firefox) communicates with the proxy in exactly the same way it would the target server it sends a standard HTTP request header. The HTTP proxy reads the request and looks for the Host header. It then connects to the server specified in the header and transmits any data the server replies with back to Jonie.

No comments: