Shadowsocks Guide: Working Around the Great Firewall

I’ve just came back from China, Beijing, and had to find a way to work around the great firewall of China as I needed access to my email (Gmail) and other sites that I usually frequent. I did not want to spend money on a VPN service just for the short 2 weeks trip. I chanced upon Shadowsocks and it worked great for me.

[toc]

Finding a Host

As I already have my own server to host the server side of things, I can recommend you guys to look for a very cheap one for as low as maybe a dollar a month on this site called LowEndBox. If you’re going to China, you will want a host that has a good connectivity to China. The Shadowsocks server does not require much resources so all you need to take note of is the location and connection to China. All I have to know is where is my ip address, which is pretty simple and the quality of connection to China that that location has. If you get a server that has poorer connectivity, your connection will be slower. It will still work but performance suffers.

You would usually look for a host that has their servers located in places like Hong Kong, Singapore etc. These geographical locations might cost a premium but should still be much cheaper as compared to a dedicated VPN service. Get yourself a host (VPS if it’s from LowEndBox) and for this guide you may want to install Ubuntu as the operating system.

Server Installation

For all links regarding server downloads, visit: https://shadowsocks.org/en/download/servers.html

Before you can start using Shadowsocks on your devices you need to set it up properly on your own server. If you are using latest Ubuntu as your server’s OS, simply do the following:

First, add the GPG public key into your server.

wget -O- http://shadowsocks.org/debian/1D27208A.gpg | sudo apt-key add –

Second, add the repositories into your system.

sudo echo "deb http://shadowsocks.org/debian wheezy main" >> /etc/apt/sources.list

Lastly, install the shadowsocks server application.

sudo apt-get updatesudo apt-get install shadowsocks-libev

Once done, you must configure the server settings. I will only walk you through the basics that I’ve configured on my own server (that works and fulfils the purpose). The configuration file is located in /etc/shadowsocks-libev/config.json

sudo nano /etc/shadowsocks-libev/config.json
{
    "server":"{YOUR SERVER IP}",
    "server_port":8388,
    "local_port":1080,
    "password":"{YOUR PASSWORD}",
    "timeout":60,
    "method":"aes-256-cfb"
}

You can choose to change the server_port and local_port accordingly but do take note of what you change them to. Make sure you put in your own server’s IP as well and a password for authentication. The rest of the parameters can be left untouched.

Once you have finished editing the configuration file, restart the service:

sudo service shadowsocks-libev restart

NOTE: If you have a firewall configured, you must allow for the port you configured in the parameter “server_port” to be accessed from the outside.

Client Applications

Once you have your server all set up and ready, you can now download the relevant applications onto your devices. Shadowsocks is supported on all major desktop and mobile OSes. You can find all the clients here: https://shadowsocks.org/en/download/clients.html

Configuring the applications is self-explanatory, simply put in the server_port and password according to what you have configured at the server side. In addition, make sure the encryption method used is “aes-256-cfb”.

Once you have the application installed, the additional step you need to take on your desktop/laptop is that you will need to use a browser that points to the shadowsocks proxy server. On Google Chrome, you can install a plugin called SwitchyOmega. Once you have the plugin installed, create a new profile and fill in as such:

Conclusion

Doing the above steps will allow you to work around the great firewall of China. I’ve tried it out myself and it worked great. Despite my server being located in the US, it still ran fine enough especially for basic emailing and browsing. If you want to do some streaming off YouTube and whatnot, you must make sure your server has a good connection to China.

Do let me know if you have any questions, otherwise enjoy the additional and much needed freedom especially for people relying on Google based services.

No votes yet.
Please wait...

One thought on “Shadowsocks Guide: Working Around the Great Firewall”

Leave a Reply

Your email address will not be published. Required fields are marked *