Skip to content

Commit

Permalink
add quic-go-disable-gso and quic-go-disable-ecn to experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Oct 1, 2023
1 parent f5168f1 commit 1ec2ce1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ type Sniffer struct {
// Experimental config
type Experimental struct {
UDPFallbackMatch bool `yaml:"udp-fallback-match"`
QUICGoDisableGSO bool `yaml:"quic-go-disable-gso"`
QUICGoDisableECN bool `yaml:"quic-go-disable-ecn"`
}

// Config is clash config manager
Expand Down Expand Up @@ -446,7 +448,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
AllowLan: cfg.AllowLan,
BindAddress: cfg.BindAddress,
InboundTfo: cfg.InboundTfo,
InboundMPTCP: cfg.InboundMPTCP,
InboundMPTCP: cfg.InboundMPTCP,
},
Controller: Controller{
ExternalController: cfg.ExternalController,
Expand All @@ -465,7 +467,7 @@ func parseGeneral(cfg *RawConfig) (*General, error) {
TouchAfterLazyPassNum: cfg.TouchAfterLazyPassNum,
PreResolveProcessName: cfg.PreResolveProcessName,
TCPConcurrent: cfg.TCPConcurrent,
KeepAliveInterval: cfg.KeepAliveInterval,
KeepAliveInterval: cfg.KeepAliveInterval,
}, nil
}

Expand Down
7 changes: 7 additions & 0 deletions hub/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"net/netip"
"os"
"strconv"
"sync"

"github.com/Dreamacro/clash/adapter"
Expand Down Expand Up @@ -165,6 +166,12 @@ func updateListeners(listeners map[string]C.InboundListener) {

func updateExperimental(c *config.Config) {
tunnel.UDPFallbackMatch.Store(c.Experimental.UDPFallbackMatch)
if c.Experimental.QUICGoDisableGSO {
_ = os.Setenv("QUIC_GO_DISABLE_GSO", strconv.FormatBool(true))
}
if c.Experimental.QUICGoDisableECN {
_ = os.Setenv("QUIC_GO_DISABLE_ECN", strconv.FormatBool(true))
}
}

func updateDNS(c *config.DNS) {
Expand Down

0 comments on commit 1ec2ce1

Please sign in to comment.