From 5eccd360f96d2c1a801b9de75deabdfae871f505 Mon Sep 17 00:00:00 2001 From: ruimingchen Date: Mon, 23 Mar 2026 22:32:31 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20wgcf=20=E7=89=88=E6=9C=AC=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8A=A8=E6=80=81=E8=8E=B7=E5=8F=96=E6=9C=80=E6=96=B0?= =?UTF-8?q?=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 通过 GitHub API 获取最新版本号,避免硬编码版本导致下载失败 --- entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3550548..7401f0d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,7 +17,9 @@ if [ ! -f "$WG_CONF" ]; then *) echo "==> [ERROR] 不支持的架构: $ARCH"; exit 1 ;; esac - wget -qO wgcf "https://github.com/ViRb3/wgcf/releases/download/v2.2.30/wgcf_2.2.30_linux_${WGCF_ARCH}" + WGCF_VER=$(curl -sL https://api.github.com/repos/ViRb3/wgcf/releases/latest | grep '"tag_name"' | sed 's/.*"v\(.*\)".*/\1/') + echo "==> [MicroWARP] 检测到最新 wgcf 版本: v${WGCF_VER}" + wget -qO wgcf "https://github.com/ViRb3/wgcf/releases/download/v${WGCF_VER}/wgcf_${WGCF_VER}_linux_${WGCF_ARCH}" chmod +x wgcf echo "==> [MicroWARP] 正在向 CF 注册设备..."