User Tools

Site Tools


linux:kcptun

This is an old revision of the document!


kcptun

kcptun usage with shadowsocks

start the server

On you VPN, 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

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

/var/www/dokuwiki/wiki/data/attic/linux/kcptun.1515079348.txt.gz · Last modified: 2018/01/04 23:22 by percy