Skip to content

Instantly share code, notes, and snippets.

@caiqiqi
Last active October 12, 2015 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caiqiqi/9747ccec0c514e76d6a7 to your computer and use it in GitHub Desktop.
Save caiqiqi/9747ccec0c514e76d6a7 to your computer and use it in GitHub Desktop.
This is a dummy demonstration I found recently on how to bypass the GFW

Cross the Wall

This is a dummy demonstration I found recently on how to bypass the GFW ,i.e the censorship of government by using a Linux server that you could fully control.Note that the Linux machine must be able to visit the Internet freely with no censorship.You could rent a server on aliyun,which is a little expensive but anyway you could afford it(about 90 RMB/month but after I get my student info registered it'll be 10 RMB,looking forward to it).

server side

OK,let's talk about the machine we are using.The OS is ubuntu by default.After you've got that machine,you could modify some configuration.Type this in terminal line by line:

apt-get -y install squid
curl https://pac.itzmx.com/squid/ubuntu-squid.conf > /etc/squid3/squid.conf
service squid3 restart

after that,you type in
reboot
to reboot the machine to make the configuration work.

OK,now we've set up our server side.

client side

now we turn to our client side,that is your device that you use to surf the Internet.

pac file

First of all,you gonna need the pac file which we use to decide which urls are blocked by GFW so as to let the linux server to be our proxy. Since there is a good pac file https://pac.itzmx.com/abc.pac out there,we could download that file and save it on your disk,for instance I save it one this path C:/Users/caiqiqi/Desktop/abc.pac for further use.Then we do some changes,that is,you change this line
var proxy = "PROXY 114.114.114.114:25;";
you change the IP 114.114.114.114 to your server's IP.And when you encountered a url blocked,then you could add a item like this
"blogsmithmedia.com": 1,
in the middle of the domains content. OK that's pretty much about the pac file.

browser

Let's talk about the browser. If you use Firefox browser,which I would recommond,then just click the menu button on the top right and then options -> advanced -> network ->settings
on the PAC row,you type in the path of the pac file,for instance,mine is
file:///C:/Users/caiqiqi/Desktop/abc.pac
then you restart your browser and I think you could visit google and youtube now.
BTW The bandwidth depends on your server's bandwidth,for me it's 1M.
Job done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment