Home > network > set up a proxy server for yourself

set up a proxy server for yourself

Problem
You want to have a US proxy for yourself. For instance, you want to listen to Pandora Radio, but its home page tells you “sorry peasant, you don’t live on the holy US soil“.

Solution
Here I explain one possible way. Create a droplet at Digital Ocean (it costs $5 a month). When you create the droplet, select a US location.

Create the droplet, configure the SSH access.

Then, install squid, which is a full featured web proxy cache server.

To start using your proxy, install the FoxyProxy Firefox add-on and configure it.

Now, if you visit http://www.whatismyip.com/, you will notice that behind the proxy your real IP is still visible! You are not anonymous (yet).

To hide behind your proxy, we need some more configurations. Edit “/etc/squid3/squid.conf” and add these lines:

via off
forwarded_for off

request_header_access Allow allow all 
request_header_access Authorization allow all 
request_header_access WWW-Authenticate allow all 
request_header_access Proxy-Authorization allow all 
request_header_access Proxy-Authenticate allow all 
request_header_access Cache-Control allow all 
request_header_access Content-Encoding allow all 
request_header_access Content-Length allow all 
request_header_access Content-Type allow all 
request_header_access Date allow all 
request_header_access Expires allow all 
request_header_access Host allow all 
request_header_access If-Modified-Since allow all 
request_header_access Last-Modified allow all 
request_header_access Location allow all 
request_header_access Pragma allow all 
request_header_access Accept allow all 
request_header_access Accept-Charset allow all 
request_header_access Accept-Encoding allow all 
request_header_access Accept-Language allow all 
request_header_access Content-Language allow all 
request_header_access Mime-Version allow all 
request_header_access Retry-After allow all 
request_header_access Title allow all 
request_header_access Connection allow all 
request_header_access Proxy-Connection allow all 
request_header_access User-Agent allow all 
request_header_access Cookie allow all 
request_header_access All deny all

Restart the squid server:

sudo service squid3 start

Visit http://www.whatismyip.com/ again. It will indicate your proxy’s IP, stating that no proxy is detected :) Cool.

TODO
At the moment anybody can use your proxy if they find out your IP:port combination. I tried to add username / password HTTP authentication but it didn’t work. If someone has a step-by-step guide for that, let me know.

Categories: network Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: