Skip to content

Commit

Permalink
feat: Add disable quic-go GSO to experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
H1JK committed Sep 8, 2023
1 parent 7286391 commit 90acce7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions hub/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 90acce7

Please sign in to comment.