1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-12 12:50:28 +08:00

fix: use nic mtu that minus packet header

This commit is contained in:
源文雨
2024-08-03 16:42:16 +08:00
parent bafeb149be
commit cf2daf9a3e
10 changed files with 46 additions and 38 deletions

View File

@@ -15,7 +15,7 @@ type Config struct {
PrivateKey string `yaml:"PrivateKey"`
Network string `yaml:"Network"` // Network udp, tcp or ws (WIP)
EndPoint string `yaml:"EndPoint"`
MTU int64 `yaml:"MTU"`
MTU int64 `yaml:"MTU"` // MTU of nic (will minus packet header len)
SpeedLoop uint16 `yaml:"SpeedLoop"`
Mask uint64 `yaml:"Mask"` // Mask 是异或报文所用掩码, 必须保证各端统一
Peers []Peer `yaml:"Peers"`
@@ -34,7 +34,7 @@ type Peer struct {
AllowTrans bool `yaml:"AllowTrans"`
UseZstd bool `yaml:"UseZstd"`
DoublePacket bool `yaml:"DoublePacket"`
MTU int64 `yaml:"MTU"`
MTU int64 `yaml:"MTU"` // MTU of PDU passed to p2p
MTURandomRange int64 `yaml:"MTURandomRange"`
}