From 07f80c9ebfba2bdb83ec42c195b58c9b2c95d24b Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 20 Mar 2024 18:21:17 +0700 Subject: [PATCH] cmd/cli: disable quic-go's ECN support by default It may cause issues on some OS-es. See: https://github.com/quic-go/quic-go/issues/3911 --- cmd/cli/prog_linux.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/cli/prog_linux.go b/cmd/cli/prog_linux.go index 2b9c69df..cdb3c0e7 100644 --- a/cmd/cli/prog_linux.go +++ b/cmd/cli/prog_linux.go @@ -1,6 +1,8 @@ package cli import ( + "os" + "github.com/kardianos/service" "github.com/Control-D-Inc/ctrld/internal/dns" @@ -10,6 +12,10 @@ func init() { if r, err := dns.NewOSConfigurator(func(format string, args ...any) {}, "lo"); err == nil { useSystemdResolved = r.Mode() == "systemd-resolved" } + // Disable quic-go's ECN support by default, see https://github.com/quic-go/quic-go/issues/3911 + if os.Getenv("QUIC_GO_DISABLE_ECN") == "" { + os.Setenv("QUIC_GO_DISABLE_ECN", "true") + } } func setDependencies(svc *service.Config) {