What Is a Transparent Proxy?
A transparent proxy is a proxy that passes your real IP address on to the website, usually in an X-Forwarded-For, Forwarded or Via header, and often intercepts your traffic inside a network with no setting on your device; companies, schools, internet providers and public Wi-Fi use them to filter, cache and log. To check whether a proxy passes your IP on, compare 3 results: your own IP (curl https://api.ipify.org), the IP seen through the proxy, and the headers a plain-HTTP page receives through it (http://httpbin.org/headers?show_env=1). If your own IP turns up in a header, the proxy is transparent. ProxyField's gateway adds no Via, X-Forwarded-For or Forwarded header, with 412M+ residential IPs in 195+ countries from $1.95/GB; start with the Easy Trial: 1 GB for $2.95.
- residential IPs
- 412M+
- from, traffic never expires
- $1.95/GB
- Easy Trial
- 1 GB for $2.95
On this page 10 sections
- What is a transparent proxy? Two meanings
- How to check whether a proxy passes your real IP on
- How a transparent proxy works
- What transparent proxies are used for
- Can a transparent proxy see HTTPS traffic?
- How to detect a transparent proxy on your network
- Transparent vs explicit proxies
- Drawbacks of transparent proxies
- How to set up a transparent proxy
- What Is a Transparent Proxy? FAQ
What is a transparent proxy? Two meanings
The term is used in two senses, and both are common:
-
An intercepting proxy
The network sends your traffic through the proxy without your browser knowing; you configured nothing, so the proxy is "transparent" to you. The IETF's caching taxonomy calls this an interception proxy, "a.k.a. 'transparent proxy', 'transparent cache'", fed by traffic redirection, which is used "to deploy (caching) proxies without the need to manually reconfigure individual user agents, or to force the use of a proxy where such use would not otherwise occur" (RFC 3040, section 2.5, 2001).
The two usually go together: an intercepting proxy in a school or office is not there to hide anyone, so it forwards the client's address. RFC 3040 also notes an older, stricter meaning from the HTTP specification (its section 2.1), a proxy that does not modify requests or responses, and recommends the term "interception proxy" to avoid the confusion. This page uses "transparent proxy" in the everyday sense: intercepting, and not hiding your IP.
How to check whether a proxy passes your real IP on
Three requests answer it. Put your proxy's host, port and login in place of the placeholders; for ProxyField, the host and port are gate.proxyfield.io:7000.
# 1. Your real public IP, with no proxy
curl -s https://api.ipify.org
# 2. The IP a website sees through the proxy
curl -s -x http://HOST:PORT -U "<login>:<password>" https://api.ipify.org
# 3. The headers a website receives through the proxy, over plain HTTP
curl -s -x http://HOST:PORT -U "<login>:<password>" "http://httpbin.org/headers?show_env=1"Look for the IP from step 1 in the output of step 3. Through a transparent proxy, the answer looks like this (illustrative addresses: 203.0.113.25 is you, 198.51.100.7 the proxy):
{
"headers": {
"Host": "httpbin.org",
"User-Agent": "curl/8.5.0",
"Via": "1.1 proxy.example.net (squid)",
"X-Forwarded-For": "203.0.113.25, 198.51.100.7",
"X-Forwarded-Proto": "http"
}
}httpbin's own front end adds entries too, such as X-Forwarded-Proto and the connecting proxy's IP at the end of X-Forwarded-For; what matters is whether your step-1 IP appears anywhere.
| What you see | Level | What the website learns |
|---|---|---|
| Step 2 shows your step-1 IP | no proxy in use | your IP; check the proxy settings |
Step 2 shows another IP, and a header in step 3 carries your step-1 IP: X-Forwarded-For, Forwarded: for=…, X-Real-IP, True-Client-IP or Client-IP | transparent | your IP, and that a proxy is in use |
Step 2 shows another IP; step 3 has Via, or a forwarding header without your IP | anonymous | that a proxy is in use, not your IP |
| Step 2 shows another IP; step 3 has none of these headers | elite (high anonymity) | only the proxy's IP |
Forwarded is the standard form of the same information (RFC 7239, 2014): a transparent proxy writes it as Forwarded: for=203.0.113.25;proto=http. MDN shows the de-facto form as X-Forwarded-For: <client>, <proxy1>, <proxy2>, the original client first (MDN: X-Forwarded-For).
Why ?show_env=1. httpbin's source code removes X-Forwarded-For, X-Real-Ip, Via and a few other headers from the /headers answer unless the URL carries show_env (httpbin helpers.py, ENV_HEADERS). Plain /headers therefore shows no forwarding header even through a transparent proxy.
Why plain HTTP. Over HTTPS, an explicit proxy only opens a CONNECT tunnel to the site; it cannot read or add headers inside the encryption, so https://httpbin.org/headers shows only what your own client sent (MDN: Proxy servers and tunneling). Only a proxy that decrypts TLS with a certificate your device trusts can add headers to HTTPS requests (see below).
What the test shows on ProxyField. The gateway adds no Via, X-Forwarded-For or Forwarded header, and HTTPS goes through a CONNECT tunnel that is not decrypted. The headers your client sends pass through, so a forwarding header that your own app or a browser extension sets still reaches the site; your Proxy-Authorization header is removed before the request goes to the site.
An absent header is not proof of privacy. A clean step 3 shows only that the proxy adds nothing. A site can still learn your IP from DNS lookups made outside the proxy, WebRTC in a browser or IPv6 traffic that skips the proxy, and link your visits through cookies and the browser fingerprint: see does a proxy hide your IP. Send no cookies or tokens to a public echo service; for a definitive test, log the connecting address and every header on a server you control (a short echo script is in the elite proxy guide).
How a transparent proxy works
- The network redirects your traffic. A router, firewall or gateway sends outgoing web traffic, typically TCP port 80, to the proxy instead of the internet. Common methods are NAT redirection on the proxy machine, policy routing from a gateway, and Cisco's WCCP.
- The proxy reads where you wanted to go. For plain HTTP, the
Hostheader names the site; the proxy connects to it on your behalf. - It applies the network's rules: blocks a category, serves a cached copy, requires a login, or logs the visit.
- It forwards the request, usually adding
ViaandX-Forwarded-Forheaders. - The answer comes back through the proxy to your device, which never knew a proxy was there.
A plain-HTTP request leaving a school's transparent proxy can look like this:
GET http://example.com/ HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Via: 1.1 gateway.school.example (squid)
X-Forwarded-For: 10.20.30.40The website connects with the proxy's public IP, and X-Forwarded-For adds the address of the client behind it, here a private address inside the school network. That is the open-source Squid proxy's default behavior: forwarded_for on appends the client's IP, and via on adds the Via header (Squid: forwarded_for; Squid: via). MDN notes that X-Forwarded-For "exposes privacy-sensitive information by design, such as the IP address of the client" (MDN: X-Forwarded-For).
What transparent proxies are used for
- Content filtering in companies, schools and libraries: blocking site categories and known malware domains for every device on the network, including guests' devices nobody configured.
- Caching at internet providers and in large networks, to save upstream bandwidth on popular files.
- Captive portals: the hotel or airport Wi-Fi page that appears before you can browse is served by intercepting your first request.
- Monitoring and logging of web use under a company's policy.
- Parental controls on home routers and family DNS or filtering services.
What they have in common: the network owner wants every device covered without touching each one. Running one is a network administrator's job; for the other uses of proxies, see what proxies are used for.
Can a transparent proxy see HTTPS traffic?
Not the content, unless it decrypts it. An HTTPS connection is encrypted between your browser and the site, so an intercepting proxy sees only the destination's host name and port and the volume of data. It can block or allow by host name, but it can't read pages, add headers or cache them.
To read HTTPS, the proxy has to do TLS interception: it presents its own certificate for each site, which the devices accept only if the network's root certificate is installed on them, as on managed company laptops. Squid's documentation describes its ssl-bump mode as decrypting "HTTPS messages as they pass through Squid", "becoming the man-in-the-middle" (Squid: http_port). If you see an unfamiliar issuer on a site's certificate, such as your company's name instead of a public certificate authority, your HTTPS traffic is being inspected. More on this in what an SSL proxy is.
How to detect a transparent proxy on your network
The check above tests a proxy you set yourself. To find one the network put in your path without telling you:
Compare HTTP and HTTPS. Most intercepting proxies handle only plain HTTP. Open the same IP-check service over both and compare. With httpbin, for example:
curl -s http://httpbin.org/ip curl -s https://httpbin.org/iphttpbin's
/ipanswers with theX-Forwarded-Forvalue when the request carries one, and with the connecting address otherwise (httpbin helpers.py). If the HTTP answer shows two addresses, or a different IP than the HTTPS answer, something on the path is proxying your HTTP traffic.Look at the headers the site receives. Request a plain-HTTP page that echoes all headers, on a server you control (a short echo script is in the elite proxy guide).
Via,X-Forwarded-FororForwardedthat your browser didn't send mean a proxy added them. Public echo services may hide them: httpbin's/headersshows them only with?show_env=1.Check certificate issuers on a few HTTPS sites in your browser. A network-issued certificate means TLS interception.
Watch for odd behavior: a block page with your network's logo, a login prompt from the network, or stale cached pages.
If your own settings show no proxy but these checks find one, it is transparent. To see what your device is set to, see how to find your proxy server.
Transparent vs explicit proxies
| Feature | Transparent (intercepting) proxy | Explicit proxy |
|---|---|---|
| Setup on the device | None; the network redirects traffic | You enter host and port, or a PAC file sets it |
| Does the app know about the proxy? | No | Yes; browsers use CONNECT for HTTPS |
| HTTPS | Sees host names only, unless it decrypts with an installed certificate | Tunnels HTTPS with CONNECT; sees host names only |
| Authentication | Awkward; the client doesn't know it should log in | Standard proxy authentication (407) |
| Your IP to the website | Usually passed on in X-Forwarded-For | Depends on the proxy; test it with the 3 commands above (ProxyField's gateway adds no forwarding header) |
| Who runs it | The network owner | You choose it, or your employer configures it |
| Typical example | School, hotel or ISP network | Company proxy set by policy; a rented proxy such as ProxyField's gateway |
A non-transparent proxy is simply the other column: one the client is configured to use. In the stricter RFC sense, it also means a proxy that changes requests or responses, for example by compressing images or removing headers.
Drawbacks of transparent proxies
- No help with HTTPS unless every device trusts the network's certificate, which in turn breaks apps that pin their certificates.
- Login problems. Because the browser thinks it talks to the site, proxy authentication doesn't work the usual way; connection-based schemes such as NTLM are known to fail behind interception (Wikipedia: Proxy server).
- Privacy. Users may not know their traffic is filtered and logged, and their IP is passed on to websites.
- A single point of failure for the whole network's web access.
- Security bugs of their own: in February 2009, the CERT Coordination Center warned that intercepting proxies which decide where to connect from HTTP header values "may be used by an attacker to relay connections" (CERT VU#435052).
How to set up a transparent proxy
On a Linux machine that runs Squid and receives the network's web traffic, interception takes one Squid line and a few firewall rules. Squid's wiki gives this example (Squid wiki: Linux traffic interception using REDIRECT):
# squid.conf: a normal port plus a port for intercepted traffic
http_port 3128
http_port 3129 intercept# on the Squid machine (replace with its IP): don't loop Squid's own traffic,
# send other port-80 traffic to the intercept port, block direct access to it
SQUIDIP=192.168.0.2
SQUIDPORT=3129
iptables -t nat -A PREROUTING -s $SQUIDIP -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port $SQUIDPORT
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t mangle -A PREROUTING -p tcp --dport $SQUIDPORT -j DROPSquid's http_port reference adds that the intercept mode disables authentication on that port. To intercept from a separate gateway, Squid's wiki recommends policy routing to the Squid box instead of NAT on the gateway. Run interception only on a network you manage, and tell its users that their traffic is filtered.
If what you need is the opposite, other IPs for your own apps, you don't need a transparent proxy: an explicit proxy service is set in the app. ProxyField's gateway is gate.proxyfield.io:7000, over HTTP, HTTPS or SOCKS5.
Need explicit proxies with IPs by country or city? ProxyField residential proxies: 412M+ IPs in 195+ countries, per-request rotation or sticky sessions up to 36 h. Start with the Easy Trial: 1 GB for $2.95, no subscription.
What Is a Transparent Proxy? FAQ
What is a transparent proxy server?
ProxyField runs an explicit proxy gateway, gate.proxyfield.io:7000, with residential proxies from $1.95/GB, and a transparent proxy server is its opposite: it sits in the network path and intercepts web traffic without any setting on your device, and it usually passes your IP on to websites in an X-Forwarded-For header. It is the lowest of the 3 anonymity levels, below anonymous and elite proxies.
How can I tell if a proxy is transparent?
Compare your own IP from https://api.ipify.org with the headers a plain-HTTP page receives through the proxy, such as http://httpbin.org/headers?show_env=1. If your IP appears in X-Forwarded-For, Forwarded, X-Real-IP or a similar header, the proxy is transparent; if only Via or a header without your IP appears, it is anonymous; if none appears, it is elite.
Why doesn't httpbin.org/headers show X-Forwarded-For?
Because httpbin hides X-Forwarded-For, X-Real-Ip, Via and a few other headers from its /headers answer unless the URL carries the show_env parameter. Request http://httpbin.org/headers?show_env=1 through the proxy over plain HTTP to see them; over HTTPS, a proxy that does not decrypt traffic cannot add them anyway.
Does a transparent proxy hide my IP address?
No. The website connects with the proxy's IP, but a transparent proxy usually adds your address in X-Forwarded-For or Forwarded, so the site can read it. Behind a company or school proxy, that is often your private address inside the network.
What are transparent proxies used for?
Filtering and logging web use in companies, schools and libraries, caching popular content at internet providers, serving the login page of hotel and airport Wi-Fi, and parental controls on home routers. In each case the network owner wants every device covered without configuring each one.
How does a transparent proxy work?
A router or firewall redirects outgoing web traffic, usually port 80, to the proxy. The proxy reads the Host header to see which site you wanted, applies the network's rules, fetches the page from its own IP, usually adding Via and X-Forwarded-For, and returns the answer as if it came straight from the site.
How do you detect a transparent proxy?
Compare an IP-check page over HTTP and over HTTPS: if the HTTP answer shows a different IP or an extra address, something proxies your HTTP traffic. Also look for Via or X-Forwarded-For headers that your browser didn't send, and check whether HTTPS certificates are issued by your network instead of a public authority.
Can a transparent proxy see HTTPS traffic?
Only the host name and the amount of data, unless it decrypts the traffic. Decryption needs the network's own root certificate installed on your device, as on managed work laptops; then the proxy can read and filter HTTPS pages, and the sites' certificates show the network as issuer.
What is the difference between transparent and explicit proxies?
An explicit proxy is set in the browser, the system or a PAC file, so the app knows it talks to a proxy and uses CONNECT for HTTPS. A transparent proxy is invisible to the app: the network redirects the traffic, which makes it easy to deploy but awkward for authentication and HTTPS.
What is a non-transparent proxy?
In everyday use, an explicit proxy: one the client is configured to use. In the stricter sense of the HTTP standards, it is a proxy that changes requests or responses to add a service, such as compressing images, translating formats or removing identifying headers.
Show 5 more questionsShow fewer questions
Is a transparent proxy the same as an intercepting proxy?
Mostly, yes. RFC 3040 introduced "interception proxy" as the precise name for what is commonly called a transparent proxy, and "inline proxy" is used for the same setup. The difference matters only for the older HTTP meaning of transparent: a proxy that doesn't modify messages.
What are the drawbacks of using a transparent proxy?
It can't filter or cache HTTPS content unless every device trusts the network's certificate, it makes proxy logins awkward because the browser doesn't know a proxy is there, and it becomes a single point of failure for the network's web access. Users may also not know their traffic is logged and their IP passed on.
What is a Squid transparent proxy?
Squid, the open-source caching proxy, run in interception mode: its http_port line carries the intercept flag, and firewall rules send the network's port-80 traffic to that port. By default Squid then adds a Via header and the client's IP in X-Forwarded-For.
Does HTTPS stop a transparent proxy from sending my IP?
Yes, for HTTPS sites, unless the proxy decrypts the traffic. A proxy can only add X-Forwarded-For to a request it can read, so on an encrypted connection the site sees just the connecting IP, which behind a transparent proxy is the proxy's or the network's.
How do I set up a transparent proxy?
On a Linux box running Squid, add an http_port line with the intercept flag and an iptables rule that redirects port-80 traffic to it, as in Squid's REDIRECT example; from a separate gateway, use policy routing to the Squid box. Do it only on a network you manage, and tell its users that their traffic is filtered.
Related pages
Easy Trial: 1 GB for $2.95.
Try for the price of 1 GB, no subscription, traffic never expires.