要求:
- ubuntu 16.04 or above
- Python 3
1. 安装Shadowsocks
1 | sudo apt install python3-pip |
2. 配置shadowsocks
1 | sudo mkdir /etc/shadowsocks |
复制粘贴1
2
3
4
5
6
7
8
9
10{
"server":"::",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
3. 系统设置
1 | sudo nano /etc/systemd/system/shadowsocks-server.service |
复制粘贴1
2
3
4
5
6
7
8
9
10[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/config.json
Restart=on-abort
[Install]
WantedBy=multi-user.target
开启shadowsocks并设置开机自启动1
2sudo systemctl start shadowsocks-server
sudo systemctl enable shadowsocks-server