diff --git a/config/config.go b/config/config.go index 56c616d0..db021618 100644 --- a/config/config.go +++ b/config/config.go @@ -156,7 +156,8 @@ type Sniffer struct { // Experimental config type Experimental struct { - Fingerprints []string `yaml:"fingerprints"` + Fingerprints []string `yaml:"fingerprints"` + QUICGoDisableGSO bool `yaml:"quic-go-disable-gso"` } // Config is clash config manager diff --git a/docs/config.yaml b/docs/config.yaml index cd540311..ada57905 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -55,6 +55,13 @@ keep-alive-interval: 15 # routing-mark:6666 # 配置 fwmark 仅用于 Linux experimental: + # Disable quic-go GSO support. This may result in reduced performance on Linux. + # This is not recommended for most users. + # Only users encountering issues with quic-go's internal implementation should enable this, + # and they should disable it as soon as the issue is resolved. + # This field will be removed when quic-go fixes all their issues in GSO. + # This equivalent to the environment variable QUIC_GO_DISABLE_GSO=1. + #quic-go-disable-gso: true # 类似于 /etc/hosts, 仅支持配置单个 IP hosts: diff --git a/hub/executor/executor.go b/hub/executor/executor.go index f4364b7b..b840ba48 100644 --- a/hub/executor/executor.go +++ b/hub/executor/executor.go @@ -181,6 +181,9 @@ func updateListeners(general *config.General, listeners map[string]C.InboundList } func updateExperimental(c *config.Config) { + if c.Experimental.QUICGoDisableGSO { + _ = os.Setenv("QUIC_GO_DISABLE_GSO", "1") + } } func updateNTP(c *config.NTP) {