feat: Add disable quic-go GSO to experimental

This commit is contained in:
H1JK 2023-09-08 22:58:59 +08:00
parent 7286391883
commit 90acce7fa1
3 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -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:

View file

@ -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) {