TUN-5623: Configure quic max datagram frame size to 1350 bytes for none Windows platforms

This commit is contained in:
cthuang
2022-01-06 12:17:10 +00:00
parent ef3152f334
commit 6fa58aadba
44 changed files with 11652 additions and 57 deletions

11
quic/param_windows.go Normal file
View File

@@ -0,0 +1,11 @@
//go:build windows
package quic
const (
// Due to https://github.com/lucas-clemente/quic-go/issues/3273, MTU discovery is disabled on Windows
// 1220 is the default value https://github.com/lucas-clemente/quic-go/blob/84e03e59760ceee37359688871bb0688fcc4e98f/internal/protocol/params.go#L138
MaxDatagramFrameSize = 1220
// 3 more bytes are reserved at https://github.com/lucas-clemente/quic-go/blob/v0.24.0/internal/wire/datagram_frame.go#L61
maxDatagramPayloadSize = MaxDatagramFrameSize - 3 - sessionIDLen
)