Protecting your privacy from Google with Squid and FoxyProxy
What is an anonymous proxy?
A proxy is basically a server software that intercepts all your traffic before it reaches its destination. Proxies usually do something with your traffic. They can filter it, modify it, block it, cache it, etc. Depending on the Internet Protocol they serve (HTTP, SMTP, etc.) and the protocol used to access them (SOCKS5, HTTP, etc.), there are different types of proxies,. Your web browser comes with all you need to access proxy servers. If you use a proxy server, the IP address of your proxy is the one that is going to show up on the referrer’s logs of sites you visit. That is unless their scripts read the HTTP server variable: HTTP_X_FORWARDED_FOR. This variable contains the list of proxies you used to get to the current server. Typical proxies pass this information along.
An anonymous proxy server is a proxy server that does not pass HTTP_X_FORWARDED_FOR, and removes all identifiable information from the user, — including requests. JavaScript makes it really difficult to be completely anonymous, so it is often a good idea to turn it off is you don’t need it. Squid is an open source proxy server. You can find the installation instructions here. To make it an anonymous proxy, add the following lines to your squid.conf file, and restart the server:
forwarded_for off
anonymize_headers allow Allow Authorization Cache-Control
anonymize_headers allow Content-Encoding Content-Length
anonymize_headers allow Content-Type Date Expires Host anonymize_headers allow If-Modified-Since Last-Modified anonymize_headers allow Location Pragma Accept Charset anonymize_headers allow Accept-Encoding Accept-Language anonymize_headers allow Content-Language Mime-Version anonymize_headers allow Retry-After Title Connection anonymize_headers allow Proxy-Connection
fake_user_agent Mosaic/0.1 (CP/M; 8-bit)
Now that you have done the hardest part and you have an anonymous proxy server, you need to setup your client to take advantage of this. Since, I use Firefox as my browser, I will use this to illustrate my point.
Why use a FoxyProxy extension, if I can simply setup my own anonymous proxy?
You might only want to enable the proxy while you are using Google and other search engines, and not when you are browsing elsewhere. FoxyProxy is very handy for this. Do the following to use it:
Install FoxyProxy
Add your anonymous proxy via the Add New Proxy button. (Squid port is usually 3128)
On the patterns tab for your proxy, define one wildcard pattern for each search engine. ie.: *.google.com
Now you can surf the web with absolutely certainty that Google, and other search engines will not be able to link your searches to you. For maximum protection, do not login to any Google service while the proxy is on. You might also want to install a few more anonymizing proxies and add them to your FoxyProxy configuration.