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 编核心库"