From e8b9001573ca70231773708811248c59b0120fd5 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 2 Aug 2024 23:06:04 +0100 Subject: [PATCH] Use full MTU, disable PMTUD --- yggquic.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yggquic.go b/yggquic.go index d9517de..7bb8f8f 100644 --- a/yggquic.go +++ b/yggquic.go @@ -55,8 +55,10 @@ type yggdrasilDial struct { func New(ygg *core.Core, cert tls.Certificate, qc *quic.Config) (*YggdrasilTransport, error) { if qc == nil { qc = &quic.Config{ - HandshakeIdleTimeout: time.Second * 5, - MaxIdleTimeout: time.Second * 60, + HandshakeIdleTimeout: time.Second * 5, + MaxIdleTimeout: time.Second * 60, + InitialPacketSize: uint16(ygg.MTU()), + DisablePathMTUDiscovery: true, } } tr := &YggdrasilTransport{