---
title: "What is a forward proxy?"
url: https://proxy.wiki/glossary/forward-proxy/
type: Glossary Term
author: "proxy.wiki editorial"
published: 2026-08-19
updated: 2026-10-21
site: proxy.wiki
topics: ["Proxy fundamentals"]
license: CC BY 4.0; quote freely with attribution to https://proxy.wiki/
---

# What is a forward proxy?

> A proxy the client chooses and configures. It forwards your requests outward, so the destination connects with the proxy rather than with you.

The test is who picked it. RFC 9110 describes a proxy as an intermediary “chosen by the client”, and a gateway, its name for a [reverse proxy](/glossary/reverse-proxy/), as one that “acts as an origin server”. Same software, opposite allegiance. If the person sending the request configured the intermediary, it is a forward proxy. If the site’s operator did, it is a reverse proxy. When people say “a proxy” with no qualifier, they mean the forward kind.

That makes the interesting question a practical one: how does a client end up using a forward proxy at all? There are four routes, and most “the proxy is being ignored” problems come from assuming a client reads a route it does not.

## Four ways a client is pointed at one

| Route | Who reads it | Scope | Where it surprises people |
| --- | --- | --- | --- |
| Explicit setting in code or a flag, such as curl -x | That one client | One request, one session or one process | Rarely. This is the most predictable route. |
| Environment variables: http_proxy, https_proxy, no_proxy | Most command-line tools and language runtimes, each with its own rules | The process and every child it starts | Case sensitivity, and services that never inherit your shell |
| A PAC file or WPAD | Browsers and operating-system network stacks | Decided per URL by a JavaScript function | Command-line tools ignore it entirely |
| Interception by the network | Nobody on the client; a router redirects traffic | Everything crossing that network | No client setting shows it exists |

The last row is the [transparent proxy](/glossary/transparent-proxy/), which RFC 9110 calls an interception proxy and treats as a different thing precisely because the client did not choose it.

## The environment route, tested

Environment variables cause the most confusion, so we checked curl’s behaviour directly on 21 October 2026. A logging proxy on 127.0.0.1 counted what reached it while curl 8.7.1 fetched example.com under four environments, each started empty with `env -i` so nothing else leaked in:

```
env -i PATH=$PATH https_proxy=http://127.0.0.1:8899 curl -s -o /dev/null -w "%{http_code}\n" https://example.com/
env -i PATH=$PATH https_proxy=http://127.0.0.1:8899 no_proxy=example.com curl -s -o /dev/null -w "%{http_code}\n" https://example.com/
env -i PATH=$PATH HTTP_PROXY=http://127.0.0.1:8899 curl -s -o /dev/null -w "%{http_code}\n" http://example.com/
env -i PATH=$PATH http_proxy=http://127.0.0.1:8899 curl -s -o /dev/null -w "%{http_code}\n" http://example.com/
```

The first command reached the proxy as one CONNECT. The second went direct, because `no_proxy` matched the host. The third also went direct, which surprises people: curl ignores `HTTP_PROXY` in capitals. Its manual says `http_proxy` “is only available in lower case”, while every other variable works in either case. The fourth, lowercase, reached the proxy. All four requests returned 200, so nothing in curl’s output told us which ones were proxied. Only the proxy’s own log did.

Other clients draw these lines differently. Python and Go have their own case and `no_proxy` rules. Node’s built-in fetch ignores the variables unless Node starts with `NODE_USE_ENV_PROXY=1`, which Node’s documentation lists as added in v24.0.0 and v22.21.0. On Node 24.2.0 a fetch with `HTTPS_PROXY` set never reached our logging proxy until we added it. The guide [HTTP_PROXY, HTTPS_PROXY and NO_PROXY explained](/guides/proxy-environment-variables/) lays them out client by client. Package managers add a layer of their own, covered in [proxies for git, npm and pip](/guides/proxies-for-git-npm-pip/).

## The browser route: a PAC file

Browsers can take their forward proxy from a proxy auto-configuration file, a JavaScript function the browser calls for every URL. It returns a string naming what to try, in order:

```
function FindProxyForURL(url, host) {
  if (isPlainHostName(host) || dnsDomainIs(host, ".internal.example")) {
    return "DIRECT";
  }
  return "PROXY proxy.example.net:3128; DIRECT";
}
```

The trailing `DIRECT` is a fallback: if the proxy is unreachable, the browser connects without it. That is convenient on a laptop that leaves the office and a quiet leak on a machine that should never go out directly. MDN notes the file should be served as `application/x-ns-proxy-autoconfig`.

When one program honours a proxy and another on the same machine does not, list the routes above and ask which one each program reads. The answer is usually that they read different ones.

## What a forward proxy does not promise

Forward describes direction, not secrecy. On plain HTTP requests a forward proxy can add `X-Forwarded-For` or `Forwarded` headers that pass your address along. Inside a CONNECT tunnel it cannot add anything, but it always knows your address itself. Whether the destination learns who you are depends on the operator’s configuration, which is a separate question from which side the proxy works for. The broader picture of what a proxy sees is in [What is a proxy server?](/guides/what-is-a-proxy-server/).

## Frequently asked questions

### Is a forward proxy the same as an anonymous proxy?

No. Forward describes direction, not disclosure. On plain HTTP requests a forward proxy can add X-Forwarded-For or Forwarded headers that pass your address to the destination, which makes it forward without making it anonymous.

### Why does one program use the proxy and another ignore it?

Because they read different routes. Command-line tools read environment variables, browsers read a PAC file or the system settings, and some services read neither. curl also ignores HTTP_PROXY in capitals and reads only http_proxy.

### What is the difference between a forward proxy and a transparent proxy?

Who chose it. You configure a forward proxy. A transparent proxy, which RFC 9110 calls an interception proxy, is imposed by the network, and no client setting shows that it exists.

## Sources

1. [RFC 9110 section 3.7: Intermediaries](https://www.rfc-editor.org/rfc/rfc9110.html#section-3.7)
2. [curl manual: Environment (http_proxy is lower case only)](https://curl.se/docs/manpage.html)
3. [MDN: Proxy Auto-Configuration (PAC) file](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file)
4. [Node.js CLI documentation: NODE_USE_ENV_PROXY](https://nodejs.org/api/cli.html#node_use_env_proxy1)
