Proxy server
A server that makes requests on your behalf, so the destination sees the proxy's address instead of yours.
A proxy server is an intermediary that forwards your request to a destination and returns the response to you. Because the connection to the destination originates from the proxy, the destination records the proxy’s IP address rather than yours.
#How it works
Your client opens a connection to the proxy and tells it where you actually want to go. For plain HTTP the proxy reads the request and reissues it. For HTTPS the client asks the proxy to open a tunnel using HTTP CONNECT, and the encrypted traffic passes through untouched — the proxy sees the hostname and the byte count, not the contents.
#Why people use them
- Address substitution. The destination sees a different IP, which is the basis of geo-targeting and of distributing load across a pool.
- Access control. Corporate forward proxies enforce policy on outbound traffic.
- Caching. A proxy can serve a stored copy instead of re-fetching.
#Commonly confused with
A proxy is not a VPN. A VPN moves an entire device’s traffic at the operating-system level and usually encrypts it end to end; a proxy is normally configured per application and only affects that application. A proxy is also not a reverse proxy — that sits in front of a server, not in front of a client.
#Where the proxy sits in the request
Three parties exist in every proxied request, and each sees a different amount of it. Knowing which is which explains most of the surprises.
| Party | Sees your address | Sees the destination | Sees the content |
|---|---|---|---|
| Your network or ISP | Yes | The proxy only | No, if you use HTTPS |
| The proxy | Yes | Yes | Only for plain HTTP |
| The destination | No | Itself | Yes |
The row that matters is the middle one. A proxy always knows who you are and where you are going. Address substitution is not anonymity from the proxy operator, only from the destination.
#Checking that it works
Never assume the configuration applied. Ask a service to report the address it observed, then repeat the request with no proxy as a control:
curl -x http://gateway.example:8000 -s https://api.ipify.org
curl -s https://api.ipify.org
Two identical answers mean the proxy was not used, whatever the settings say. The curl guide covers the flags and the failure codes in full.