mirror of
https://github.com/hotyue/IP-Sentinel.git
synced 2026-09-04 23:18:17 +08:00
fix(core): 修正 install.sh 注册暗号分隔符与主机名变量,确保 Master 准确解析
This commit is contained in:
+3
-2
@@ -254,8 +254,9 @@ if [[ -n "$TG_TOKEN" ]] && [[ -n "$CHAT_ID" ]]; then
|
|||||||
# 获取公网 IP
|
# 获取公网 IP
|
||||||
PUBLIC_IP=$(curl -s https://api64.ipify.org || curl -s https://ifconfig.me || echo "未知IP")
|
PUBLIC_IP=$(curl -s https://api64.ipify.org || curl -s https://ifconfig.me || echo "未知IP")
|
||||||
|
|
||||||
# 构造注册暗号
|
# 构造注册暗号 (修复 v3.0 竖线分隔符与主机名回调 BUG)
|
||||||
REG_MSG="#REGISTER#:${REGION_NAME}:${PUBLIC_IP}:${AGENT_PORT}"
|
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}" \
|
PUSH_RESULT=$(curl -s -X POST "${TG_API_URL}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user