年前刚好看到有个KCPTUN项目,用于高ping网络的加速,趁过年也给家里的路由器加个速。

  先到要加速的服务器上安装server端。先下载服务端程序并且解压缩

1
2
3
wget https://github.com/xtaci/kcptun/releases/download/v20170120/kcptun-linux-386-20170120.tar.gz

tar -zxcf kcptun-linux-386-20170120.tar.gz

得到了两个程序

1
2
-rwxr-xr-x 1  2908832  1月 20 03:45 client_linux_386
-rwxr-xr-x 1  2896448  1月 20 03:45 server_linux_386

使用如下命令开始服务端的转发

1
/root/kcptun/server_linux_386 -t "shadowsocks服务器ip:端口" -l ":加速端口" --mode fast2 --key "密码" --nocomp &

  然后在OpenWRT路由器上安装客户端,原项目没有ar71xx的程序,可以到https://github.com/bettermanbao/openwrt-kcptun/releases下载,解压后也是两个程序,我们只需要如下这个程序就足够了

1
-rwxrwxr-x    1 1000     1000       1241980 Jan 20 10:03 client_linux_mips

使用如下命令启动客户端

1
./client_linux_mips -r "服务端ip:端口" -l ":444" --mode fast2 --key "密码" --nocomp &

如果不加–nocomp,会在client端遇到 main.go:64: stream opened panic: runtime error: slice bounds out of range错误

使用了以后网络速度杠杠的~