以下均在SSH下操作,root用户
一、ShadowsocksR的安装与卸载
一、ShadowsocksR的安装与卸载
1、一键安装ShadowsocksR
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh
chmod +x shadowsocksR.sh
./shadowsocksR.sh 2>&1 | tee shadowsocksR.log
2、卸载ShadowsocksR
./shadowsocksR.sh uninstall
3、多用户配置
{
"server":"0.0.0.0",
"server_ipv6": "[::]",
"local_address":"127.0.0.1",
"local_port":1080,
"port_password":{
"8989":"password1",
"8990":"password2",
"8991":"password3"
},
"timeout":300,
"method":"aes-256-cfb",
"protocol": "origin",
"protocol_param": "",
"obfs": "plain",
"obfs_param": "",
"redirect": "",
"dns_ipv6": false,
"fast_open": false,
"workers": 1
}
4、使用命令及配置文件
启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
状态:/etc/init.d/shadowsocks status
启动:/etc/init.d/shadowsocks start
停止:/etc/init.d/shadowsocks stop
重启:/etc/init.d/shadowsocks restart
状态:/etc/init.d/shadowsocks status
配置文件路径:/etc/shadowsocks.json
日志文件路径:/var/log/shadowsocks.log
代码安装目录:/usr/local/shadowsocks
日志文件路径:/var/log/shadowsocks.log
代码安装目录:/usr/local/shadowsocks
二、监控ShadowsocksR进程,并定时重启脚本
1、下载脚本
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-crond.sh
chmod +x shadowsocks-crond.sh
2、加入开机启动
在 /etc/crontab 加入
在 /etc/crontab 加入
*/5 * * * * root bash /root/shadowsocks-crond.sh
评论
发表评论