安装

apt update
apt install python-pip
pip install shadowsocks

配置

vi /etc/shadowsocks.json

  1. {
  2. "server":"0.0.0.0",
  3. "server_port":50013,
  4. "local_port":1080,
  5. "password":"1234567890",
  6. "timeout":600,
  7. "method":"aes-256-cfb"
  8. }

/usr/local/bin/ssserver -c /etc/shadowsocks.json

/usr/local/lib/python2.7/dist-packages/shadowsocks/crypto/openssl.py 请你将此文件中的52行和111行中的cleanup更新为reset后,再尝试启动。这是由于openssl库更新导致名称变更的问题。

开机自启动

vi /etc/systemd/system/shadowsocks.service

  1. [Unit]
  2. Description=Shadowsocks
  3. [Service]
  4. TimeoutStartSec=0
  5. ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks.json
  6. [Install]
  7. WantedBy=multi-user.target

systemctl enable shadowsocks
systemctl start shadowsocks
systemctl status shadowsocks
ps -aux | grep ssserver