How to config shadowsocks server on ubuntu.

Install required libs:

sudo apt-get install python-setuptools, pip
sudo apt-get install python-m2crypto, supervisor

Install shadowsocks:

sudo pip install shadowsocks

Config shadowsocks:

# sudo vi /etc/shadowsocks.json and add below content:
{ 
  "server": "0.0.0.0", 
  "server_port": 8388, 
  "local_port": 1080, 
  "password": "yourpassword", 
  "timeout": 600, 
  "method": "aes-256-cfb" 
}

Config supervisord to manage shadowsocks:

# sudo vi /etc/supervisor/supervisord.conf 
[program:shadowsocks] 
command=ssserver -c /etc/shadowsocks.json 
autostart=true 
autorestart=true 
user=root 
log_stderr=true 
logfile=/var/log/shadowsocks.log

Start supervisor:

sudo /etc/init.d/supervisor start

[Optional] Config autostart after system restart:

Add above start command to /etc/rc.local
BACK TO TOP
Post tagged with: linux