安装shadowsocks

linode ubuntu 16.04 LTS,默认就安装了Python
  1. Update packages:sudo apt-get update && apt-get upgrade
  2. Install pip:sudo apt-get install python-pip
  3. Install shadowsocks:pip install shadowsocks
  4. Configue Shadowsocks:Create a config file /etc/shadowsocks.json as:
    OptionDescription
    single user {"server": "my_server_ip","server_port": 8388,"local_address": "127.0.0.1","local_port": 1080,"password": "mypassword","timeout": 300,"method": "aes-256-cfb","fast_open": false}
    multiple users {"server": "0.0.0.0","port_password": {"8381": "foobar1","8382": "foobar2","8383": "foobar3","8384": "foobar4"},"timeout": 300,"method": "aes-256-cfb"}
  5. Start Shadowsocks server:Run shadowsocks server as daemon::ssserver -c /etc/shadowsocks.json -d start
    注:
    Stop SS server:ssserver -c /etc/shadowsocks.json -d stop
  6. Auto start after system reboot:You can start SS server manually with the above command every time the system powers on, or find a way to let it auto started.
    1. Install supervisor:sudo apt-get install supervisor[program:shadowsocks] command=ssserver -c /etc/shadowsocks.json autostart=true autorestart=true user=root log_stderr=true logfile=/var/log/shadowsocks.log
    2. Create a supervisor config file /etc/supervisor/conf.d/shadowsocks.conf with contents:
    3. start (or restart) supervisor:sudo service supervisor start
    SS服务端安装完成。
    注:
    如果已经安装过SS Client可能需要删除旧配置文件,重新配置服务端。