wiki:
配置
- 配置单个ss账号:
{
"server":"0.0.0.0",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
- 配置多个ss账号
{
"server":"0.0.0.0",
"port_password":{
"8381":"pwd1",
"8382":"pwd2",
"8383":"pwd3",
"8384":"pwd4"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
- 配置说明:
字段 | 说明 |
---|---|
server | ss服务监听地址 |
server_port | ss服务监听端口 |
local_address | 本地的监听地址 |
local_port | 本地的监听端口 |
password | 密码 |
timeout | 超时时间,单位秒 |
method | 加密方法,默认是aes-256-cfb |
fast_open | 使用TCP_FASTOPEN, true / false |
workers | workers数,只支持Unix/Linux系统 |
- 开机启动
编辑rc.local
vi /etc/rc.local
输入
ssserver -c /etc/shadowsocks.json -d start
shadowsocks 的日志保存在 /var/log/shadowsocks.log
启动前关闭防火墙:
systemctl stop firewalld.service #停止
systemctl disable firewalld.service #禁用
操作
类型 | 执行 |
---|---|
前台启动 | ssserver -c /etc/shadowsocks.json |
后台启动 | ssserver -c /etc/shadowsocks.json -d start |
后台停止 | ssserver -c /etc/shadowsocks.json -d stop |