安装shadowsocks
- Update packages:sudo apt-get update && apt-get upgrade
- Install pip:sudo apt-get install python-pip
- Install shadowsocks:pip install shadowsocks
- Configue Shadowsocks:Create a config file /etc/shadowsocks.json
as:
Option Description 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"} - 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
- 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.
- 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
- Create a supervisor config file /etc/supervisor/conf.d/shadowsocks.conf with contents:
- start (or restart) supervisor:sudo service supervisor start
SS服务端安装完成。注:如果已经安装过SS Client可能需要删除旧配置文件,重新配置服务端。 - Install supervisor:sudo apt-get install supervisor