To browse internet with shadowsocks,
Server setup
You need a VPS (buy it from linode or digitalocean, etc, as the outlet), to run the server with root (say its IP address is "123.234.23.45"):
# aptitude install python-pip
# pip install shadowsocks
# ssserver -p 2043 -k er@20 -m aes-256-cfb --user nobody -d start
See the logs:
tail -f /var/log/shadowsocks.log
Or start it in foreground:
# ssserver -p 2043 -k testpwd
Client
Client is the machine you want to bypass the GFW.
Windows
Download the client package (Shadowsocks-win-dotnet4.0-2.3.1.zip for now), extract it, and run.
You can check its "System Proxy" option, which is convenient for all browsers and terminal.
Linux
Install
For Ubuntu/Mint:
$ sudo aptitude install python-pip
$ sudo pip install shadowsocks
Now you have a socks5 proxy. If you want convert it into a http proxy:
$ sudo aptitude install polipo
$ service polipo stop
$ sslocal -s 123.234.23.45 -p 2043 -b 127.0.0.1 -l 1080 -k testpwd
$ sudo polipo socksParentProxy=localhost:1080
Now setup the http proxy of your browser as localhost:8123. To use the proxy in terminal, add prefix "http_proxy=http://localhost:8123", for example:
http_proxy=http://localhost:8123 curl www.xys.org
Or use a text-based web browser:
http_proxy=http://localhost:8123 lynx rsf.org
where 8123 is the default port number of polipo.
Using Shadowsocks with Command Line Tools in shadowsocks wiki use proxychains to achieve proxy in terminal, which didn't work for me.
To summarize, you need 3 processes to access blocked website on Linux:
-
The shadowsocks server on the VPS abroad;
-
The shadowsocks client on your machine;
-
The polipo to convert a socks proxy into a http proxy.