How exactly does a proxy work?

The HTTP request is sent from Client to port 8080 of the Proxy Server. The Proxy Server then originates a new HTTP request to the destination site. The proxy, depending on the configuration, will often add a "X-Forwarded-For" header to the HTTP request. The log files on the destination web site will show the proxy's IP address, but may or may not be configured to log the "X-Forwarded-For" address.

That's the typical configuration, but proxy software will allow you all kinds of customization.

EDIT: I should note that when I originally read your question, I got the idea you were asking about an HTTP Proxy specifically, such as squid or nginx. There are many different types of proxies available. In Internet Explorer, you'll most likely be using an HTTP proxy, but there are many other types as well.


HTTP is a Layer 7 protocol so dont get confuse. when you use a HTTP proxy and you type say google.com , the HTTP header still same google.com, but the destination IP address will be IP address of the Proxy, source will be Hosts IP to the customized port number 8080.