From 880664c6ab9df410df0ceae85ea221484c175b8c Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Fri, 24 Feb 2023 14:19:50 +0800 Subject: [PATCH] fix: tunnel's inboundTFO missing --- hub/executor/executor.go | 3 ++- listener/tunnel/tcp.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hub/executor/executor.go b/hub/executor/executor.go index 57a9ffe8..916f17c7 100644 --- a/hub/executor/executor.go +++ b/hub/executor/executor.go @@ -148,7 +148,6 @@ func updateListeners(general *config.General, listeners map[string]C.InboundList dialer.DefaultInterface.Store(general.Interface) } - inbound.SetTfo(general.InboundTfo) allowLan := general.AllowLan listener.SetAllowLan(allowLan) @@ -341,6 +340,8 @@ func updateGeneral(general *config.General) { log.Infoln("Use tcp concurrent") } + inbound.SetTfo(general.InboundTfo) + adapter.UnifiedDelay.Store(general.UnifiedDelay) // Avoid reload configuration clean the value, causing traffic loops if listener.GetTunConf().Enable && listener.GetTunConf().AutoDetectInterface { diff --git a/listener/tunnel/tcp.go b/listener/tunnel/tcp.go index bf278c1c..c1d896ad 100644 --- a/listener/tunnel/tcp.go +++ b/listener/tunnel/tcp.go @@ -41,7 +41,7 @@ func (l *Listener) handleTCP(conn net.Conn, in chan<- C.ConnContext, additions . } func New(addr, target, proxy string, in chan<- C.ConnContext, additions ...inbound.Addition) (*Listener, error) { - l, err := net.Listen("tcp", addr) + l, err := inbound.Listen("tcp", addr) if err != nil { return nil, err }