From 6b9563b858c3ced924c6192595c79d1551e6afb8 Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Mon, 13 Apr 2026 03:32:41 +0000 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20=F0=9F=90=9B=20[v3.2.3]=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=98=B2=E7=81=AB=E5=A2=99=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=9B=B2=E5=8C=BA=EF=BC=8C=E6=94=AF=E6=8C=81=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=20IPv4/IPv6=20=E5=8A=A8=E6=80=81=E4=B8=8B=E5=8F=91=20iptables/?= =?UTF-8?q?ip6tables=20=E6=94=BE=E8=A1=8C=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/install.sh | 9 +++++++-- master/install_master.sh | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/install.sh b/core/install.sh index 6cd84f7..59b8691 100755 --- a/core/install.sh +++ b/core/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # ========================================================== -# 脚本名称: install.sh (IP-Sentinel 分布式边缘节点部署脚本 v3.2.2 - Global Nexus) +# 脚本名称: install.sh (IP-Sentinel 分布式边缘节点部署脚本 v3.2.3 - Global Nexus) # 核心功能: 区域选择、模块按需开启、官方机器人一键配置、平滑热更新 # ========================================================== @@ -486,7 +486,12 @@ if [[ -n "$TG_TOKEN" ]]; then elif command -v firewall-cmd >/dev/null 2>&1 && systemctl is-active firewalld | grep -qw active; then FW_MSG="firewall-cmd --zone=public --add-port=$AGENT_PORT/tcp --permanent && firewall-cmd --reload" elif command -v iptables >/dev/null 2>&1; then - FW_MSG="iptables -I INPUT -p tcp --dport $AGENT_PORT -j ACCEPT" + # 智能双栈雷达:根据绑定的 IP 属性,动态下发对应的防火墙放行指令 + if [[ "$BIND_IP" == *":"* ]]; then + FW_MSG="ip6tables -I INPUT -p tcp --dport $AGENT_PORT -j ACCEPT" + else + FW_MSG="iptables -I INPUT -p tcp --dport $AGENT_PORT -j ACCEPT" + fi fi echo -e "\033[33m⚠️ 警告:请务必确保本机及云服务商安全组放行了 TCP $AGENT_PORT 端口!\033[0m" diff --git a/master/install_master.sh b/master/install_master.sh index 9301ada..a75a506 100755 --- a/master/install_master.sh +++ b/master/install_master.sh @@ -1,7 +1,7 @@ #!/bin/bash # ========================================================== -# 脚本名称: install_master.sh (IP-Sentinel 控制中枢部署脚本 v3.2.2) +# 脚本名称: install_master.sh (IP-Sentinel 控制中枢部署脚本 v3.2.3) # 核心功能: 部署/卸载调度中枢、SQLite 资产管理、平滑热更新引擎 # ==========================================================