|
发表于 2018-11-24 19:53:47
|
显示全部楼层
本帖最后由 恋花 于 2018-11-24 20:15 编辑
debian7应该没什么问题吧.
安装完SS后试试我这命令,一键安装KCPtun,端口自己改,我这里KCP端口是49999,加速的SS端口是8888.
如果KCPTUN进程在运行,端口也开放了,却连不上,自己调整一下MTU值,1300或者1350.
[ol]# 设置下载地址,自动识别32 or 64位kcptun_dl_url="https://github.com/xtaci/kcptun/releases/download/v20181002/kcptun-linux-386-20181002.tar.gz";if [[ `uname -m` == "x86_64" ]];then kcptun_dl_url="https://github.com/xtaci/kcptun/releases/download/v20181002/kcptun-linux-amd64-20181002.tar.gz";fi;# 下载kcptun解压放入/usr/lib/kcptun/并设置执行权限rm -rf /tmp/kcptun.tar.gz;wget -O /tmp/kcptun.tar.gz $kcptun_dl_url;mkdir -p /usr/lib/kcptun/;cd /usr/lib/kcptun/;tar -zxvf /tmp/kcptun.tar.gz;rm -rf /tmp/kcptun.tar.gz;mv server_linux_386 kcptun_server;if [[ `uname -m` == "x86_64" ]];then mv server_linux_amd64 kcptun_server;fi;chmod +x kcptun_server;# 添加iptables端口iptables -A INPUT -p udp --dport 49999 -j ACCEPT;#sed -i '/49999/d' /etc/iptables.up.rules;sed -i '/80 -j ACCEPT/i\-A INPUT -p udp --dport 49999 -j ACCEPT' /etc/iptables.up.rules;# 设置开机自动启动 (可自行修改相应端口和参数)ip=`ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | grep -v '10.8.0.' | grep -v '127.0.0.2' | cut -d: -f2 | awk {'print $1'} | head -n 1`;sed -i '/kcptun/d' /etc/rc.local;sed -i "1 a\\/usr\/lib\/kcptun\/kcptun_server --target "127.0.0.1:8888" --listen "$ip:49999" --mode fast2 --mtu 1350 -sndwnd 1024 -rcvwnd 2048 &" /etc/rc.local;cat /etc/rc.local;[/ol]复制代码 |
|