From fe1aa955f7b5f0006f733fb7dfb22ebcef1d4b91 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Thu, 21 Dec 2023 11:01:04 +0800 Subject: [PATCH] remove tfo support --- go.mod | 1 - go.sum | 2 -- listener/listener.go | 4 +--- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e433175..0b828f4 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/gobwas/pool v0.2.1 github.com/gobwas/ws v1.3.1 github.com/gofrs/uuid/v5 v5.0.0 - github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6 github.com/zhangyunhao116/fastrand v0.3.0 golang.org/x/crypto v0.17.0 golang.org/x/net v0.19.0 diff --git a/go.sum b/go.sum index 776ae42..3deb9e3 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,6 @@ github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6 h1:z3SJQhVyU63FT26Wn/UByW6b7q8QKB0ZkPqsyqcz2PI= -github.com/sagernet/tfo-go v0.0.0-20231209031829-7b5343ac1dc6/go.mod h1:73xRZuxwkFk4aiLw28hG8W6o9cr2UPrGL9pdY2UTbvY= github.com/zhangyunhao116/fastrand v0.3.0 h1:7bwe124xcckPulX6fxtr2lFdO2KQqaefdtbk+mqO/Ig= github.com/zhangyunhao116/fastrand v0.3.0/go.mod h1:0v5KgHho0VE6HU192HnY15de/oDS8UrbBChIFjIhBtc= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= diff --git a/listener/listener.go b/listener/listener.go index 29d992d..0743cf2 100644 --- a/listener/listener.go +++ b/listener/listener.go @@ -9,8 +9,6 @@ import ( "github.com/wwqgtxx/wstunnel/config" "github.com/wwqgtxx/wstunnel/fallback" "github.com/wwqgtxx/wstunnel/peek" - - "github.com/sagernet/tfo-go" ) type Config struct { @@ -75,7 +73,7 @@ func (l *tcpListener) loop() { } func ListenTcp(listenerConfig Config) (net.Listener, error) { - lc := tfo.ListenConfig{} + lc := net.ListenConfig{} lc.SetMultipathTCP(true) netLn, err := lc.Listen(context.Background(), "tcp", listenerConfig.BindAddress) if err != nil {