Skip to main content

Remove proxy headers in Squid

 

Squid proxy

Very often we use the proxy servers to increase our privacy. By using a proxy, we can hide our own IP and present the proxy IP to other computers. However, the proxy servers often add HTTP headers informing about proxy usage, that can reveal your IP. In this article I will show how to remove proxy headers in Squid, a popular proxy server.

How to remove proxy headers in Squid

Open your Squid configuration file. If you are using Ubuntu or other Linux-based operating system, most likely this file is placed in /etc/squid/squid.conf .

In the configuration file add the following code:




via off
forwarded_for off

request_header_access From deny all
request_header_access Server deny all
request_header_access WWW-Authenticate deny all
request_header_access Link deny all
request_header_access Cache-Control deny all
request_header_access Proxy-Connection deny all
request_header_access X-Cache deny all
request_header_access X-Cache-Lookup deny all
request_header_access Via deny all
request_header_access X-Forwarded-For deny all
request_header_access Pragma deny all
request_header_access Keep-Alive deny all

The code above will remove proxy headers in Squid that could reveal usage of a proxy server.

If you are using Squid in earlier version than 3, you may use header_access instead of request_header_access