From 1bd3a9144d1d40b1e40b1d17aa9710b3b3f608aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 7 Feb 2023 18:06:25 +0800 Subject: [PATCH] Upgrade tfo-go --- common/dialer/default.go | 3 +-- common/dialer/tfo.go | 3 +-- go.mod | 2 +- go.sum | 4 ++-- inbound/default_tcp.go | 3 +-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/common/dialer/default.go b/common/dialer/default.go index d46bd2e5..be22380b 100644 --- a/common/dialer/default.go +++ b/common/dialer/default.go @@ -13,8 +13,7 @@ import ( E "github.com/sagernet/sing/common/exceptions" M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" - - "github.com/database64128/tfo-go/v2" + "github.com/sagernet/tfo-go" ) var warnBindInterfaceOnUnsupportedPlatform = warning.New( diff --git a/common/dialer/tfo.go b/common/dialer/tfo.go index 0b7c0889..70f97386 100644 --- a/common/dialer/tfo.go +++ b/common/dialer/tfo.go @@ -12,8 +12,7 @@ import ( E "github.com/sagernet/sing/common/exceptions" M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" - - "github.com/database64128/tfo-go/v2" + "github.com/sagernet/tfo-go" ) type slowOpenConn struct { diff --git a/go.mod b/go.mod index 4f8545c5..29b7f747 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,6 @@ require ( github.com/Dreamacro/clash v1.13.0 github.com/caddyserver/certmagic v0.17.2 github.com/cretz/bine v0.2.0 - github.com/database64128/tfo-go/v2 v2.0.2 github.com/dustin/go-humanize v1.0.1 github.com/fsnotify/fsnotify v1.6.0 github.com/go-chi/chi/v5 v5.0.8 @@ -29,6 +28,7 @@ require ( github.com/sagernet/sing-tun v0.1.1 github.com/sagernet/sing-vmess v0.1.1-0.20230207064843-983dde690564 github.com/sagernet/smux v0.0.0-20220831015742-e0f1988e3195 + github.com/sagernet/tfo-go v0.0.0-20230207095944-549363a7327d github.com/sagernet/websocket v0.0.0-20220913015213-615516348b4e github.com/sagernet/wireguard-go v0.0.0-20221116151939-c99467f53f2c github.com/spf13/cobra v1.6.1 diff --git a/go.sum b/go.sum index 600eaf11..1e732c41 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/cretz/bine v0.1.0/go.mod h1:6PF6fWAvYtwjRGkAuDEJeWNOv3a2hUouSP/yRYXmvHw= github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo= github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI= -github.com/database64128/tfo-go/v2 v2.0.2 h1:5rGgkJeLEKlNaqredfrPQNLnctn1b+1fq/8tdKdOzJg= -github.com/database64128/tfo-go/v2 v2.0.2/go.mod h1:FDdt4JaAsRU66wsYHxSVytYimPkKIHupVsxM+5DhvjY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -117,6 +115,8 @@ github.com/sagernet/sing-vmess v0.1.1-0.20230207064843-983dde690564 h1:+CFee8wEc github.com/sagernet/sing-vmess v0.1.1-0.20230207064843-983dde690564/go.mod h1:9KkmnQzTL4Gvv8U2TRAH2BOITCGsGPpHtUPP5sxn5sY= github.com/sagernet/smux v0.0.0-20220831015742-e0f1988e3195 h1:5VBIbVw9q7aKbrFdT83mjkyvQ+VaRsQ6yflTepfln38= github.com/sagernet/smux v0.0.0-20220831015742-e0f1988e3195/go.mod h1:yedWtra8nyGJ+SyI+ziwuaGMzBatbB10P1IOOZbbSK8= +github.com/sagernet/tfo-go v0.0.0-20230207095944-549363a7327d h1:trP/l6ZPWvQ/5Gv99Z7/t/v8iYy06akDMejxW1sznUk= +github.com/sagernet/tfo-go v0.0.0-20230207095944-549363a7327d/go.mod h1:jk6Ii8Y3En+j2KQDLgdgQGwb3M6y7EL567jFnGYhN9g= github.com/sagernet/websocket v0.0.0-20220913015213-615516348b4e h1:7uw2njHFGE+VpWamge6o56j2RWk4omF6uLKKxMmcWvs= github.com/sagernet/websocket v0.0.0-20220913015213-615516348b4e/go.mod h1:45TUl8+gH4SIKr4ykREbxKWTxkDlSzFENzctB1dVRRY= github.com/sagernet/wireguard-go v0.0.0-20221116151939-c99467f53f2c h1:vK2wyt9aWYHHvNLWniwijBu/n4pySypiKRhN32u/JGo= diff --git a/inbound/default_tcp.go b/inbound/default_tcp.go index 6ea9f3d1..c089336b 100644 --- a/inbound/default_tcp.go +++ b/inbound/default_tcp.go @@ -11,8 +11,7 @@ import ( E "github.com/sagernet/sing/common/exceptions" M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" - - "github.com/database64128/tfo-go/v2" + "github.com/sagernet/tfo-go" ) func (a *myInboundAdapter) ListenTCP() (net.Listener, error) {