From e7f774001ad0c24e7a72ec7f4e306b107e3729f5 Mon Sep 17 00:00:00 2001 From: mzz <2017@duck.com> Date: Fri, 11 Aug 2023 09:19:32 +0800 Subject: [PATCH 1/7] fix: rebinding wg/tun not work (#271) --- control/control_plane.go | 7 +------ control/control_plane_core.go | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/control/control_plane.go b/control/control_plane.go index 32886dc..5bd9eea 100644 --- a/control/control_plane.go +++ b/control/control_plane.go @@ -8,7 +8,6 @@ package control import ( "context" "fmt" - "github.com/daeuniverse/softwind/transport/meek" "net" "net/netip" "os" @@ -36,6 +35,7 @@ import ( "github.com/daeuniverse/softwind/pool" "github.com/daeuniverse/softwind/protocol/direct" "github.com/daeuniverse/softwind/transport/grpc" + "github.com/daeuniverse/softwind/transport/meek" dnsmessage "github.com/miekg/dns" "github.com/mohae/deepcopy" "github.com/sirupsen/logrus" @@ -190,11 +190,6 @@ func NewControlPlane( } /// Bind to links. Binding should be advance of dialerGroups to avoid un-routable old connection. - // Add clsact qdisc - for _, ifname := range common.Deduplicate(append(append([]string{}, global.LanInterface...), global.WanInterface...)) { - _ = core.addQdisc(ifname) - _ = core.mapLinkType(ifname) - } // Bind to LAN if len(global.LanInterface) > 0 { if err = core.setupRoutingPolicy(); err != nil { diff --git a/control/control_plane_core.go b/control/control_plane_core.go index 02fbae7..391be0a 100644 --- a/control/control_plane_core.go +++ b/control/control_plane_core.go @@ -425,6 +425,8 @@ func (c *controlPlaneCore) _bindLan(ifname string) error { if err = CheckSendRedirects(ifname); err != nil { return err } + _ = c.addQdisc(ifname) + _ = c.mapLinkType(ifname) /// Insert an elem into IfindexParamsMap. ifParams, err := getIfParamsFromLink(link) if err != nil { @@ -564,6 +566,9 @@ func (c *controlPlaneCore) _bindWan(ifname string) error { if link.Attrs().Index == consts.LoopbackIfIndex { return fmt.Errorf("cannot bind to loopback interface") } + _ = c.addQdisc(ifname) + _ = c.mapLinkType(ifname) + /// Insert an elem into IfindexParamsMap. ifParams, err := getIfParamsFromLink(link) if err != nil { From 3ee7b63d241c5ca07e969c10c09d83eb88cc2a9b Mon Sep 17 00:00:00 2001 From: shenghuang147 <65714801+shenghuang147@users.noreply.github.com> Date: Fri, 11 Aug 2023 17:59:06 +0800 Subject: [PATCH 2/7] chore: amd64 and arm64 use PIE build mode by default (#272) --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fbd390f..44c5fbd 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ else ifeq ($(wildcard $(STRIP_PATH)),) else STRIP_FLAG := -strip=$(STRIP_PATH) endif +GOARCH ?= $(shell go env GOARCH) # Do NOT remove the line below. This line is for CI. #export GOMODCACHE=$(PWD)/go-mod @@ -36,7 +37,12 @@ else VERSION ?= unstable-$(date).r$(count).$(commit) endif -BUILD_ARGS := -trimpath -ldflags "-s -w -X github.com/daeuniverse/dae/cmd.Version=$(VERSION) -X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=$(MAX_MATCH_SET_LEN)" $(BUILD_ARGS) +# amd64 and arm64 use PIE build mode by default +ifeq ($(GOARCH),$(filter $(GOARCH),amd64 arm64)) + BUILD_MODE ?= -buildmode=pie +endif + +BUILD_ARGS := -trimpath -ldflags "-s -w -X github.com/daeuniverse/dae/cmd.Version=$(VERSION) -X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=$(MAX_MATCH_SET_LEN)" $(BUILD_MODE) $(BUILD_ARGS) .PHONY: clean-ebpf ebpf dae submodule submodules From 4e71d68a3556a7e574589615e4017838e75adbe0 Mon Sep 17 00:00:00 2001 From: shenghuang147 <65714801+shenghuang147@users.noreply.github.com> Date: Sat, 12 Aug 2023 20:25:01 +0800 Subject: [PATCH 3/7] ci/chore: remove the buildmode specified in CI (#273) --- .github/workflows/prerelease.yml | 11 ++--------- .github/workflows/release.yml | 11 ++--------- .github/workflows/seed-build.yml | 11 ++--------- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index c4ddf6b..69e271d 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -13,12 +13,9 @@ jobs: strategy: matrix: goos: [ linux ] - goarch: [ 386, riscv64, mips64, mips64le, mipsle, mips ] + goarch: [ arm64, 386, riscv64, mips64, mips64le, mipsle, mips ] include: - # BEGIN Linux ARM 5 6 7 64 - - goos: linux - goarch: arm64 - buildargs: -buildmode=pie + # BEGIN Linux ARM 5 6 7 - goos: linux goarch: arm goarm: 7 @@ -33,15 +30,12 @@ jobs: - goos: linux goarch: amd64 goamd64: v1 - buildargs: -buildmode=pie - goos: linux goarch: amd64 goamd64: v2 - buildargs: -buildmode=pie - goos: linux goarch: amd64 goamd64: v3 - buildargs: -buildmode=pie # END Linux AMD64 v1 v2 v3 fail-fast: false @@ -52,7 +46,6 @@ jobs: GOARM: ${{ matrix.goarm }} GOAMD64: ${{ matrix.goamd64 }} CGO_ENABLED: 0 - BUILD_ARGS: ${{ matrix.buildargs }} steps: - name: Checkout codebase diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b497b97..41f8669 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,9 @@ jobs: strategy: matrix: goos: [ linux ] - goarch: [ 386, riscv64, mips64, mips64le, mipsle, mips ] + goarch: [ arm64, 386, riscv64, mips64, mips64le, mipsle, mips ] include: - # BEGIN Linux ARM 5 6 7 64 - - goos: linux - goarch: arm64 - buildargs: -buildmode=pie + # BEGIN Linux ARM 5 6 7 - goos: linux goarch: arm goarm: 7 @@ -33,15 +30,12 @@ jobs: - goos: linux goarch: amd64 goamd64: v1 - buildargs: -buildmode=pie - goos: linux goarch: amd64 goamd64: v2 - buildargs: -buildmode=pie - goos: linux goarch: amd64 goamd64: v3 - buildargs: -buildmode=pie # END Linux AMD64 v1 v2 v3 fail-fast: false @@ -52,7 +46,6 @@ jobs: GOARM: ${{ matrix.goarm }} GOAMD64: ${{ matrix.goamd64 }} CGO_ENABLED: 0 - BUILD_ARGS: ${{ matrix.buildargs }} steps: - name: Checkout codebase diff --git a/.github/workflows/seed-build.yml b/.github/workflows/seed-build.yml index 84cd84b..7456753 100644 --- a/.github/workflows/seed-build.yml +++ b/.github/workflows/seed-build.yml @@ -30,12 +30,9 @@ jobs: strategy: matrix: goos: [ linux ] - goarch: [ 386, riscv64, mips64, mips64le, mipsle, mips ] + goarch: [ arm64, 386, riscv64, mips64, mips64le, mipsle, mips ] include: - # BEGIN Linux ARM 5 6 7 64 - - goos: linux - goarch: arm64 - buildargs: -buildmode=pie + # BEGIN Linux ARM 5 6 7 - goos: linux goarch: arm goarm: 7 @@ -50,15 +47,12 @@ jobs: - goos: linux goarch: amd64 goamd64: v1 - buildargs: -buildmode=pie - goos: linux goarch: amd64 goamd64: v2 - buildargs: -buildmode=pie - goos: linux goarch: amd64 goamd64: v3 - buildargs: -buildmode=pie # END Linux AMD64 v1 v2 v3 fail-fast: false @@ -69,7 +63,6 @@ jobs: GOARM: ${{ matrix.goarm }} GOAMD64: ${{ matrix.goamd64 }} CGO_ENABLED: 0 - BUILD_ARGS: ${{ matrix.buildargs }} steps: - name: Checkout codebase From 307d70a789fcc79cb8e228019174604687c980bc Mon Sep 17 00:00:00 2001 From: kev <31861128+yqlbu@users.noreply.github.com> Date: Sun, 13 Aug 2023 22:22:34 +0800 Subject: [PATCH 4/7] ci(release): draft release v0.2.4 (#277) Co-authored-by: dae-bot[bot] <136105375+dae-bot[bot]@users.noreply.github.com> --- CHANGELOGS.md | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 09dec19..38f0350 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -13,9 +13,9 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. ## Releases -- [v0.2.4rc2 (Pre-release)](#v024rc2-pre-release) -- [v0.2.4rc1 (Pre-release)](#v024rc1-pre-release) -- [v0.2.3 (Latest)](#v023-latest) + +- [v0.2.4 (Latest)](#v024-latest) +- [v0.2.3](#v023) - [v0.2.2](#v022) - [v0.2.1](#v021) - [v0.2.0](#v020) @@ -34,39 +34,20 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. - [v0.1.0](#v010) -### v0.2.4rc2 (Pre-release) +### v0.2.4 (Latest) -> Release date: 2023/08/05 +> Release date: 2023/08/13 ### Features - feat(juicity): support certificate pinning in [#256](https://github.com/daeuniverse/dae/pull/256) by (@mzz2017) +- optimize: force to choose one if there is only one node in the group in [#251](https://github.com/daeuniverse/dae/pull/251) by (@mzz2017) +- feat: support juicity in [#248](https://github.com/daeuniverse/dae/pull/248) by (@mzz2017) ### Bug Fixes - fix: bad ipversion selection caused by #251 in [#257](https://github.com/daeuniverse/dae/pull/257) by (@mzz2017) -### 特性支持 - -- 特性(juicity): 支持证书固定 (Certificate Pinning) in [#256](https://github.com/daeuniverse/dae/pull/256) by (@mzz2017) - -### 问题修复 - -- 修复: 由 #251 导致的错误的 IP 版本选择 in [#257](https://github.com/daeuniverse/dae/pull/257) by (@mzz2017) - -**Example Config**: https://github.com/daeuniverse/dae/blob/v0.2.4rc2/example.dae - -**Full Changelog**: https://github.com/daeuniverse/dae/compare/v0.2.4rc1...v0.2.4rc2 - -### v0.2.4rc1 (Pre-release) - -> Release date: 2023/08/03 - -### Features - -- optimize: force to choose one if there is only one node in the group in [#251](https://github.com/daeuniverse/dae/pull/251) by (@mzz2017) -- feat: support juicity in [#248](https://github.com/daeuniverse/dae/pull/248) by (@mzz2017) - ### Others - ci(release): add entry for release-v0.2.3 in [#253](https://github.com/daeuniverse/dae/pull/253) by (@yqlbu) @@ -78,9 +59,14 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. ### 特性支持 +- 特性(juicity): 支持证书固定 (Certificate Pinning) in [#256](https://github.com/daeuniverse/dae/pull/256) by (@mzz2017) - 优化: 在组中只有一个节点时强制选择该节点 in [#251](https://github.com/daeuniverse/dae/pull/251) by (@mzz2017) - 特性: 支持 juicity in [#248](https://github.com/daeuniverse/dae/pull/248) by (@mzz2017) +### 问题修复 + +- 修复: 由 #251 导致的错误的 IP 版本选择 in [#257](https://github.com/daeuniverse/dae/pull/257) by (@mzz2017) + ### 其他变更 - 自动化(release): 添加发布版本 v0.2.3 的条目 in [#253](https://github.com/daeuniverse/dae/pull/253) by (@yqlbu) @@ -90,9 +76,9 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. - 文档: 完善协议支持和 Alpine 安装 in [#241](https://github.com/daeuniverse/dae/pull/241) by (@mzz2017) - 自动化(release): 撰写发布版本 v0.2.3rc1 in [#240](https://github.com/daeuniverse/dae/pull/240) by (@daebot) -**Example Config**: https://github.com/daeuniverse/dae/blob/v0.2.4rc1/example.dae +**Example Config**: https://github.com/daeuniverse/dae/blob/v0.2.4/example.dae -**Full Changelog**: https://github.com/daeuniverse/dae/compare/v0.2.3...v0.2.4rc1 +**Full Changelog**: https://github.com/daeuniverse/dae/compare/v0.2.3...v0.2.4 ### New Contributors From 074f9db2da3eca5b6d173b88e265bacb2caaab92 Mon Sep 17 00:00:00 2001 From: "dae-bot[bot]" <136105375+dae-bot[bot]@users.noreply.github.com> Date: Sun, 13 Aug 2023 22:36:43 +0800 Subject: [PATCH 5/7] ci(release): draft release v0.2.5rc1 (#279) Co-authored-by: daebot Co-authored-by: kev --- CHANGELOGS.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index 38f0350..de28d37 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -13,7 +13,7 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. ## Releases - +- [v0.2.5rc1 (Pre-release)](#v025rc1-pre-release) - [v0.2.4 (Latest)](#v024-latest) - [v0.2.3](#v023) - [v0.2.2](#v022) @@ -34,6 +34,60 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. - [v0.1.0](#v010) +### v0.2.5rc1 (Pre-release) + +> Release date: 2023/08/13 + +### Features + +- optimize(juicity): support Base64URLEncoding for PinnedCertchainSha256 in [#265](https://github.com/daeuniverse/dae/pull/265) by (@mzz2017) +- feat: add meek in [#258](https://github.com/daeuniverse/dae/pull/258) by (@AkinoKaede) + +### Bug Fixes + +- fix: rebinding wg/tun not work in [#271](https://github.com/daeuniverse/dae/pull/271) by (@mzz2017) +- fix: caddy cannot accept connections in [#262](https://github.com/daeuniverse/dae/pull/262) by (@mzz2017) + +### Others + +- ci(release): draft release v0.2.4 in [#277](https://github.com/daeuniverse/dae/pull/277) by (@yqlbu) +- ci/chore: remove the buildmode specified in CI in [#273](https://github.com/daeuniverse/dae/pull/273) by (@shenghuang147) +- chore: amd64 and arm64 use PIE build mode by default in [#272](https://github.com/daeuniverse/dae/pull/272) by (@shenghuang147) +- chore: upgrade quic-go to 0.37.4 to support go1.21 in [#270](https://github.com/daeuniverse/dae/pull/270) by (@mzz2017) +- chore(pr_template): update headers in [#269](https://github.com/daeuniverse/dae/pull/269) by (@yqlbu) +- chore/refactor: rework issue_templates in [#267](https://github.com/daeuniverse/dae/pull/267) by (@yqlbu) +- chore: add -buildmode=pie in [#266](https://github.com/daeuniverse/dae/pull/266) by (@shenghuang147) +- ci(release): draft release v0.2.4rc2 in [#260](https://github.com/daeuniverse/dae/pull/260) by (@daebot) + +### 特性支持 + +- 优化(juicity): 支持 PinnedCertchainSha256 的 Base64URLEncoding in [#265](https://github.com/daeuniverse/dae/pull/265) by (@mzz2017) +- 特性: 添加 meek in [#258](https://github.com/daeuniverse/dae/pull/258) by (@AkinoKaede) + +### 问题修复 + +- 修复: 重新绑定 wg/tun 无效的问题 in [#271](https://github.com/daeuniverse/dae/pull/271) by (@mzz2017) +- 修复: caddy 无法接受连接的问题 in [#262](https://github.com/daeuniverse/dae/pull/262) by (@mzz2017) + +### 其他变更 + +- 自动化(发布): 起草发布 v0.2.4 版本 in [#277](https://github.com/daeuniverse/dae/pull/277) by (@yqlbu) +- 自动化/杂项: 在 CI 中移除指定的 buildmode in [#273](https://github.com/daeuniverse/dae/pull/273) by (@shenghuang147) +- 杂项: amd64 和 arm64 默认使用 PIE 构建模式 in [#272](https://github.com/daeuniverse/dae/pull/272) by (@shenghuang147) +- 杂项: 升级 quic-go 到 0.37.4 以支持 go1.21 in [#270](https://github.com/daeuniverse/dae/pull/270) by (@mzz2017) +- 杂项(pr_template): 更新标题 in [#269](https://github.com/daeuniverse/dae/pull/269) by (@yqlbu) +- 杂项/重构: 重新设计 issue_templates in [#267](https://github.com/daeuniverse/dae/pull/267) by (@yqlbu) +- 杂项: 添加 -buildmode=pie in [#266](https://github.com/daeuniverse/dae/pull/266) by (@shenghuang147) +- 自动化(发布): 起草发布 v0.2.4rc2 版本 in [#260](https://github.com/daeuniverse/dae/pull/260) by (@daebot) + +**Example Config**: https://github.com/daeuniverse/dae/blob/v0.2.5rc1/example.dae + +**Full Changelog**: https://github.com/daeuniverse/dae/compare/v0.2.4...v0.2.5rc1 + +### New Contributors + +- @shenghuang147 made their first contribution in https://github.com/daeuniverse/dae/pull/266 + ### v0.2.4 (Latest) > Release date: 2023/08/13 @@ -84,7 +138,7 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. - @bradfordzhang made their first contribution in #247 -### v0.2.3 (Latest) +### v0.2.3 > Release date: 2023/08/02 From 5b4f9e03b322121cae6b274fb9ced402e68373de Mon Sep 17 00:00:00 2001 From: kev <31861128+yqlbu@users.noreply.github.com> Date: Mon, 14 Aug 2023 19:16:23 +0800 Subject: [PATCH 6/7] ci/hotfix: demise buildarg=pie (#282) --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 44c5fbd..fbd390f 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,6 @@ else ifeq ($(wildcard $(STRIP_PATH)),) else STRIP_FLAG := -strip=$(STRIP_PATH) endif -GOARCH ?= $(shell go env GOARCH) # Do NOT remove the line below. This line is for CI. #export GOMODCACHE=$(PWD)/go-mod @@ -37,12 +36,7 @@ else VERSION ?= unstable-$(date).r$(count).$(commit) endif -# amd64 and arm64 use PIE build mode by default -ifeq ($(GOARCH),$(filter $(GOARCH),amd64 arm64)) - BUILD_MODE ?= -buildmode=pie -endif - -BUILD_ARGS := -trimpath -ldflags "-s -w -X github.com/daeuniverse/dae/cmd.Version=$(VERSION) -X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=$(MAX_MATCH_SET_LEN)" $(BUILD_MODE) $(BUILD_ARGS) +BUILD_ARGS := -trimpath -ldflags "-s -w -X github.com/daeuniverse/dae/cmd.Version=$(VERSION) -X github.com/daeuniverse/dae/common/consts.MaxMatchSetLen_=$(MAX_MATCH_SET_LEN)" $(BUILD_ARGS) .PHONY: clean-ebpf ebpf dae submodule submodules From 8bbfd691a7034b6007600ed65547cb84f446d387 Mon Sep 17 00:00:00 2001 From: "dae-bot[bot]" <136105375+dae-bot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 20:58:13 +0800 Subject: [PATCH 7/7] ci(release): draft release v0.2.5rc2 (#284) Co-authored-by: daebot Co-authored-by: kev --- CHANGELOGS.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOGS.md b/CHANGELOGS.md index de28d37..c24e9c8 100644 --- a/CHANGELOGS.md +++ b/CHANGELOGS.md @@ -13,6 +13,7 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. ## Releases +- [v0.2.5rc2 (Pre-release)](#v025rc2-pre-release) - [v0.2.5rc1 (Pre-release)](#v025rc1-pre-release) - [v0.2.4 (Latest)](#v024-latest) - [v0.2.3](#v023) @@ -34,6 +35,22 @@ curl --silent "https://api.github.com/repos/daeuniverse/dae/releases" | jq -r '. - [v0.1.0](#v010) +### v0.2.5rc2 (Pre-release) + +> Release date: 2023/08/14 + +### Bug Fix + +- ci/hotfix: demise buildarg=pie in [#282](https://github.com/daeuniverse/dae/pull/282) by (@yqlbu) + +### 问题修复 + +- 修复: 不再使用 buildarg=pie in [#271](https://github.com/daeuniverse/dae/pull/282) by (@yqlbu) + +**Example Config**: https://github.com/daeuniverse/dae/blob/v0.2.5rc2/example.dae + +**Full Changelog**: https://github.com/daeuniverse/dae/compare/v0.2.5rc1...v0.2.5rc2 + ### v0.2.5rc1 (Pre-release) > Release date: 2023/08/13