diff --git a/install.sh b/install.sh index 69eb725..46f7e74 100755 --- a/install.sh +++ b/install.sh @@ -239,7 +239,6 @@ api_host="${EXTERNAL_CONTROLLER%:*}" if [ -z "$api_host" ] || [ "$api_host" = "$EXTERNAL_CONTROLLER" ]; then api_host="127.0.0.1" fi -echo -e "🌐 Dashboard:http://${api_host}:${api_port}/ui" # ---- Secret 展示(脱敏)---- CONF_DIR="${CLASH_INSTALL_DIR:-/opt/clash-for-linux}/conf" @@ -255,12 +254,12 @@ if [ -n "$SECRET_VAL" ]; then # 脱敏显示:前4后4 MASKED="${SECRET_VAL:0:4}****${SECRET_VAL: -4}" echo "" - echo "🌐 Dashboard:http://127.0.0.1:9090/ui" + echo -e "🌐 Dashboard:http://${api_host}:${api_port}/ui" echo "🔐 Secret:${MASKED}" echo " 查看完整 Secret:sudo awk -F': *' '/^secret:/{print \$2; exit}' $CONF_FILE" else echo "" - echo "🌐 Dashboard:http://127.0.0.1:9090/ui" + echo -e "🌐 Dashboard:http://${api_host}:${api_port}/ui" echo "🔐 Secret:未读取到(服务首次启动后生成),可用以下命令查看:" echo " sudo awk -F': *' '/^secret:/{print \$2; exit}' $CONF_FILE" fi