From 187bf2f7bc7e470e70a722794c2fa16bbb410402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 29 Aug 2023 19:43:41 +0800 Subject: [PATCH] Enable `with_ech` by default --- .goreleaser.yaml | 2 ++ Dockerfile | 2 +- Makefile | 2 +- cmd/internal/build_libbox/main.go | 2 +- cmd/internal/update_apple_version/main.go | 3 +-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 45acdd9b..8e434d93 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -16,6 +16,7 @@ builds: - with_quic - with_dhcp - with_wireguard + - with_ech - with_utls - with_reality_server - with_clash_api @@ -51,6 +52,7 @@ builds: - with_quic - with_dhcp - with_wireguard + - with_ech - with_utls - with_clash_api env: diff --git a/Dockerfile b/Dockerfile index 06f21743..89574502 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN set -ex \ && apk add git build-base \ && export COMMIT=$(git rev-parse --short HEAD) \ && export VERSION=$(go run ./cmd/internal/read_tag) \ - && go build -v -trimpath -tags with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api,with_acme \ + && go build -v -trimpath -tags with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_clash_api,with_acme \ -o /go/bin/sing-box \ -ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \ ./cmd/sing-box diff --git a/Makefile b/Makefile index ea3dc42b..2b6b00ce 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ NAME = sing-box COMMIT = $(shell git rev-parse --short HEAD) TAGS_GO118 = with_gvisor,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api -TAGS_GO120 = with_quic +TAGS_GO120 = with_quic,with_ech TAGS ?= $(TAGS_GO118),$(TAGS_GO120) TAGS_TEST ?= with_gvisor,with_quic,with_wireguard,with_grpc,with_ech,with_utls,with_reality_server,with_shadowsocksr diff --git a/cmd/internal/build_libbox/main.go b/cmd/internal/build_libbox/main.go index f6540c85..3bfe862c 100644 --- a/cmd/internal/build_libbox/main.go +++ b/cmd/internal/build_libbox/main.go @@ -54,7 +54,7 @@ func init() { sharedFlags = append(sharedFlags, "-X github.com/sagernet/sing-box/constant.Version="+currentTag+" -s -w -buildid=") debugFlags = append(debugFlags, "-X github.com/sagernet/sing-box/constant.Version="+currentTag) - sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_utls", "with_clash_api") + sharedTags = append(sharedTags, "with_gvisor", "with_quic", "with_wireguard", "with_ech", "with_utls", "with_clash_api") iosTags = append(iosTags, "with_dhcp", "with_low_memory", "with_conntrack") debugTags = append(debugTags, "debug") } diff --git a/cmd/internal/update_apple_version/main.go b/cmd/internal/update_apple_version/main.go index dba81f83..864b788e 100644 --- a/cmd/internal/update_apple_version/main.go +++ b/cmd/internal/update_apple_version/main.go @@ -29,8 +29,7 @@ func main() { newContent, updated0 := findAndReplace(objectsMap, projectContent, []string{"io.nekohasekai.sfa"}, newVersion.VersionString()) newContent, updated1 := findAndReplace(objectsMap, newContent, []string{"io.nekohasekai.sfa.independent", "io.nekohasekai.sfa.system"}, newVersion.String()) if updated0 || updated1 { - log.Info("updated version to ", newVersion.VersionString()) - common.Must(os.WriteFile("sing-box.xcodeproj/project.pbxproj.bak", []byte(projectContent), 0o644)) + log.Info("updated version to ", newVersion.VersionString(), " (", newVersion.String(), ")") common.Must(os.WriteFile("sing-box.xcodeproj/project.pbxproj", []byte(newContent), 0o644)) } else { log.Info("version not changed")