ShadowSocks is one of the less known VPN terms, in fact it is actually based off the Socks5 protocol. Although it is one of the quickest and best encrypted VPN protocols we have ran. Assisted by their easy to use Microsoft Windows, Linux and OSX applications which make it easy to connect and manage all your connections. The VPN itself supports many different levels of encryption and a table option which has no encryption at all. We were astonished by the resource usage of this application making it extremely cost effective to run.
Within this tutorial we will be addressing the advantages of ShadowSocks and how to install ShadowSocks on Ubuntu 12.04. A step by step guide has been included for your convenience. The guide is simple to follow and the readers skills should be minimal to execute the included commands. If you happen to get stuck please comment below for some support or check the official website.
- Super-low RAM usage – (my current ShadowSocks instance only consumes 50MB of RAM)
- Flexible encryption options
- Mobile support on WiFi and mobile network.
- Open Source
- Cross Platform support on OSX, Microsoft Windows and Linux.
This requires your server to be installed with Ubuntu 12.04 (x32 or x64 bit). Once this has been confirmed you should be able to SSH into your server. The installation of Ubuntu should only take a matter of minutes through a reputable provider such as DigitalOcean (the following link gains you $10 in free credit). We love DigitalOcean for development and tinkering such as this tutorial, it is perfect for spinning up and expanding Virtual Machines.
Once onto your server you may have to install a text editor such as nano and confirm your server has the sudo command installed. These can be done by running the following commands.
apt-get install nano -y
apt-get install sudo -y
You will need to create the bash file for the script. This can be done by running nano or vim to create the file, as seen below.
Access your text editor and paste the following bash script. Make sure you edit the password line to include a strong and secure password. We recommend you leave the method of the encryption as aes-256-cfb as this is a strong and quick encryption method.
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get install -y python-gevent python-pip python-m2crypto supervisor
sudo pip install shadowsocks
sudo mkdir -p touch /etc/shadowsocks
sudo cat > /etc/shadowsocks/shadowsocks.json <<EOF
sudo cat > /etc/supervisor/conf.d/shadowsocks.conf <<EOF
command=/usr/local/bin/ssserver -c /etc/shadowsocks/shadowsocks.json
invoke-rc.d supervisor restart
*This script is slightly modified for user convenience and all rights belong to the original author on GitHub.
To run the script run the following in your SSH session. Make sure you’re in the same directory of the install.sh file when running this command.
Once this has completed the ShadowSocks service starts because it is featured within the installation script. You should be able to install the application for connecting to your VPN. Just enter the IP of the server, in the tutorial this was left as 0.0.0.0 as it will utilise any and all IP Addresses on the server in this state.
Connecting to your VPN
Firstly, you will want to download the following client depending on your operating system. The clients featured below are not the official ones however include extra tools for any users blocked by the likes of the GFW. If you have the server setup in Auto mode it will only proxy connection to certain URL’s but Global mode proxies every connection.
Microsoft Windows – GUI with GFW filter list.
Apple OSX – GUI for OSX 10.8 and above, with GFW filter list.
Mobile and other clients are available from third parties.
In conclusion of the tutorial you may find that you need a server with a minimum of 128MB RAM, I would not run this on anything below due to resource availability. I would also check that the server has a 1Gbps connection speed and is as close as possible as this will decrease any latency. For security purposes it would be advisable to make sure that all your passwords are strong and change the default SSH port. This tutorial is meant for personal use and not for a commercial VPN setup.
We take no responsibility for what you use the VPN for, this tutorial is for educational purposes and we advise you take care and responsibly use any tools such as ShadowSocks. There are clearly advantages to avoid any form of snooping, please use the tutorial responsibly, feel free to educate others.