How To: ShadowSocks on Ubuntu


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.

 

The advantages

  • 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.

 

Installation

Step 1

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.

Step 2

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.

Step 3

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.

Step 4

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.

*This script is slightly modified for user convenience and all rights belong to the original author on GitHub.

Step 5

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.

ShadowSocks OSX Client

As seen, multiple servers can be added and all the details are included in the script that was ran on the Ubuntu Server.

 

Conclusion

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.

*More information is available on the ShadowSocks website.

Leave a Reply