- Published on
Centos7安装Shadowsocks
- Authors

- Name
- gulu
安装pip
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
安装Shadowsocks
pip install --upgrade pip
pip install shadowsocks
安装完成后,创建配置文件/etc/shadowsocks.json,内容如下
{
"server":"0.0.0.0",
"local_address": "127.0.0.1",
"local_port":1080,
"port_password":{
"8381": "D77b73E578",
"8382": "53AFf96aEf",
"8383": "6E18a11eA2",
"8384": "OTU0OWQ2Nz"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
配置shadowsocks服务启动
新建
vi /etc/systemd/system/shadowsocks.service
编辑
[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target
启动 shadowsocks 服务
systemctl enable shadowsocks
systemctl start shadowsocks
查看启动状态
systemctl status shadowsocks
防火墙开放端口
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload
如果防火墙FirewallD is not running
systemctl start firewalld #开启防火墙
systemctl status firewalld #查看状态