客户端 #

安装shadowsocks #

yum install python-setuptools && easy_install pip
## pip install --upgrade pip
pip install shadowsocks

创建配置文件 #

vim /etc/shadowsocks.json

{
  "server":"your_server_ip",
  "server_port":8388,
  "password":"yourpassword",
  "timeout":300,
  "method":"aes-256-cfb",
  "fast_open":false,
  "workers": 1
}

代码中各字段的含义

多账号配置 #

{
  "server":"your_server_ip",
  "port_password":{
    "8381":"pass1",
    "8382":"pass2",
    "8383":"pass3",
    "8384":"pass4"
  },
  "timeout":60,
  "method":"rc4-md5",
  "fast_open":false,
  "workers":1
}

服务运营管理 #

运行 #

ssserver -c /etc/shadowsocks.json -d start
# 或不需要配置文件
sudo ssserver -p 443 -k password -m rc4-md5 --user nobody -d start

# 关闭防火墙
systemctl stop firewalld.service # 停止firewall
systemctl disable firewalld.service # 禁止firewall开机启动

关闭 #

ssserver -d stop

查看日志 #

less /var/log/shadowsocks.log

帮助 #

ssserver -h

参考文章 #