diff --git a/.github/setup_go_for_macos1013.sh b/.github/setup_go_for_macos1013.sh index ddcb3ea0..4dcf9778 100755 --- a/.github/setup_go_for_macos1013.sh +++ b/.github/setup_go_for_macos1013.sh @@ -2,10 +2,11 @@ set -euo pipefail -VERSION="1.25.12" +VERSION="1.26.5" PATCH_COMMITS=( - "afe69d3cec1c6dcf0f1797b20546795730850070" - "1ed289b0cf87dc5aae9c6fe1aa5f200a83412938" + "f080b0c6346eb690c0dc82497b35925f385b35ac" + "2d9c12887c342fb9051d231aa5388743cb7e9cb6" + "367663849c656612fc3c8875ef6e7f6b0c93dbd0" ) CURL_ARGS=( -fL @@ -25,12 +26,13 @@ tar -xzf "go${VERSION}.darwin-arm64.tar.gz" mv go go_osx cd go_osx -# these patch URLs only work on golang1.25.x -# that means after golang1.26 release it must be changed -# see: https://github.com/SagerNet/go/commits/release-branch.go1.25/ +# these patch URLs only work on golang1.26.x +# that means after golang1.27 release it must be changed +# see: https://github.com/SagerNet/go/commits/release-branch.go1.26/ # revert: # 33d3f603c1: "cmd/link/internal/ld: use 12.0.0 OS/SDK versions for macOS linking" # 937368f84e: "crypto/x509: change how we retrieve chains on darwin" +# d90a57ffe8: "cmd/link/internal/ld: unify OS/SDK versions for macOS linking" for patch_commit in "${PATCH_COMMITS[@]}"; do curl "${CURL_ARGS[@]}" "https://github.com/SagerNet/go/commit/${patch_commit}.diff" | patch --verbose -p 1 diff --git a/.github/setup_go_for_windows7.sh b/.github/setup_go_for_windows7.sh index dfc2e0cb..3561d3aa 100755 --- a/.github/setup_go_for_windows7.sh +++ b/.github/setup_go_for_windows7.sh @@ -2,14 +2,14 @@ set -euo pipefail -VERSION="1.25.12" +VERSION="1.26.5" PATCH_COMMITS=( - "da4094da73b3b419e3f347594d805e2831f65667" - "824aa60e77f06dbae86c20a164c78df722eb7047" - "a3b6ba31c8cc67b6d899b978bba7b53e95afc46b" - "edfa8de63435a409a59f60731b66ab5940d6d3a4" - "284f9b24d6284984966a8431e30fdc2583938f96" - "9864798dee8dd47b55d1d5100d2f1b909a2a6e6c" + "a4ae550aa148b04c9d4890e98bee63aede5c4b53" + "95b851f661584711faa8115b3234a461044f4510" + "b0bf0a863cf218b9bb0d6c013903ab160ae0c39b" + "7c7a2a0d68920f8764d9a3aeae7ad1067a17b3fa" + "ba34356e82f3c12a7303d2231e6ea0e42bbbb3bf" + "472a88edbc2a42feb53fa31d29ab54d33840dca6" ) CURL_ARGS=( -fL @@ -29,9 +29,9 @@ mv go go_win7 cd go_win7 # modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557 -# these patch URLs only work on golang1.25.x -# that means after golang1.26 release it must be changed -# see: https://github.com/MetaCubeX/go/commits/release-branch.go1.25/ +# these patch URLs only work on golang1.26.x +# that means after golang1.27 release it must be changed +# see: https://github.com/MetaCubeX/go/commits/release-branch.go1.26/ # revert: # 693def151adff1af707d82d28f55dba81ceb08e1: "crypto/rand,runtime: switch RtlGenRandom for ProcessPrng" # 7c1157f9544922e96945196b47b95664b1e39108: "net: remove sysSocket fallback for Windows 7" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e932e00..97f73bd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache/restore@v4 @@ -145,7 +145,7 @@ jobs: if: ${{ ! matrix.legacy_win7 }} uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache/restore@v4 @@ -160,7 +160,7 @@ jobs: with: path: | ~/go/go_win7 - key: go_win7_12512 + key: go_win7_1265 - name: Setup Go for Windows 7 if: matrix.legacy_win7 && steps.cache-go-for-windows7.outputs.cache-hit != 'true' env: @@ -488,7 +488,7 @@ jobs: if: ${{ ! matrix.legacy_osx }} uses: actions/setup-go@v5 with: - go-version: ^1.25.3 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache/restore@v4 @@ -503,7 +503,7 @@ jobs: with: path: | ~/go/go_osx - key: go_osx_1258 + key: go_osx_1265 - name: Setup Go for macOS 10.13 if: matrix.legacy_osx && steps.cache-go-for-macos1013.outputs.cache-hit != 'true' env: @@ -587,7 +587,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: ^1.25.4 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache@v4 @@ -690,7 +690,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache@v4 @@ -754,7 +754,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache/restore@v4 @@ -862,7 +862,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache/restore@v4 @@ -972,7 +972,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache@v4 @@ -1081,7 +1081,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules uses: actions/cache@v4 @@ -1238,7 +1238,7 @@ jobs: if: matrix.build uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules if: matrix.build @@ -1252,8 +1252,8 @@ jobs: uses: actions/cache@v4 with: path: ~/Library/Caches/go-build - key: libbox-go-build-${{ matrix.artifact }}-1.25.12-${{ hashFiles('go.sum') }} - restore-keys: libbox-go-build-${{ matrix.artifact }}-1.25.12- + key: libbox-go-build-${{ matrix.artifact }}-1.26.5-${{ hashFiles('go.sum') }} + restore-keys: libbox-go-build-${{ matrix.artifact }}-1.26.5- - name: Set tag if: matrix.build run: git tag v${{ needs.calculate_version.outputs.version }} -f @@ -1316,7 +1316,7 @@ jobs: if: matrix.if uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 cache: false - name: Cache Go modules if: matrix.if diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4d24f625..45071b00 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -55,7 +55,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 - name: Clone cronet-go if: matrix.naive run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 05b9e677..83abc679 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -60,7 +60,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: ^1.25 + go-version: ^1.26 - name: Cache go module uses: actions/cache@v4 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 02d02cb3..0e32068f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 - name: Check input version if: github.event_name == 'workflow_dispatch' run: |- @@ -72,7 +72,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.25.12 + go-version: 1.26.5 - name: Clone cronet-go if: matrix.naive run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc9ee0ad..325ef9b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,8 +31,8 @@ jobs: - windows-latest - macos-latest go: - - ~1.24 - ~1.25 + - ~1.26 runs-on: ${{ matrix.os }} steps: - name: Checkout diff --git a/Dockerfile b/Dockerfile index c8600d57..54c606e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder +FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder LABEL maintainer="nekohasekai " COPY . /go/src/github.com/sagernet/sing-box WORKDIR /go/src/github.com/sagernet/sing-box