Compare commits

...
23 Commits
Author SHA1 Message Date
xtaciandGitHub ce4af6237b Update README.md 2017-01-12 23:09:30 +08:00
xtaci e3ef794c64 Revert "Update README.md"
This reverts commit a981e32abe.
2017-01-12 23:08:17 +08:00
xtaci 6e529de8d2 Revert "Update README.md"
This reverts commit f5ac595e0c.
2017-01-12 23:08:16 +08:00
xtaci 831824ab79 Revert "Update README.md"
This reverts commit f84c47a491.
2017-01-12 23:08:15 +08:00
xtaci 13c451735b Revert "Update README.en.md"
This reverts commit 6b249273f5.
2017-01-12 23:08:15 +08:00
xtaci ba2da70222 Revert "Update README.md"
This reverts commit ca8be8cea4.
2017-01-12 23:08:14 +08:00
xtaci 1609b180cf Revert "Update README.md"
This reverts commit 511d49e3f5.
2017-01-12 23:08:13 +08:00
xtaci 4adcf45fb2 Revert "Update README.md"
This reverts commit 1b11a849ae.
2017-01-12 23:08:12 +08:00
xtaci d24deceff7 Revert "Update README.md"
This reverts commit 56a9b3b5e5.
2017-01-12 23:08:11 +08:00
xtaciandGitHub 56a9b3b5e5 Update README.md 2017-01-12 22:57:59 +08:00
xtaciandGitHub 1b11a849ae Update README.md 2017-01-12 22:49:58 +08:00
xtaciandGitHub 511d49e3f5 Update README.md 2017-01-12 22:45:00 +08:00
xtaciandGitHub ca8be8cea4 Update README.md 2017-01-12 22:13:33 +08:00
xtaciandGitHub 6b249273f5 Update README.en.md 2017-01-12 22:11:15 +08:00
xtaciandGitHub f84c47a491 Update README.md 2017-01-12 22:10:43 +08:00
xtaciandGitHub f5ac595e0c Update README.md 2017-01-12 22:08:28 +08:00
xtaciandGitHub a981e32abe Update README.md 2017-01-12 22:07:10 +08:00
xtaciandGitHub aed33d45ae Update README.md 2017-01-12 11:33:08 +08:00
xtaciandGitHub 53328dce08 Update README.md 2017-01-11 13:12:29 +08:00
xtaci 17be438477 switch back to golang offical snappy lib 2017-01-11 12:50:33 +08:00
xtaci c7db48ae11 upd 2017-01-03 12:51:21 +08:00
xtaci de389a8500 upd issue template 2017-01-03 11:01:15 +08:00
xtaci f7474faf19 adjust default rcvwnd from 1024 to 512 2016-12-27 13:34:46 +08:00
4 changed files with 42 additions and 18 deletions
+14
View File
@@ -1,3 +1,15 @@
问问题前先搜索ISSUE,并搞清楚下面的问题:
1. 检查 ```-key xxx``` 至少三遍, ***保证***两边一致。
2. 保证```-nocomp, -datashard, -parityshard, -key, -crypt```两边一致。
3. 是否在服务器端,正确设定了转发的目标服务器地址 ***--target***。
4. 如果第3条不确定,尝试在服务器上telnet target port试试。
5. 防火墙是否关闭了UDP通信。
6. 两端的版本是否一致?
7. 是不是最新版本?
8. 两端分别是什么操作系统?
9. 两端的输出日志是什么?
Before firing issue, make sure you figured out the following common questions.
PLEASE DO SEARCH FIRST.
@@ -11,3 +23,5 @@ PLEASE DO SEARCH FIRST.
7. Are you using the **latest release**?
8. Which **OS** do you use?
9. Which end for this issue related to, **client or server**?
+25 -15
View File
@@ -26,9 +26,17 @@
<p align="center"><img src="kcptun.png" alt="kcptun" height="200px"/></p>
<p align="center"><a href="https://github.com/xtaci/kcptun/releases/latest">立即安装</a></p>
<p align="center"><em>支持macOS/Linux/Windows/FreeBSD/ARM/Raspberry Pi/OpenWrt</em></p>
<p align="right"><a href="https://github.com/xtaci/kcptun/blob/master/README.en.md">ENG</a></p>
<p align="right"><a href="https://github.com/xtaci/kcptun/blob/master/README.en.md">ENGLISH VERSION</a></p>
-
### 手动编译
```
$go get -u github.com/xtaci/kcptun/client
$go get -u github.com/xtaci/kcptun/server
```
注意: 如果出现错误提示,请确保依赖库能正确访问到。
Release中的所有二进制版本,是通过 `build-release.sh` 脚本生成并优化。
### 快速设定
@@ -118,13 +126,23 @@ GLOBAL OPTIONS:
<p align="left"><img src="layeredparams.png" alt="params" height="450px"/></p>
**两端参数必须一致的有**:
* datashard --前向纠错
* parityshard --前向纠错
* nocomp --压缩
* key --密钥
* crypt --加密算法
其余为两边可独立设定的参数
### 内置模式
响应速度:
*fast3 > fast2 >* **[fast]** *> normal > default*
有效载荷比:
*default > normal >* **[fast]** *> fast2 > fast3*
中间mode参数比较均衡,总之就是越快,包重传越激进。
中间-mode参数比较均衡,总之就是越快,包重传越激进。
更高级的 **手动档** 需要理解KCP协议,并通过 **隐藏参数** 调整,例如:
```
-mode manual -nodelay 1 -resend 2 -nc 1 -interval 20
@@ -149,21 +167,10 @@ GLOBAL OPTIONS:
注意:为了发挥FEC最佳效果,设置 parityshard/(parity+datashard) > packet loss,比如5/(5+5) > 30%
### 窗口调整
**两端参数必须一致的有**:
* datashard --前向纠错
* parityshard --前向纠错
* nocomp --压缩
* key --密钥
* crypt --加密算法
其余为两边可独立设定的参数
**简易窗口自我调优方法**
> 第一步:同时在两端逐步增大client rcvwnd和server sndwnd;
> 第二步:尝试下载,观察如果带宽利用率(服务器+客户端两端都要观察)接近物理带宽则停止,否则跳转到第一步。
> 第二步:尝试下载,观察如果带宽利用率(服务器+客户端两端都要观察)到达预期则停止,否则跳转到第一步。
**注意:产生大量重传时,一定是窗口偏大了**
@@ -218,6 +225,8 @@ DSCP差分服务代码点(Differentiated Services Code Point),IETF于1998
> Reference: http://google.github.io/snappy/
压缩对于非加密,非压缩的数据能降低传输数据量,比如点对点的HTTP数据转发。
通过参数 ```-nocomp``` 在两端同时设定以关闭压缩。
> 提示: 关闭压缩可能会降低延迟。
@@ -322,7 +331,8 @@ type Snmp struct {
> 郑H立, 南东风, Li, 七七, 凌君, 昶,LesMiserables, KyOn, 噼里啪啦, 继斌, 小苍辛苦, **Ken**,
> 乔槁, 佳晨, 猪肉佬, lcx, 昊文, 冰峰, 凡, alex, **海豹叔叔**, 奥姐, 张冰, 司成,
> 武子, **慎**Alex43211**Coxxs**,荣,NeroNg,吴骁,定一,我不是林JPatrick, 超, 陈,windfarer, 宇,
> 今晶,斌,晓东,最后一缕阳光
> 今晶,斌,晓东,最后一缕阳光,亮,Ethan,一心不乱,allenm,冬卯,GELATO,用户1Butterfly,光子曲面,
> 丞佳,捉鱼,TalonBiny,李勇,***阿彪***
好人一生平安!
+2 -2
View File
@@ -13,7 +13,7 @@ import (
"golang.org/x/crypto/pbkdf2"
"github.com/klauspost/compress/snappy"
"github.com/golang/snappy"
"github.com/pkg/errors"
"github.com/urfave/cli"
kcp "github.com/xtaci/kcp-go"
@@ -146,7 +146,7 @@ func main() {
},
cli.IntFlag{
Name: "rcvwnd",
Value: 1024,
Value: 512,
Usage: "set receive window size(num of packets)",
},
cli.IntFlag{
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"golang.org/x/crypto/pbkdf2"
"github.com/klauspost/compress/snappy"
"github.com/golang/snappy"
"github.com/urfave/cli"
kcp "github.com/xtaci/kcp-go"
"github.com/xtaci/smux"