一键安装
用root账户登录后(vultr默认是root账户登录),开始安装一键shadowsock脚本:
#命令1:(可双击复制)
wget --no-check-certificate -O shadowsocks-libev.sh https://raw.githubusercontent.com/wanls4583/wanls4583.github.io/master/code/shadowsocks/shadowsocks-libev.sh
#命令2:
chmod +x shadowsocks-libev.sh
#命令3:
./shadowsocks-libev.sh 2>&1 | tee shadowsocks-libev.log
防火墙
执行命令3后按照提示输入连接密码、端口号、加密方法即可完成安装。脚本将自动把输入的端口号添加到防火墙,如果后续需要修改了端口,可用如下命令添加防火墙:
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --reload
修改配置
vi /etc/shadowsocks-libev/config.json
#内容如下
{
"server":["[::0]","0.0.0.0"],
"server_port":12620,
"password":"520131",.
"timeout":300,
"user":"nobody",
"method":"aes-256-gcm",
"fast_open":false,
"nameserver":"1.0.0.1",
"mode":"tcp_and_udp"
}
修改后记得重新启动服务
相关命令
#启动shadowsock:
/etc/init.d/shadowsocks start
#停止shadowsock:
/etc/init.d/shadowsocks stop
#重启shadowsock:
/etc/init.d/shadowsocks restart
#查看shadowsock状态:
/etc/init.d/shadowsocks status