Build Shadowsocks service under Ubuntu 14.04

1. Install the SS server
apt-get install python-pip
pip install shadowsocks

2. After the server is installed, create a configuration file /etc/shadowsocks.json. Example:

{
"server":"138.68.48.75",
"local_address": "127.0.0.1",
"local_port":1080,
"port_password": {
"8388": "badtom",
"1701": "badtom",
"8081 ": "badtom"
},
"timeout": 300,
"method": "aes-256-cfb",
"fast_open": false,
"workers": 1
}
Customize the server IP address and password fields, other Fields can also be changed as needed.

3. Start the service
ssserver -c /etc/shadowsocks.json
but the process cannot be resident, so you need to install supervisor management.


4. Install supervisor service
apt-get install supervisor

5. Create a new configuration file in the /etc/supervisor/conf.d/ directory, such as ss.conf, with the following content:
[program:ss]
command=ssserver -c /etc/shadowsocks.json
user=root

6. Start the supervisor service
root@~>supervisord
If the prompt is started, kill the supervisor process first

7. Start and stop the process
supervisorctl start ss

supervisorctl stop ss


At this point, the shadowsocks server is built and starts automatically with the operating system. Open your shadowsocks client, enter the configuration information and start connecting!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325686628&siteId=291194637