-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security Update and KCP Performance Update
- Loading branch information
Showing
25 changed files
with
2,024 additions
and
1,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Set MTU Value | ||
|
||
If the MTU value needs to be specified, it can be calculated by subtracting the IP header size from the MTU value of the network link where the device is located. | ||
|
||
For example, the network for IPoE may have an MTU value of 1500, while the network for PPPoE may have an MTU value of 1492. The size of the IP header is approximately 40 bytes. Thus, KCPTube's MTU value can be calculated as follows: | ||
|
||
- IPoE | ||
- MTU = 1500 - 40 = 1460 | ||
- PPPoE | ||
- MTU = 1492 - 40 = 1452 | ||
|
||
## Transfer VPN data in KCPTube tunnel | ||
|
||
To avoid traffic fragmentation and ensure that each packet transmitted matches the MTU value exactly, the following calculation can be used: | ||
|
||
VPN MTU = KCPTube MTU - KCP Header - KCPTube Header - 2 bytes (tail) | ||
|
||
If encryption options are enabled: | ||
|
||
> VPN MTU = 1440 - 24 - 5 - 2 = 1409 | ||
If encryption options are disabled: | ||
|
||
> VPN MTU = 1440 - 24 - 9 - 2 = 1405 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 设置 MTU 值 | ||
|
||
如果想自行指定 MTU 值,计算的方法是,把设备所在网络链路的 MTU 值减去 IP 头的大小。 | ||
|
||
比如,IPoE 的网络可能是 1500,PPPoE 的网络可能是 1492。然后 IP 头大小约为 40 字节。那么,KCPTube 的 MTU 值可以如下计算: | ||
|
||
- IPoE | ||
- MTU = 1500 - 40 = 1460 | ||
- PPPoE | ||
- MTU = 1492 - 40 = 1452 | ||
|
||
## KCPTube 通道内转发 VPN | ||
|
||
如果想减少流量拆分,使每次发送的数据刚好匹配 MTU 值,那么可以如下计算: | ||
|
||
VPN MTU = KCPTube MTU - KCP Header - KCPTube Header - 2 bytes (tail) | ||
|
||
如果启用了加密选项: | ||
|
||
> VPN MTU = 1440 - 24 - 5 - 2 = 1409 | ||
如果不启用加密选项: | ||
|
||
> VPN MTU = 1440 - 24 - 9 - 2 = 1405 |
Oops, something went wrong.