feat(vpn): path MTU discovery to find the best MTU (#2586)

This commit is contained in:
Quentin McGaw
2026-01-21 18:02:23 +01:00
committed by GitHub
parent fba60af772
commit de38d759a4
20 changed files with 982 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
//go:build linux
package pmtud
import (
"syscall"
)
func setDontFragment(fd uintptr) (err error) {
return syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP,
syscall.IP_MTU_DISCOVER, syscall.IP_PMTUDISC_PROBE)
}