Install Shadowsocks Tunnel Proxy and Bypass Firewall

I am going to explain how you can bypass any firewall and become anonymous with the steps to install shadowsocks and then i will also show you how you can connect to one server/location but will show your public ip another. Shadowsocks is very fast tunnel proxy which can bypass the most dangerous firewall like “Great Firewall of China“.

 

Install-Shadowsocks-Tunnel-Proxy-and-Bypass-Firewall.png

# How to Install Shadowsocks

Debian / Ubuntu:

apt-get install -y python-pip
pip install shadowsocks

CentOS:

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

# How To Configure it.

To run in the background:

sudo ssserver -p 8388 -k password -m rc4-md5 --user nobody -d start

Or just(recommended):

sudo ssserver -p 8388 -k password -m rc4-md5 -d start

To stop:

sudo ssserver -d stop

To check the log:

sudo less /var/log/shadowsocks.log

This above method is the perfect procedure for your lowendspirit or Megavz/NanoVZ/Ninja or NATed vps. You can use your own port after “-p”. It is important to avoid aes-256-cfb in NATed vps, rc4-md5 is good for them.

You can use a configuration file instead of command line arguments.

Create a config file /etc/shadowsocks.json. Example:

{
    "server":"Your_server_ip_or_NATed_vps_Public_IP",
    "server_port":8388,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"mypassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

To run Shadowsocks by that config in the background:

ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop

 # How to use it.

To use in Android mobiles go to here. To use it in windows go to here.

 # How to connect to an ip but show another.

Let you have two vps. One in USA and other in Russia. If you want to connect to USA vps shadowsocks but want to appear in the world wide web as Russian then this section is for you.

First install Shadowsocks in both machine and make it running. It will be good if you chose same port in both and also same password.

Let,

111.222.333.444 - USA
444.333.222.111 - Russia

Now as you want to connect to Russian vps then in that vps install haproxy.

apt-get install -y haproxy

Now edit /etc/haproxy/haproxy.cfg and change port and ip according to yours.

global
        ulimit-n  51200

defaults
        log global
        mode    tcp
        option  dontlognull
        contimeout 1000
        clitimeout 150000
        srvtimeout 150000

frontend ss-in
        bind *:8388
        default_backend ss-out

backend ss-out
        server USA IP_of_Your_USA_VPS(as mine 111.222.333.444):8388 maxconn 20480

Now, stop ssserver or shadowsocks (by the method you started) before turning on haproxy.

ssserver -c /etc/shadowsocks.json -d stop

or

sudo ssserver -d stop

Turn on haproxy as daemon.

haproxy -D -f /etc/haproxy/haproxy.cfg

Start Shadowsocks.

ssserver -c /etc/shadowsocks.json -d start

or

sudo ssserver -p 8388 -k password -m rc4-md5 -d start

Then you can easily connect to Russian vps by Shadowsocks and surf internet or World Wide Web but you will be introduced as American. 🙂

# How To make it as http proxy.

You can also make your vps a http proxy which will encrypt your data.

First install polipo and turn it off:

apt-get install polipo
service polipo stop

Now,start with parent proxy set to Shadowsocks:

polipo socksParentProxy=localhost:1080 &

Now you can use your Shadowsocks as http proxy.
Proxy_IP: IP_of_Your_Polipo_Installed_VPS
Proxy_PORT: PORT_of_Your_ShadowSocks

Thank You.

Leave a Reply