Compare commits

...
18 Commits
Author SHA1 Message Date
xtaci 556de3055b upgrade to kcp-go@v5.4.19 2019-11-07 13:33:06 +08:00
xtaci 9d84f40720 upgrade to kcp-go@v5.4.18 2019-11-05 19:29:37 +08:00
xtaci f70791fc61 upgrade to kcp-go@v5.4.17 2019-11-05 14:47:40 +08:00
xtaci 8f2fcb7026 upgrade to kcp-go@v5.4.16 2019-11-04 16:12:37 +08:00
xtaci 2eec01d9c0 upgrade to kcp-go@v5.4.15 2019-11-04 12:37:57 +08:00
xtaci 047895f088 upgrade to kcp-go@v5.4.14 2019-11-02 00:46:42 +08:00
xtaciandGitHub b93460fb27 Delete wechat_donate.jpg 2019-11-01 15:42:18 +08:00
xtaciandGitHub 8ab062621e Update README.md 2019-11-01 15:41:53 +08:00
xtaci c380abfc75 upgrade to kcp-go@v5.4.13 2019-10-30 15:06:31 +00:00
xtaciandGitHub 029af29881 Update README.md 2019-10-26 21:46:23 +08:00
xtaciandGitHub b2720342c4 Update README.md 2019-09-28 10:47:45 +08:00
xtaciandGitHub b51ef20d30 Update README.md 2019-09-27 17:20:41 +08:00
xtaciandGitHub a95a000cad Update ISSUE_TEMPLATE 2019-09-27 12:06:21 +08:00
xtaciandGitHub c251f2c3b4 Update ISSUE_TEMPLATE 2019-09-27 12:05:27 +08:00
xtaciandGitHub ffb7f8aeaf Update README.md 2019-09-27 12:02:51 +08:00
xtaciandGitHub 265dd7eb1d Update README.md 2019-09-27 11:55:41 +08:00
xtaciandGitHub c21ba84b05 Update README.md 2019-09-27 11:41:14 +08:00
xtaci 7d06c5f2d7 upgrade to kcp-go@5.4.11 2019-09-26 11:14:12 +08:00
5 changed files with 49 additions and 42 deletions
+16 -14
View File
@@ -1,27 +1,29 @@
问问题前先搜索ISSUE,并搞清楚下面的问题:
1. 检查 ```-key xxx``` 至少三遍, ***保证***两边一致。
2. 保证```-nocomp, -datashard, -parityshard, -key, -crypt```两边一致。
2. 保证```-nocomp, -datashard, -parityshard, -key, -crypt, -smuxver```两边一致。
3. 是否在服务器端,正确设定了转发的目标服务器地址 ***--target***。
4. 如果第3条不确定,尝试在服务器上telnet target port试试
5. 防火墙是否关闭了UDP通信
6. 两端的版本是否一致
7. 是不是最新版本
8. 两端分别是什么操作系统
9. 两端的输出日志是什么
4. 是否在客户端,正确的连接到了 client的监听端口
5. 如果第3条不确定,尝试在服务器上telnet target port试试
6. 防火墙是否关闭了UDP通信,或者设置了UDP的最大发包速率
7. 两端的版本是否一致
8. 是不是最新版本
9. 两端分别是什么操作系统
10. 两端的输出日志是什么?
Before firing issue, make sure you figured out the following common questions.
PLEASE DO SEARCH FIRST.
1. Check your ```-key xxx``` for at least 3 times, ***MAKE SURE*** both sides share the same secret.
2. ```-nocomp, -datashard, -parityshard, -key, -crypt``` ***must be the same*** on both side.
2. ```-nocomp, -datashard, -parityshard, -key, -crypt, -smuxver``` ***must be the same*** on both side.
3. Did you correctly set the ***-target*** on the server side?
4. ***MAKE SURE*** ```telnet target port``` on your server successful(don't ask me why couldn't).
5. Does your ***firewall allows UDP*** communications? (including your ISP Cable-Modem)
6. Are you using the **same version** for both client & server
7. Are you using the **latest release**?
8. Which **OS** do you use?
9. Which end for this issue related to, **client or server**?
4. Did you correctly connected to the listening port on client side?
5. ***MAKE SURE*** ```telnet target port``` on your server successful(don't ask me why couldn't).
6. Does your ***firewall allows UDP*** communications? (including your ISP Cable-Modem)
7. Are you using the **same version** for both client & server
8. Are you using the **latest release**?
9. Which **OS** do you use?
10. Which end for this issue related to, **client or server**?
+18 -17
View File
@@ -62,7 +62,8 @@ which tunnels the original connection:
### Install from source
```
$go get -u github.com/xtaci/kcptun/...
$ export GO111MODULE=on
$ go get -u github.com/xtaci/kcptun/...
```
All precompiled releases are genereated from `build-release.sh` script.
@@ -105,6 +106,8 @@ All precompiled releases are genereated from `build-release.sh` script.
Since streams are multiplexed into a single physical channel, head of line blocking may appear under certain circumstances, by
increasing `-smuxbuf` to a larger value (default 4MB) may mitigate this problem, obviously this will costs more memory.
For versions >= v20190924, you can switch to smux version 2, smux v2 has options to limit per-stream memory usage, now set `-smuxver 2` to enable smux v2, and adjust `-streambuf` to limit per-stream memory usage, eg: `-streambuf 2097152` can limit per-stream memory usage to 2MB. By limiting stream buffer on the receiver side, a back-pressure will be conducted to the sender and limits reading, and finally prevent source from sending too much data to occupy every bits of buffer along the link. (Setting -smuxver **MUST** be **IDENTICAL** on both side, default is 1. )
#### Slow Devices
kcptun made use of **ReedSolomon-Codes** to recover lost packets, which requires massive amount of computation, a low-end ARM device cannot satisfy kcptun well. To unleash the full potential of kcptun, a multi-core x86 homeserver CPU like AMD Opteron is recommended.
@@ -119,7 +122,7 @@ If you insist on running under some ARM routers, you'd better turn off `FEC` and
#### Usage
```
xtaci@gw:~$ ./client_linux_amd64 -h
➜ ~ ./client_linux_amd64 -h
NAME:
kcptun - client(with SMUX)
@@ -127,10 +130,10 @@ USAGE:
client_linux_amd64 [global options] command [command options] [arguments...]
VERSION:
20190409
20190924
COMMANDS:
help, h Shows a list of commands or help for one command
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--localaddr value, -l value local listen address (default: ":12948")
@@ -149,17 +152,20 @@ GLOBAL OPTIONS:
--dscp value set DSCP(6bit) (default: 0)
--nocomp disable compression
--sockbuf value per-socket buffer in bytes (default: 4194304)
--smuxver value specify smux version, available 1,2 (default: 1)
--smuxbuf value the overall de-mux buffer in bytes (default: 4194304)
--streambuf value per stream receive buffer in bytes, smux v2+ (default: 2097152)
--keepalive value seconds between heartbeats (default: 10)
--snmplog value collect snmp to file, aware of timeformat in golang, like: ./snmp-20060102.log
--snmpperiod value snmp collect period, in seconds (default: 60)
--log value specify a log file to output, default goes to stderr
--quiet to suppress the 'stream open/close' messages
--tcp to emulate a TCP connection(linux)
-c value config from json file, which will override the command from shell
--help, -h show help
--version, -v print the version
xtaci@gw:~$ ./server_linux_amd64 -h
➜ ~ ./server_linux_amd64 -h
NAME:
kcptun - server(with SMUX)
@@ -167,14 +173,14 @@ USAGE:
server_linux_amd64 [global options] command [command options] [arguments...]
VERSION:
20190409
20190924
COMMANDS:
help, h Shows a list of commands or help for one command
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--listen value, -l value kcp server listen address (default: ":29900")
--target value, -t value target server address (default: "127.0.0.1:12948")
--target value, -t value target server address, or path/to/unix_socket (default: "127.0.0.1:12948")
--key value pre-shared secret between client and server (default: "it's a secrect") [$KCPTUN_KEY]
--crypt value aes, aes-128, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, sm4, none (default: "aes")
--mode value profiles: fast3, fast2, fast, normal, manual (default: "fast")
@@ -186,13 +192,16 @@ GLOBAL OPTIONS:
--dscp value set DSCP(6bit) (default: 0)
--nocomp disable compression
--sockbuf value per-socket buffer in bytes (default: 4194304)
--smuxver value specify smux version, available 1,2 (default: 1)
--smuxbuf value the overall de-mux buffer in bytes (default: 4194304)
--streambuf value per stream receive buffer in bytes, smux v2+ (default: 2097152)
--keepalive value seconds between heartbeats (default: 10)
--snmplog value collect snmp to file, aware of timeformat in golang, like: ./snmp-20060102.log
--snmpperiod value snmp collect period, in seconds (default: 60)
--pprof start profiling server on :6060
--log value specify a log file to output, default goes to stderr
--quiet to suppress the 'stream open/close' messages
--tcp to emulate a TCP connection(linux)
-c value config from json file, which will override the command from shell
--help, -h show help
--version, -v print the version
@@ -346,6 +355,7 @@ The parameters below **MUST** be **IDENTICAL** on **BOTH** side:
1. -nocomp
1. -datashard
1. -parityshard
1. -smuxver
### References
@@ -366,14 +376,5 @@ The parameters below **MUST** be **IDENTICAL** on **BOTH** side:
1. https://en.wikipedia.org/wiki/Noisy-channel_coding_theorem -- Noisy channel coding theorem
1. https://zhuanlan.zhihu.com/p/53849089 -- kcptun开发小记
### Donate
via Ethereum(ETH): Address: 0x2e4b43ab3d0983da282592571eef61ae5e60f726 , Or scan here:
<img src="0x2e4b43ab3d0983da282592571eef61ae5e60f726.png" alt="kcptun" height="120px" />
via WeChat
<img src="wechat_donate.jpg" alt="kcptun" height="120px" />
(注意:我没有任何社交网站的账号,请小心骗子。)
+1 -1
View File
@@ -11,7 +11,7 @@ require (
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b // indirect
github.com/tjfoc/gmsm v1.0.1 // indirect
github.com/urfave/cli v1.21.0
github.com/xtaci/kcp-go v5.4.10+incompatible
github.com/xtaci/kcp-go v5.4.19+incompatible
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae // indirect
github.com/xtaci/smux v1.4.4
github.com/xtaci/smux/v2 v2.0.11
+14 -10
View File
@@ -19,20 +19,24 @@ github.com/tjfoc/gmsm v1.0.1 h1:R11HlqhXkDospckjZEihx9SW/2VW0RgdwrykyWMFOQU=
github.com/tjfoc/gmsm v1.0.1/go.mod h1:XxO4hdhhrzAd+G4CjDqaOkd0hUzmtPR/d3EiBBMn/wc=
github.com/urfave/cli v1.21.0 h1:wYSSj06510qPIzGSua9ZqsncMmWE3Zr55KBERygyrxE=
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ=
github.com/xtaci/kcp-go v5.4.7+incompatible h1:0WXorSb87WBIVjXWv618klAeCh8H32NcDpWq+g04x2E=
github.com/xtaci/kcp-go v5.4.7+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.8+incompatible h1:4GnTyiiC1S7ZFBMKvsF0gMJ3MoN1BoiFRCQ7IuAeUB0=
github.com/xtaci/kcp-go v5.4.8+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.9+incompatible h1:wrMgJXB/UFch+ERT0Qr4wO9CSqPAXWblbnH9uGK7TM4=
github.com/xtaci/kcp-go v5.4.9+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.10+incompatible h1:FgH1ji3efEmRFaHEeyim1RYN4Q/c8BT8VqXMklBmh84=
github.com/xtaci/kcp-go v5.4.10+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.13+incompatible h1:s6ba2XTw8lAj+s6AQNob25dCvWDgwE+U1QpEVBUoYy8=
github.com/xtaci/kcp-go v5.4.13+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.14+incompatible h1:kQZr/ngKQtYrgXSUxwF4A59mTMzUp0BDmtWIRuXYoqg=
github.com/xtaci/kcp-go v5.4.14+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.15+incompatible h1:QLDulPaKjT4k4cGeviyC1mt00gwJ3r5epx8yCw6ACEc=
github.com/xtaci/kcp-go v5.4.15+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.16+incompatible h1:/L7UP4P4H/oXpMnrb2W9oOxCMVpjPi3FJeMJmgN+SUE=
github.com/xtaci/kcp-go v5.4.16+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.17+incompatible h1:RudP76JCx062JSxPxSjBl+457+fS0M7T8zEZPLpC0o8=
github.com/xtaci/kcp-go v5.4.17+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.18+incompatible h1:zxzRP8V54vhJ8QAKEjf1b9g96R01prybCRchx6rEmtg=
github.com/xtaci/kcp-go v5.4.18+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/kcp-go v5.4.19+incompatible h1:vv7Ar1D9WZGiv6deIOluxrC26Oin/2jFtx8sFU5tlvw=
github.com/xtaci/kcp-go v5.4.19+incompatible/go.mod h1:bN6vIwHQbfHaHtFpEssmWsN45a+AZwO7eyRCmEIbtvE=
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM=
github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE=
github.com/xtaci/smux v1.4.4 h1:FukIfahko+KHhS9Gxppkp6756opZymvPOLNmpny1is4=
github.com/xtaci/smux v1.4.4/go.mod h1:LuA3S0xssf4fmGRJ7ow3EehgmDUzib4EcobaFNKvlMA=
github.com/xtaci/smux/v2 v2.0.10 h1:EKYuZH06sfoId5REZXyHmKTSgIeU5Ko27JICc0YI6ys=
github.com/xtaci/smux/v2 v2.0.10/go.mod h1:Iqy5a3Gax2p7WCKHOHkSNo/COthNFXd3/vqrcKNtzqI=
github.com/xtaci/smux/v2 v2.0.11 h1:thVWmgGRciZ8iaATwpY2B/51aHzmMI6wrF7DfcJSckU=
github.com/xtaci/smux/v2 v2.0.11/go.mod h1:Iqy5a3Gax2p7WCKHOHkSNo/COthNFXd3/vqrcKNtzqI=
github.com/xtaci/tcpraw v1.2.25 h1:VDlqo0op17JeXBM6e2G9ocCNLOJcw9mZbobMbJjo0vk=
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB