In a previous tutorial, I showed you how to install the python version of shadowsocks on Debian, Ubuntu and CentOS server. That is the easiest way to installing shadowsocks and it’s also platform-independent because it’s a python program.
Now I will show you how to install shadowsock-libev, the C implementation of shadowsocks on Debian 8 and Ubuntu 14.04 server. Since it’s written in C, so it consumes very little memory and well suited for embedded devices and low end boxes.
Install Shadowsocks-libev on Debian 8 and Ubuntu 14.04 Server
First, fetch the GPG public key and then import it to your system with apt-key.
wget http://shadowsocks.org/debian/1D27208A.gpg sudo apt-key add 1D27208A.gpg
Now open /etc/apt/sources.list file.
sudo nano /etc/apt/sources.list
Add the following line at the end of the file.
#Debian 8 deb http://shadowsocks.org/debian wheezy main #Ubuntu 14.04 deb http://shadowsocks.org/ubuntu trusty main
Save and close the file. Now update local package index and install shadowsocks-libev.
sudo apt-get update;sudo apt-get install shadowsocks-libev
Open the server configuration file.
sudo vi /etc/shadowsocks-libev/config.json
Change server IP to your actual IP. Change the password to your own password. And set the method to aes-256-cfb.
Save and close the file. Now start the service.
sudo service shadowsocks-libev start
sudo systemctl start shadowsocks-libev
Another configuration file is /etc/default/shadowsocks-libev
sudo vi /etc/default/shadowsocks-libev
You can set shadowsocks-libev to auto-start on system boot in this file.
If you encouter a connection reset error, then you may need to change the default port 8388 to another port. Also note that timeout setting of shadowsocks server and client must be the same.
Using Shadadowsocks-libev on the Client Side
The client software is named ss-local. To use it to connect to a remote Shadowsocks server, run the following command
ss-local -c <your-config-file>
Replace <your-config-file> with your actual configuration file. It does not require sudo privilege.
Shadowsocks-libev consists of five components. One is ss-server that runs on a remote server to provide secured tunnel service. ss-local and ss-redir are clients on your local machines to proxy TCP traffic. ss-tunnel is a tool for local port forwarding.
While ss-local works as a standard socks5 proxy, ss-redir works as a transparent proxy and requires netfilter’s NAT module.
ss-manager is a controller for multi-user management and traffic statistics, using UNIX domain socket to talk with ss-server. Also, it provides a UNIX domain socket or IP based API for other software.
For more information, check out the man page
The python version of Shadowsocks is easier to install on different platform. It support many platforms out of the box. While shadowsocks-libev provides a high performance and consumes very little memory. It’s very suitable for embedded devices and low end boxed such as routers, raspberry pi and the like.
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!