安装脚本
首先我们下载脚本
1 2
| wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
|
更改权限
执行脚本
1
| ./shadowsocks.sh 2>&1 | tee shadowsocks.log
|
添加多用户:
1
| vi/ etc/shadowsocks.json
|
本来是这样的
1 2 3 4 5 6 7 8 9 10
| { "server":"0.0.0.0", "server_port":8989, "local_address":"127.0.0.1", "local_port":1080, "password":"yourpassword", "timeout":300, "method":"aes-256-cfb", "fast_open": false }
|
改为这样的,其实就是添加端口
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| { "server":"0.0.0.0", "local_address":"127.0.0.1", "local_port":1080, "port_password":{ "8989":"password0", "9001":"password1", "9002":"password2", "9003":"password3", "9004":"password4" //几个用户就加几个,最后一个用户冒号后面不要逗号,不然会报错 }, "timeout":300, "method":"aes-256-cfb", "fast_open": false }
|
然后重启一下服务就好了
1
| /etc/init.d/shadowsocks restart
|
发现还是不能使用
centos7继续往下面看
先进入firewalled的配置端口目录,路径为etc/firewalled/zones/。打开public.xml文件进行端口的编辑。例如加入8080端口的tcp和ump
1 2
| <port protocol="tcp" port="8080"/> <port protocol="udp" port="8080"/>
|
重启防火墙
1
| systemctl restart firewalld.service
|