Skip to content

Commit 2d17abe

Browse files
committed
Update tfo-go to latest
1 parent c65c2ab commit 2d17abe

File tree

10 files changed

+14
-11
lines changed

10 files changed

+14
-11
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
- name: Set build tags
147147
run: |
148148
set -xeuo pipefail
149-
TAGS='with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname'
149+
TAGS='with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname,tfogo_checklinkname0'
150150
echo "BUILD_TAGS=${TAGS}" >> "${GITHUB_ENV}"
151151
- name: Build
152152
if: matrix.os != 'android'

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- name: Set build tags
8686
run: |
8787
set -xeuo pipefail
88-
TAGS='with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname'
88+
TAGS='with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname,tfogo_checklinkname0'
8989
echo "BUILD_TAGS=${TAGS}" >> "${GITHUB_ENV}"
9090
- name: Build
9191
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN set -ex \
1313
&& export COMMIT=$(git rev-parse --short HEAD) \
1414
&& export VERSION=$(go run ./cmd/internal/read_tag) \
1515
&& go build -v -trimpath -tags \
16-
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname" \
16+
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname,tfogo_checklinkname0" \
1717
-o /go/bin/sing-box \
1818
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid= -checklinkname=0" \
1919
./cmd/sing-box

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME = sing-box
22
COMMIT = $(shell git rev-parse --short HEAD)
3-
TAGS ?= with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname
3+
TAGS ?= with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,badlinkname,tfogo_checklinkname0
44

55
GOHOSTOS = $(shell go env GOHOSTOS)
66
GOHOSTARCH = $(shell go env GOHOSTARCH)

cmd/internal/build_libbox/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func init() {
6262
sharedFlags = append(sharedFlags, "-ldflags", "-X github.com/sagernet/sing-box/constant.Version="+currentTag+" -s -w -buildid= -checklinkname=0")
6363
debugFlags = append(debugFlags, "-ldflags", "-X github.com/sagernet/sing-box/constant.Version="+currentTag+" -checklinkname=0")
6464

65-
sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_utls", "with_clash_api", "with_conntrack", "badlinkname")
65+
sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_utls", "with_clash_api", "with_conntrack", "badlinkname", "tfogo_checklinkname0")
6666
macOSTags = append(macOSTags, "with_dhcp")
6767
memcTags = append(memcTags, "with_tailscale")
6868
notMemcTags = append(notMemcTags, "with_low_memory")

common/dialer/default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
N "github.com/sagernet/sing/common/network"
2222
"github.com/sagernet/sing/service"
2323

24-
"github.com/metacubex/tfo-go"
24+
"github.com/database64128/tfo-go/v2"
2525
)
2626

2727
var (

common/dialer/tfo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
M "github.com/sagernet/sing/common/metadata"
1515
N "github.com/sagernet/sing/common/network"
1616

17-
"github.com/metacubex/tfo-go"
17+
"github.com/database64128/tfo-go/v2"
1818
)
1919

2020
type slowOpenConn struct {

common/listener/listener_tcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
N "github.com/sagernet/sing/common/network"
1818
"github.com/sagernet/sing/service"
1919

20-
"github.com/metacubex/tfo-go"
20+
"github.com/database64128/tfo-go/v2"
2121
)
2222

2323
func (l *Listener) ListenTCP() (net.Listener, error) {

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/caddyserver/certmagic v0.23.0
88
github.com/coder/websocket v1.8.13
99
github.com/cretz/bine v0.2.0
10+
github.com/database64128/tfo-go/v2 v2.2.2
1011
github.com/go-chi/chi/v5 v5.2.2
1112
github.com/go-chi/render v1.0.3
1213
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466
@@ -15,7 +16,6 @@ require (
1516
github.com/libdns/alidns v1.0.5-libdns.v1.beta1
1617
github.com/libdns/cloudflare v0.2.2-0.20250708034226-c574dccb31a6
1718
github.com/logrusorgru/aurora v2.0.3+incompatible
18-
github.com/metacubex/tfo-go v0.0.0-20250516165257-e29c16ae41d4
1919
github.com/metacubex/utls v1.8.0
2020
github.com/mholt/acmez/v3 v3.1.2
2121
github.com/miekg/dns v1.1.67
@@ -66,6 +66,7 @@ require (
6666
github.com/caddyserver/zerossl v0.1.3 // indirect
6767
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
6868
github.com/coreos/go-iptables v0.7.1-0.20240112124308-65c67c9f46e6 // indirect
69+
github.com/database64128/netx-go v0.0.0-20240905055117-62795b8b054a // indirect
6970
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
7071
github.com/dblohm7/wingoes v0.0.0-20240119213807-a09d6be7affa // indirect
7172
github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ github.com/coreos/go-iptables v0.7.1-0.20240112124308-65c67c9f46e6/go.mod h1:Qe8
2525
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
2626
github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo=
2727
github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI=
28+
github.com/database64128/netx-go v0.0.0-20240905055117-62795b8b054a h1:t4SDi0pmNkryzKdM4QF3o5vqSP4GRjeZD/6j3nyxNP0=
29+
github.com/database64128/netx-go v0.0.0-20240905055117-62795b8b054a/go.mod h1:7K2NQKbabB5mBl41vF6YayYl5g7YpDwc4dQ5iMpP3Lg=
30+
github.com/database64128/tfo-go/v2 v2.2.2 h1:BxynF4qGF5ct3DpPLEG62uyJZ3LQhqaf0Ken+kyy7PM=
31+
github.com/database64128/tfo-go/v2 v2.2.2/go.mod h1:2IW8jppdBwdVMjA08uEyMNnqiAHKUlqAA+J8NrsfktY=
2832
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2933
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3034
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -112,8 +116,6 @@ github.com/mdlayher/sdnotify v1.0.0 h1:Ma9XeLVN/l0qpyx1tNeMSeTjCPH6NtuD6/N9XdTlQ
112116
github.com/mdlayher/sdnotify v1.0.0/go.mod h1:HQUmpM4XgYkhDLtd+Uad8ZFK1T9D5+pNxnXQjCeJlGE=
113117
github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos=
114118
github.com/mdlayher/socket v0.5.1/go.mod h1:TjPLHI1UgwEv5J1B5q0zTZq12A/6H7nKmtTanQE37IQ=
115-
github.com/metacubex/tfo-go v0.0.0-20250516165257-e29c16ae41d4 h1:j1VRTiC9JLR4nUbSikx9OGdu/3AgFDqgcLj4GoqyQkc=
116-
github.com/metacubex/tfo-go v0.0.0-20250516165257-e29c16ae41d4/go.mod h1:l9oLnLoEXyGZ5RVLsh7QCC5XsouTUyKk4F2nLm2DHLw=
117119
github.com/metacubex/utls v1.8.0 h1:mSYi6FMnmc5riARl5UZDmWVy710z+P5b7xuGW0lV9ac=
118120
github.com/metacubex/utls v1.8.0/go.mod h1:FdjYzVfCtgtna19hX0ER1Xsa5uJInwdQ4IcaaI98lEQ=
119121
github.com/mholt/acmez/v3 v3.1.2 h1:auob8J/0FhmdClQicvJvuDavgd5ezwLBfKuYmynhYzc=

0 commit comments

Comments
 (0)