fix(core): 修正 install.sh 注册暗号分隔符与主机名变量,确保 Master 准确解析

This commit is contained in:
hotyue
2026-04-10 08:53:16 +00:00
parent 90fc8adb74
commit 989db0b49b

View File

@@ -254,8 +254,9 @@ if [[ -n "$TG_TOKEN" ]] && [[ -n "$CHAT_ID" ]]; then
# 获取公网 IP
PUBLIC_IP=$(curl -s https://api64.ipify.org || curl -s https://ifconfig.me || echo "未知IP")
# 构造注册暗号
REG_MSG="#REGISTER#:${REGION_NAME}:${PUBLIC_IP}:${AGENT_PORT}"
# 构造注册暗号 (修复 v3.0 竖线分隔符与主机名回调 BUG)
NODE_NAME=$(hostname | cut -c 1-15)
REG_MSG="#REGISTER#|${NODE_NAME}|${PUBLIC_IP}|${AGENT_PORT}"
# 执行主动推送
PUSH_RESULT=$(curl -s -X POST "${TG_API_URL}" \