From ee16cd326600ec89c314f3cad328a1bec33ac79d Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sun, 26 Jul 2026 08:24:03 +0800 Subject: [PATCH] =?UTF-8?q?ci(android):=20libbox=20=E4=BB=8E=20NAS=20gitea?= =?UTF-8?q?=20=E9=95=9C=E5=83=8F=E5=8F=96=20sing-box=20=E6=BA=90=E7=A0=81,?= =?UTF-8?q?=E7=BB=95=E5=BC=80=20github=20=E4=B8=8D=E5=8F=AF=E8=BE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build-android 失败根因:build-libbox.sh 第一步 git clone github.com/SagerNet/ sing-box,而 mac runner(经 pangolin 隧道)连不上 github(SSL_ERROR_SYSCALL, exit 128)。windows 成功是因为它从 NAS 镜像取 sing-box.exe、不碰 github。 修:build-libbox.sh clone 改用 $SINGBOX_GIT(默认仍 github,本地开发不受影响); deploy-client.yml 的 build-android 设 SINGBOX_GIT=http://127.0.0.1:13000/wangjia/ sing-box.git,经 runner 的 gitea relay 取 NAS 上的 sing-box 镜像(已用 gitea migrate 从 github 拉好,含 v1.13.13)。与 windows 的 DESKTOP_BIN_MIRROR 同思路, CI 不再依赖 github。 Co-Authored-By: Claude Fable 5 --- .gitea/workflows/deploy-client.yml | 3 +++ scripts/build-libbox.sh | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index 8ba9cf7..d9319f8 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -39,6 +39,9 @@ jobs: GOPROXY: https://goproxy.cn,direct PUB_HOSTED_URL: https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn + # sing-box 源码经 NAS gitea 镜像取(mac runner 连不上 github;经 runner 的 + # gitea relay 127.0.0.1:13000 → wangjia/sing-box)。见 scripts/build-libbox.sh。 + SINGBOX_GIT: http://127.0.0.1:13000/wangjia/sing-box.git steps: - name: Checkout uses: actions/checkout@v4 diff --git a/scripts/build-libbox.sh b/scripts/build-libbox.sh index b421a21..1803071 100644 --- a/scripts/build-libbox.sh +++ b/scripts/build-libbox.sh @@ -54,7 +54,10 @@ gomobile init echo "==> [2/3] 拉 sing-box $SINGBOX_VERSION 源码" mkdir -p "$WORK" rm -rf "$WORK/sing-box" -git clone --depth 1 --branch "$SINGBOX_VERSION" https://github.com/SagerNet/sing-box.git "$WORK/sing-box" +# sing-box 源码:默认 github,CI 里国内 runner 连不上 github → 经 SINGBOX_GIT 指向 +# NAS gitea 镜像(wangjia/sing-box,gitea migrate 自 github)。见 deploy-client.yml。 +SINGBOX_GIT="${SINGBOX_GIT:-https://github.com/SagerNet/sing-box.git}" +git clone --depth 1 --branch "$SINGBOX_VERSION" "$SINGBOX_GIT" "$WORK/sing-box" cd "$WORK/sing-box" echo "==> [3/3] 用官方 build_libbox 编核心库"