From c6873c5c04ed9538f45836e1912ea16027fc0632 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Wed, 29 Mar 2023 13:35:29 +0800 Subject: [PATCH] chore: add `no_fake_tcp` complie option --- constant/features/no_doq.go | 7 ------- constant/features/no_fake_tcp.go | 7 +++++++ constant/features/no_gvisor.go | 7 ------- transport/hysteria/conns/faketcp/tcp_linux.go | 2 +- transport/hysteria/conns/faketcp/tcp_stub.go | 2 +- 5 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 constant/features/no_doq.go create mode 100644 constant/features/no_fake_tcp.go delete mode 100644 constant/features/no_gvisor.go diff --git a/constant/features/no_doq.go b/constant/features/no_doq.go deleted file mode 100644 index c915272f..00000000 --- a/constant/features/no_doq.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build no_doq - -package features - -func init() { - TAGS = append(TAGS, "no_doq") -} diff --git a/constant/features/no_fake_tcp.go b/constant/features/no_fake_tcp.go new file mode 100644 index 00000000..f536a066 --- /dev/null +++ b/constant/features/no_fake_tcp.go @@ -0,0 +1,7 @@ +//go:build no_fake_tcp + +package features + +func init() { + TAGS = append(TAGS, "no_fake_tcp") +} diff --git a/constant/features/no_gvisor.go b/constant/features/no_gvisor.go deleted file mode 100644 index d0d5391a..00000000 --- a/constant/features/no_gvisor.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build no_gvisor - -package features - -func init() { - TAGS = append(TAGS, "no_gvisor") -} diff --git a/transport/hysteria/conns/faketcp/tcp_linux.go b/transport/hysteria/conns/faketcp/tcp_linux.go index dadb0912..a3591cf8 100644 --- a/transport/hysteria/conns/faketcp/tcp_linux.go +++ b/transport/hysteria/conns/faketcp/tcp_linux.go @@ -1,4 +1,4 @@ -//go:build linux +//go:build linux && !no_fake_tcp // +build linux package faketcp diff --git a/transport/hysteria/conns/faketcp/tcp_stub.go b/transport/hysteria/conns/faketcp/tcp_stub.go index 9bc55077..53413867 100644 --- a/transport/hysteria/conns/faketcp/tcp_stub.go +++ b/transport/hysteria/conns/faketcp/tcp_stub.go @@ -1,4 +1,4 @@ -//go:build !linux +//go:build !linux || no_fake_tcp // +build !linux package faketcp