From ae6559c8509adb282c694a8d0bfb8789f2eb721e Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Fri, 24 Apr 2026 03:24:24 +0000 Subject: [PATCH] =?UTF-8?q?fix(master):=20=E5=90=8C=E6=AD=A5=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20V6=20=E7=8E=AF=E5=A2=83=E4=B8=8B=E6=8F=90=E5=8F=96?= =?UTF-8?q?=E4=BA=91=E7=AB=AF=E7=89=88=E6=9C=AC=E5=8F=B7=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E7=9A=84=20Bug=EF=BC=8C=E5=B9=B6=E6=8A=AC=E9=AB=98=E5=85=9C?= =?UTF-8?q?=E5=BA=95=E7=89=88=E6=9C=AC=E8=87=B3=20v4.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- master/install_master.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/master/install_master.sh b/master/install_master.sh index 4ea30b4..b228c66 100755 --- a/master/install_master.sh +++ b/master/install_master.sh @@ -21,10 +21,11 @@ REPO_RAW_URL="https://raw.githubusercontent.com/hotyue/IP-Sentinel/dev/v4.0.0-so # [核心: 动态提取 Master 专属版本锚点 (KV 解析法)] # 通过 grep 定位 MASTER_VERSION 行,再通过 cut 提取等号右侧的值 -TARGET_VERSION=$(curl -s -m 3 "${REPO_RAW_URL}/version.txt" | grep "^MASTER_VERSION=" | cut -d'=' -f2 | tr -d '[:space:]') +# [修复] 增加 -L 与双栈容灾 (-4),解决纯 V6 或 V6 优先机器连接 GitHub Raw 易超时的问题 +TARGET_VERSION=$( (curl -sL -m 5 "${REPO_RAW_URL}/version.txt" || curl -4 -sL -m 5 "${REPO_RAW_URL}/version.txt") 2>/dev/null | grep "^MASTER_VERSION=" | cut -d'=' -f2 | tr -d '[:space:]') -# 🛡️ 兜底防线:如果网络波动拉取失败,启用内置的安全兜底版本 -TARGET_VERSION=${TARGET_VERSION:-"3.5.0"} +# 🛡️ 兜底防线:如果网络波动拉取失败,启用内置的最新兜底版本 +TARGET_VERSION=${TARGET_VERSION:-"4.0.0"} MASTER_DIR="/opt/ip_sentinel_master" DB_FILE="${MASTER_DIR}/sentinel.db"