安装SS
1 wget --no-check-certificate -O shadowsocks.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh 2 chmod +x shadowsocks.sh 3 ./shadowsocks.sh 2>&1 | tee shadowsocks.log
配置SS
1 vim /etc/shadowsocks.json
配置文件中关于多用户修改
1 { 2 "server":"0.0.0.0", 3 "local_address":"127.0.0.1", 4 "local_port":1080, 5 "port_password":{ 6 "8989":"password0", 7 "9001":"password1", 8 "9002":"password2", 9 "9003":"password3", 10 "9004":"password4" 11 }, 12 "timeout":300, 13 "method":"your_encryption_method", 14 "fast_open": false 15 }
SS的操作命令
1 启动:/etc/init.d/shadowsocks start 2 停止:/etc/init.d/shadowsocks stop 3 重启:/etc/init.d/shadowsocks restart 4 状态:/etc/init.d/shadowsocks status
在centos中,设置好端口后需要对防火墙中添加对应端口的权限
# 首先修改防火墙配置文件 vim /etc/firewalld/zones/public.xml # 在zone中加入在shadowsocks里新添加的端口 <port protocol="tcp" port="8989"/> <port protocol="udp" port="8989"/> # 重启防火墙 systemctl restart firewalld.service
时间: 2024-09-29 17:24:02