From af335875c0106a7a9af5211d7daef6934fd628f9 Mon Sep 17 00:00:00 2001 From: Jensfrank Date: Wed, 26 Jun 2024 23:26:19 +0800 Subject: [PATCH] Update nodeloc_vps_autotest_ip.sh --- nodeloc_vps_autotest_ip.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nodeloc_vps_autotest_ip.sh b/nodeloc_vps_autotest_ip.sh index 17156d8..b41b1a4 100644 --- a/nodeloc_vps_autotest_ip.sh +++ b/nodeloc_vps_autotest_ip.sh @@ -142,13 +142,19 @@ run_all_tests() { # IP质量 echo -e "运行${YELLOW}IP质量测试...${NC}" - ip_quality_result=$(run_and_capture "bash <(curl -Ls IP.Check.Place)") + ip_quality_result=$(run_and_capture "bash <(curl -Ls IP.Check.Place)" | extract_ip_report) # 格式化结果 echo -e "${YELLOW}此报告由Nodeloc_VPS_自动脚本测试生成...${NC}" format_results } +# 提取IP质量报告 +extract_ip_report() { + awk '/^########################################################################$/,/按回车键返回主菜单.../' | + sed '/按回车键返回主菜单.../d' | # 移除"按回车键返回主菜单..."行 +} + # 格式化结果为 Markdown format_results() { result="[tabs]