Last modified: April 27, 2026

This article is written in: 🇺🇸

Forward Proxies

A forward proxy sits between clients and the wider internet. Instead of connecting directly to an external service, the client sends the request to the proxy, and the proxy makes the outbound connection on the client’s behalf. This pattern is commonly used for egress control, caching, auditing, and sometimes privacy. It differs from a reverse proxy, which stands in front of servers rather than clients.

A Layer of Indirection

# Forward Proxy Setup

   +-----------+        +---------+         +------------+
   |   Client  | -----> |  Proxy  |  -----> |  Server(s) |
   +-----------+        +---------+         +------------+
          ^                   |                   ^
          |                 (Network)             |
          +---------------------------------------+
  1. Client
  2. Initiates the request (e.g., a user’s web browser, a mobile app, or an API consumer).
  3. Sees the proxy as the destination server in many configurations.

  4. Forward Proxy

  5. Receives outbound requests from the client, applies policy checks, and opens the connection to the external server.
  6. Returns the server’s response to the client as if it were the origin itself.

  7. Destination Server

  8. Hosts the actual resources or services the client is trying to access.
  9. May see all traffic as originating from the proxy rather than from the real client IP.

How a Forward Proxy Works

  1. Client chooses the proxy: Browsers, operating systems, CLI tools, or environment variables such as HTTP_PROXY can direct traffic through a proxy.
  2. Proxy validates the request: It can require authentication, check allow/deny rules, or log the destination.
  3. Proxy connects outward: For plain HTTP, the proxy sends the upstream request itself. For HTTPS, it usually creates a tunnel with the CONNECT method so TLS is negotiated end-to-end between client and destination.
  4. Response flows back through the proxy: The proxy may cache the response, add metadata such as Via, or apply content filtering.

Common Use Cases

Forward Proxy Variants

Open Proxies

# Simple Open Proxy

 Client  ->  Public/Open Proxy  ->  Destination Server

Anonymous Proxies

Transparent Proxies

Forward Proxy Architecture

A forward proxy is typically set up on the client side of a connection. It receives outbound requests from clients and relays them to the internet. This can provide privacy (the server sees only the proxy’s IP), caching, or traffic filtering.

ASCII DIAGRAM: Forward Proxy Setup

    Clients           Forward Proxy            Internet
--------------------------------------------------------
|      |            |            |             |      |
|  C1  |---Request--|            |---Request-->|  W1  |
|      |<--Response-|    FP      |<--Response--|      |
|------|            |            |             |------|
|  C2  |---Request--|            |---Request-->|  W2  |
|      |<--Response-|            |<--Response--|      |
|------|            |            |             |------|
|  C3  |---Request--|            |---Request-->|  W3  |
|      |<--Response-|            |<--Response--|      |
--------------------------------------------------------

Easy Way to Remember: Forward vs. Reverse

  1. Forward Proxy
  2. Acts on behalf of the client.
  3. Clients connect to resources through it.
  4. Provides client anonymity, caching, or content filtering.

Analogy: A personal assistant (forward proxy) obtains data from the outside world, so external services see the assistant rather than the real person making the request.

  1. Reverse Proxy
  2. Acts on behalf of the server.
  3. Internet clients see the proxy as the “server.”
  4. Balances load, hides internal infrastructure, adds security layers.

Analogy: A receptionist or front desk (reverse proxy) routes incoming callers or visitors to the correct department, ensuring they never directly see or contact internal offices without going through the receptionist.

HTTPS Tunneling with CONNECT

Forward proxies handle HTTPS differently from plain HTTP because the client and destination usually need an end-to-end TLS session.

Client -- CONNECT example.com:443 --> Forward Proxy -- TCP tunnel --> example.com:443

Additional Advantages

ASCII DIAGRAM: Forward Proxy / Cache

+-----------+      +---------------+      +---------------+
|  Clients  | ---> | Forward Proxy | ---> |   Internet    |
+-----------+      |    + Cache    |      +---------------+
                   +---------------+

Example: Minimal Explicit Proxy Workflow

Many command-line tools can be pointed at a forward proxy explicitly:

curl -x http://proxy.internal:3128 https://example.com/api/health

In practice, teams often combine this with:

Operational Considerations