CentOS 6/7 一键安装shadowsocks脚本

新服务器可以先升级一下

yum -y update

有些服务器是没有wget需要先安装

yum -y install wget

运行一键安装脚本

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log

进入配置,第一个是ss的连接密码,第二个是端口,第三是协议。这里推荐用rc4,比aes快
然后后按任意键开始安装。如果按ctrl+c 终止安装。安装过程需要几分钟

出现以下信息安装完成

Congratulations, shadowsocks install completed!
Your Server IP: ***** # SS连接的IP地址
Your Server Port: **** #SS连接端口
Your Password: **** #SS连接密码
Your Local IP: 127.0.0.1
Your Local Port: 1080
Your Encryption Method: aes-256-cfb
Welcome to visit:https://teddysun.com/342.html
Enjoy it!

配置文件路径为:/etc/shadowsocks.json

单用户配置

{
"server":"your_server_ip",
"server_port":8989,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"yourpassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}

多用户配置

{
"server":"your_server_ip",
"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
}

卸载方法

./shadowsocks.sh uninstall

相关命令

#启动

/etc/init.d/shadowsocks start

#停止

/etc/init.d/shadowsocks stop

#重启

/etc/init.d/shadowsocks restart

#状态

/etc/init.d/shadowsocks status

猜你喜欢

转载自blog.csdn.net/Wkiwi_/article/details/87877701