Install shadowsocks - A Tunnel Proxy to Bypass Firewalls

February 26, 2015 | By
| Reply More

shadowsocks logo

In some countries internet are very strict, too much content is blocked by government. We no longer have the freedom to surf, but this time we will give you a powerful tool for bypass it. Name of tool is shadowsocks and it is secure socks5 proxy, designed to protect your internet traffic.

Why use shadowsocks

- Super Fast

Bleeding edge techniques using Asynchronous I/O and Event-driven programming.

- Flexible Encryption

Secured with industry level encryption algorithm. Flexible to support custom algorithms.

- Mobile Ready

Optimized for mobile device and wireless network, without any keep-alive connections.

- Cross Platform

Available on multiple platforms, including PC, MAC, Mobile (Android and IOS) and Routers (OpenWRT).

- Open Source

Totally free and open source. A worldwide community devoted to deliver bug-free code and long term support.

- Easy Deployment

Easy deployment with pip, npm, aur, freshports and many other package manager systems.

We will explain you how to install and configure it.

Install Shadowsocks

Install with Python

It aims to provide a simple-to-use and easy-to-deploy implementation with basic features of shadowsocks. Written by @clowwindy.

First, make sure you have Python 2.6 or 2.7(not support python 3.x).

$ python --version
python 2.7.8

Debian / Ubuntu :

Then install from PIP :

$ apt-get install python-pip
$ pip install shadowsocks

CentOS :

$ yum install python-setuptools && easy_install pip
$ pip install shadowsocks

GitHub :

Checkout the source codes and run the scripts directly.

$ git clone https://github.com/shadowsocks/shadowsocks.git
$ cd shadowsocks
$ python setup.py

Shadowsocks-python is released under the MIT license.

Install with NodeJS

Shadowsocks-nodejs is a high performance port maintaned by @clowwindy too. It implements all features of shadowsocks protocol, including TCP CONNECT and UDP ASSOCIATE.

NPM :

Install the stable version with npm :

$ npm install -g shadowsocks

GitHub :

Fetch and run the scripts :

$ npm install -g coffee-script
$ git clone https://github.com/shadowsocks/shadowsocks-nodejs.git
$ cd shadowsocks-nodejs
$ cake build

Shadowsocks-nodejs is released under the MIT license.

Install with GO

Shadowsoks-go is a state-of-the-art port written in Go language, designed for large scale system. It implements the multi-port-multi-password featue, which is suitable for paid service providers with user management and traffic statistic support. This port is maintained by @cyfdecyf.

Pre-Built Binaries :

Download archives from http://dl.chenyufei.info/shadowsocks/

GitHub :

Use go get to install the scripts :

$ go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server

Shadowsocks-go is released under the MIT license

Install via C with libev

Shadowsocks-libev is a lightweight and full featured port for embedded devices and low boxes. It's a pure C implementation and has a very small footprint (several megabytes) for thousands of connections. This port is maintaind bby @madeye.

Debian / Ubuntu :

First, add the GPG public key to your system :

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

Install the binaries by adding each of the following repositories to your sysstem.

On Debian Wheezy, Ubuntu 12.04 or any distribution with libssl > 1.0.0

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

On Debian Squeeze, Ubuntu 11.04, or any distribution with libss > 0.9.8, but < 1.0.0

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

then

$ apt-get update
$ apt-get install shadowsocks-libev

GitHub :

Build and install the project from source codes.

$ git clone https://github.com/shadowsocks/shadowsocks-libev.git
$ cd shadowsocks-libev
$ sudo apt-get install build-essential autoconf libtool libssl-dev
$ ./configure && make
$ make install

Shadowsocks-libev is released under the GPLv3 license

Usage on server :

Usage :

$ ssserver -p <port> -k <password> -m rc4-md5

To run in the background :

$ sudo ssserver -p <port> -k <password> -m rc4-md5 --user nobody -d start

To stop:

$ sudo ssserver -d stop

To check the log :

$ sudo less /var/log/shadowsocks.log

Usage on client

Create a file config.json. example config :

{
"server":"<your server ip",
"server_port":<your server port>,
"local_address": "127.0.0.1",
"local_port":<your local port>,
"password":"<your password>",
"timeout":300,
"method":"rc4-md5",
"fast_open": false
}

Save and running this command in same directory:

$ sslocal

last step is config your browser proxy to sock5 listen to 127.0.0.1  and local port

In firefox go to Preferences -> Network Tab -> Settings -> Choose Manual Proxy and fill in Sock host form (fill port form depend of your local port config.json.

Firefox Proxy settings

Firefox Proxy settings

We also can use shadowsocs in another client.

Conclusion

ShadowSocks asynchronous I/O technology makes browsing the Internet faster than OpenVPN but that in the end speed will depend on the server load and ping even if the protocol is light on resources. The greatest benefit of using ShadowSocks is that it is easy to set up your own ShadowSocks server on a cheap VPS. Notice that this program has been designed as an anticensorship tool and not to make you anonymous on the Internet. Happy Surfing !

Filed Under : FIREWALL, LINUX HOWTO

Tagged With :

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.