An HTTP proxy is a server that connects one person to a website while handling requests on their behalf. The HTTP server receives the requests made and sends them back to the user. The proxy receives the request and sends it to the website that it was meant for. But the proxy’s IP address is generally visible to the destination.
What sets an HTTP proxy apart from other proxy types is where it operates in the network stack. The HTTP proxy works at the application layer and can examine request data, modify or filter it based on its configurations.
RFC 2616 describes the original HTTP specifications and states how the HTTP proxy works, while RFC 9110 is a more recent document that covers current HTTP specifications, including proxy connections, headers, and the CONNECT method.
How an HTTP Proxy Works
The client sends a full HTTP request to the proxy, including the method, the target URL, and all headers. The proxy reads and parses the request, applies any configured rules such as authentication checks, filtering, or cache lookups, then forwards the request to the destination server using its own connection.
Before forwarding, the proxy typically adds headers such as Via and X-Forwarded-For to identify itself and record the original client IP. The destination server responds to the proxy, which may cache the response before sending it back to the client.
The entire exchange happens at the HTTP level, so the proxy has full visibility into unencrypted request and response data. For encrypted HTTPS traffic, the proxy uses the CONNECT method, described below, and that visibility no longer applies.
HTTP Proxy and HTTPS Traffic
An HTTP proxy can review and change information sent through encrypted connections. However, HTTPS protects the information between the user and the website, preventing a standard tunneling proxy from reading its contents.
HTTP proxies use the CONNECT method to handle HTTPS connections, as explained in RFC 9110. The client tells the proxy which server and port it wants to reach. If the request is accepted, the proxy opens the connection and sends a confirmation. Once connected, it passes encrypted information between the device and website without reading the protected data.
An HTTPS proxy tunnel reveals the destination host and port, while keeping request URLs, headers, cookies, and response content encrypted.
Proxy Headers
HTTP proxies commonly add headers to requests before forwarding them. These are defined in RFC 9110 and RFC 7239.
Via identifies which proxies handled the request, as specified in RFC 9110, Section 7.6.3. It records the protocol version and a pseudonym for each proxy in the chain.
X-Forwarded-For carries the original client IP address. If multiple proxies are involved, the header forms a chain. This is a widely used de facto convention rather than a formally standardized header.
Forwarded is the standardized alternative, defined in RFC 7239. It consolidates the original IP, proxy identity, and protocol into a single header field.
Whether these headers are included depends on the proxy configuration. A proxy set up to preserve client anonymity would typically suppress them.
Forward Proxy vs. Reverse Proxy
HTTP proxies are deployed in two distinct configurations.
A forward proxy sits on the client side. The client is configured to route its outbound requests through the proxy, which represents the client to the wider internet. This is the configuration most commonly referred to when the term “HTTP proxy” is used in networking and privacy contexts.
A reverse proxy sits on the server side. Clients connect to it, and it routes requests to one or more backend servers. The client is typically unaware that a reverse proxy is involved. Reverse proxies are used for load balancing, SSL termination, caching, and access control.
Common Uses
Geographical restrictions: These proxies let users connect through IP addresses from different countries to view content that is not available in their region.
Filtering network and monitoring: HTTP proxies let companies control and monitor their web traffic. These proxies can block certain websites or domains that go through the network.
Caching: These proxies can save copies of websites for future use when there are repeated requests for the same content. It helps reduce repeated requests to the original server, saving bandwidth and improving response times.
Web scraping: HTTP proxies can be set up to connect requests through various browsers via multiple IP addresses. Most HTTP client software and scraping frameworks let you use the proxy through environment variables or different settings.
Access control: Proxies can check user credentials to verify users and restrict connections to authorized individuals.
Managing multiple accounts: These proxies can also route separate browser activities through different IP addresses. This enables separate accounts when operating on the same platform.
Limitations of an HTTP Proxy
Protocol scope: An HTTP proxy handles HTTP and HTTPS tunneling via the CONNECT method. It cannot natively proxy other protocols such as FTP, SSH, or SMTP.
Header exposure: Unless configured otherwise, HTTP proxies may add headers that reveal the client’s original IP address to the destination server.
No encryption: An HTTP proxy does not encrypt traffic. For unencrypted HTTP connections, the proxy has full access to the request and response content.
Detection risk: The presence of proxy-specific headers such as Via and X-Forwarded-For can signal to the destination server that traffic is being routed through a proxy.