如何搭梯子
这里介绍一下搭梯子用到的网站
centos7一监安装脚本:来自老高博客
这个脚本配置了自动启动和自动重启。
yum update -y
yum install -y python-setuptools net-tools
easy_install pip
pip install --upgrade pip shadowsocks
cat>/etc/systemd/system/shadowsocks-server.service<<EOF
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/bin/ssserver -c /etc/ss-config.json
Restart=always
[Install]
WantedBy=multi-user.target
EOF
num=$((30000 + RANDOM))
pass=`date +%s | sha256sum | base64 | head -c 12`
cat>/etc/ss-config.json<<EOF
{
"server_port":$num,
"password":"$pass",
"timeout":60,
"method":"rc4-md5"
}
EOF
systemctl daemon-reload
systemctl enable shadowsocks-server
systemctl restart shadowsocks-server
systemctl status shadowsocks-server
cat /etc/ss-config.json
配置shadowsocks,包括服务点和客户端。来自archlinux
我的server配置:
cat /etc/ss-config.json
{
"method":"rc4-md5",
"timeout":600,
"port_password":
{
"50720":"password1",
"50721":"password2"
}
}
开了两个端口。相当于开了两个用户。自己用使用rc4-md5,加密就够了,简单一点,速度也可以快一些。
如果想要开启kcptun,我也收集了一个centos7的一键脚本,这里是地址,这里是作者博客
如果是centos7 想要开启bbr,需要内核4.9以上,具体操作可以参考这里
一般开启选择使用开启bbr就没有必要kcptun,详情看这里:KCP可以和BBR一起用么?