Centos7 配置shadowsocks
服务端配置
安装 pip
1 | curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" |
安装shadowsocks
1 | pip install --upgrade pip |
编辑配置文件
创建配置文件 /etc/shadowsocks.json1
2
3
4
5
6
7
8
9
10
11
12{
"server":"my_server_ip",
"local_address": "127.0.0.1",
"local_port":1080,
"port_password":{
"4433":"mypassword",
"4434":"mypassword"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
启动
1 | ssserver -c /etc/shadowsocks.json |
开机自启
/etc/systemd/system/shadowsocks.service1
2
3
4
5
6
7
8
9
10
11
12
13[Unit]
Description=Shadowsocks
After=network.target
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
User=nobody
Group=nobody
LimitNOFILE=32768
[Install]
WantedBy=multi-user.target
启动服务1
2systemctl enable shadowsocks
systemctl start shadowsocks
日志查看
1 | less /var/log/shadowsocks.log |
客户端配置
前面都一样,下载安装shadowsocks
创建配置文件
/etc/shadowsocks.json
1 | { |
启动
1 | 前端启动:sslocal -c /etc/shadowsocks.json; |
开机自启
/etc/systemd/system/shadowsocks.service
1 | [Unit] |
启动服务
1 | systemctl enable shadowsocks |
原文作者: xunnun
原文链接: https://sec.wiki/2018/12/14/Centos7-配置shadowsocks/
许可协议: 知识共享署名-非商业性使用 4.0 国际许可协议