Say you've set up a proxy, opened an IP lookup site and seen a new address, so you figure the job is done. Usually nobody questions that until a site starts acting a bit strange.
The thing is, the IP is only part of what a server sees, because the request also carries headers that can tell it a proxy is in the middle and sometimes even pass along your original address.
The two that come up most are X-Forwarded-For and Via, which are worth knowing if you do data collection or testing from different regions.
Where these headers came from
X-Forwarded-For, usually shortened to XFF, goes back to the Squid caching proxy in the late 1990s. Each proxy adds the IP it got the request from, so after two hops you might see something like "203.0.113.7, 198.51.100.12".
Via is the more official one, because it's actually defined in the HTTP specification. Each intermediary adds a short entry with the protocol version and a host name, like "1.1 squid-cache" or "1.1 varnish".
None of this was built with privacy in mind, since the headers exist so load balancers and logs can trace a request back and catch forwarding loops, which is handy for an admin chasing a 502 error but not so handy if you thought your proxy was hiding things.
How a proxy ends up giving itself away
Usually nobody did anything wrong on purpose. A lot of proxy software has forwarding headers on by default, and a quick setup tends to leave them alone.
So you get a request where the connection shows the new IP while XFF lists the real one right below it. Before you rely on a setup for real work, it's a good idea to check your proxy server with IPRoyal and see which headers actually make it to the other side.
People usually sort proxies into rough tiers based on this. Transparent proxies pass XFF along with your real address, and anonymous proxies hide the address but still send Via or something like it, so the server knows a proxy is involved.
Elite proxies, sometimes called high-anonymity proxies, strip both headers out. That's usually the level you actually need for commercial scraping or testing work.
There are a few less famous headers to keep an eye on as well, like Forwarded (which is the standardized version of XFF), X-Real-IP, Client-IP and Proxy-Connection. And any one of them can pretty much cancel out the effort you put into rotating IPs.
What websites do with these headers
Servers read these headers all the time, honestly mostly for dull reasons. The X-Forwarded-For entry on Wikipedia makes a good point, which is that the header is very easy to fake and should only be trusted when it comes from a proxy you know and control.
CDNs are pretty open about this. Cloudflare adds its own headers to traffic it proxies, and its documentation on HTTP request headers suggests using CF-Connecting-IP over X-Forwarded-For because it only holds a single address. Web servers like Nginx (with the realip module) and Apache (with mod_remoteip) can do something similar.
The same data also feeds fraud scoring and geo-targeting. A Via header from a datacenter proxy looks a lot different to a risk system than a normal home connection, and the site doesn't even have to block you, since it can just show you a different price or a cut-down page.
Testing and cleaning up your headers
The first step is seeing what actually leaves your network. Send a request through the proxy to a header echo service, then one directly and compare them. If XFF, Via or Forwarded show up, the proxy is set up to be transparent.
On self-hosted setups the changes are small, and it's worth testing again after each one. In Squid you can set "forwarded_for delete" and "via off" to remove both headers, and in HAProxy you basically just leave out the "option forwardfor" line for outbound traffic.
The MDN reference for the Via header is useful here because it shows the exact format intermediaries use, which makes stray entries a lot easier to spot in your logs.
Wrapping up
Header checks get skipped a lot because the IP address looks right in a quick test. Servers look at the whole request though, and they're getting better at reading it, especially now that the standard Forwarded header is showing up in more CDNs and reverse proxies.
If you check your headers now, you'll probably spend less time later wondering why some requests get odd responses. A header test only takes a few minutes, so it's worth adding to whatever checklist you use when you roll out a new proxy.

