From f4f93d8955eaadb7d638e5637da883568cdffd9e Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Thu, 16 Apr 2026 01:30:02 +0000 Subject: [PATCH] =?UTF-8?q?feat(agent):=20[v3.5.2]=20=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E6=88=98=E6=8A=A5=E5=85=A8=E9=9D=A2=E9=80=82=E9=85=8D=20NODE?= =?UTF-8?q?=5FALIAS=20=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/tg_report.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/core/tg_report.sh b/core/tg_report.sh index 2126917..91b35c0 100755 --- a/core/tg_report.sh +++ b/core/tg_report.sh @@ -19,9 +19,12 @@ if [ -z "$TG_TOKEN" ] || [ -z "$CHAT_ID" ]; then fi # 2. 节点元数据抓取 (v3.2.2 协议自适应与多级容灾版) -# [v3.3.2 修复: 引入 IP 哈希防同名覆盖机制] -IP_HASH=$(echo "${PUBLIC_IP:-127.0.0.1}" | md5sum | cut -c 1-4 | tr 'a-z' 'A-Z') -NODE_NAME="$(hostname | cut -c 1-10)-${IP_HASH}" +# [v3.5.2 核心: 引入双轨身份架构] +if [ -z "$NODE_NAME" ]; then + IP_HASH=$(echo "${PUBLIC_IP:-127.0.0.1}" | md5sum | cut -c 1-4 | tr 'a-z' 'A-Z') + NODE_NAME="$(hostname | cut -c 1-10)-${IP_HASH}" +fi +NODE_ALIAS="${NODE_ALIAS:-$NODE_NAME}" # --- [防线 1: 底层路由锁定与协议自适应] --- CURL_BIND_OPT="" @@ -93,7 +96,7 @@ if [ -z "$LOG_CONTENT" ]; then read -r -d '' MSG <