====== kcptun ====== Found some interesting things - kcptun: https://github.com/xtaci/kcptun - kcp: https://github.com/skywind3000/kcp - v2ray: https://www.v2ray.com/ ===== kcptun usage with shadowsocks ===== ==== start the server ==== On you VPS, you should already run your shadowsocks server with port '838' alias kcptun_start='~/kcptun/server_linux_amd64 -t "127.0.0.1:838" -l ":4000" -mode fast2' or just use the command ./kcptun/server_linux_amd64 -t "127.0.0.1:838" -l ":4000" -mode fast2 ==== start client ==== So in your local machine, start the client: sudo ./client_darwin_amd64 -r "xxx.pjq.me:4000" -l ":838" -mode fast2 Now we have set the connection from local port 838 to the remote port 4000. ==== config your shadowsocks ==== Set the server to localhost/127.0.0.1, and the port 838 ==== Testing the speed ==== I did the follow testing * Just download it directly, curl https://ef.pjq.me/download/20160420104351.rar -o asdf.rar * Download it with Shadowsocks, curl --socks5-hostname localhost:1080 https://ef.pjq.me/download/20160420104351.rar -o asdf.rar * Download it with Shadowsocks and kcptun, curl --socks5-hostname localhost:1080 https://ef.pjq.me/download/20160420104351.rar -o asdf.rar So we can see the speed is 8689 -> 60858 -> 1088k, the speed is increased significant. 8.6k * 136, 60k * 18 = 1088k Jianqings-MBP:~ pjq$ curl https://ef.pjq.me/download/20160420104351.rar -o asdf.rar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 72.3M 0 175k 0 0 8689 0 2:25:31 0:00:20 2:25:11 3599^C Jianqings-MBP:~ pjq$ curl --socks5-hostname localhost:1080 https://ef.pjq.me/download/20160420104351.rar -o asdf.rar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 1 72.3M 1 1055k 0 0 60858 0 0:20:46 0:00:17 0:20:29 65614^C Jianqings-MBP:~ pjq$ curl --socks5-hostname localhost:1080 https://ef.pjq.me/download/20160420104351.rar -o asdf.rar % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 72.3M 100 72.3M 0 0 1088k 0 0:01:08 0:01:08 --:--:-- 1235k