我的阿里云服务器如何成功架设和配置shadowsocks服务器的

经验是:所有修改都要重启服务器才会导入新端口设置

New Shadowsocks in ubuntu build up in Aliyun ECS HangZhou server

1.new create a ubuntu 16.4 clean system for project

2.purge away old ssh key for new ssh log as aliyun ECS by :

ssh-keygen -R <em>121.196.214.43</em>

3.update system 

Apt-get update

4.update language package/default disable by 

export LC_ALL=C

5.install pip environment

apt-get -y install python-gevent python-pip
pip install --upgrade pip

6.install shadowsocks

pip install shadowsocks

7.check ssserver install or not by –help or -h

ssserver -h

8.edit config.json fail for bootup

# create a folder for shadowsocks

mkdir /etc/shadowsocks

# edit bootup scriptions

vim /etc/shadowsocks/config.json

9.boot up ssserver with configuration path /etc/shadowsocks/config.json

 

<em>{</em>

   “server”: “172.16.69.212”,

   “local_address”: “127.0.0.1”,

   “local_port”:1080,

    “port_password”:{

        “25”:”399396″,

        “531”:”zengqinglin”,

        “7038”:”gaowenming”,

        “6425”:”wangqian”,

        “6484”:”impl”

                    },

   “timeout”:300,

   “method”:”aes-256-cfb”,

   “fast_open”: false

}

10. 启动ss

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

11. Set as startup when boot up

vim /etc/rc.local

 =============================================

#!/bin/sh -e

#

# rc.local

#

# This script is executed at the end of each multiuser runlevel.

# Make sure that the script will “exit 0” on success or any other

# value on error.

#

# In order to enable or disable this script just change the execution

# bits.

#

# By default this script does nothing.

/usr/local/bin/ssserver -c /etc/shadowsocks/config.json

exit 0

===========================================

Backup home setting :

{

   “server”:”192.168.0.106″,

   “server_port”:25,

   “local_address”: “127.0.0.1”,

   “local_port”:1080,

   “password”:”399396″,

    “timeout”:300,

   “method”:”aes-256-cfb”,

   “fast_open”: false }

——————————————————————-

Bandwagon server setting 帮瓦工上面配置

{

   “server”:”104.194.93.8″,

   “server_port”:25,

   “local_address”: “127.0.0.1”,

   “local_port”:1080,

   “password”:”399396″,

    “timeout”:300,

   “method”:”aes-256-cfb”,

   “fast_open”: false }

New:

{

   “server”: “104.194.93.8”,

   “local_address”: “127.0.0.1”,

   “local_port”:1080,

    “port_password”:{

        “25”:”399396″,

        “531”:”zengqinglin”,

        “7038”:”gaowenming”,

        “6425”:”wangqian”,

        “6484”:”impl”

                    },

   “timeout”:300,

   “method”:”aes-256-cfb”,

   “fast_open”: false

}

vim /etc/shadowsocks.json //是我修改配置的地方