mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-12-29 09:45:18 +00:00
Update nodeloc_vps_autotest_ip.sh
This commit is contained in:
parent
beb1e8a351
commit
da63b67c9e
@ -142,30 +142,22 @@ run_all_tests() {
|
|||||||
|
|
||||||
# IP质量
|
# IP质量
|
||||||
echo -e "运行${YELLOW}IP质量测试...${NC}"
|
echo -e "运行${YELLOW}IP质量测试...${NC}"
|
||||||
ip_quality_result=$(run_and_capture "bash <(curl -Ls IP.Check.Place)" | extract_ip_report)
|
ip_quality_result=$(bash <(curl -Ls IP.Check.Place) | tee /dev/tty | extract_ip_report)
|
||||||
|
|
||||||
# 格式化结果
|
# 格式化结果
|
||||||
echo -e "${YELLOW}此报告由Nodeloc_VPS_自动脚本测试生成...${NC}"
|
echo -e "${YELLOW}此报告由Nodeloc_VPS_自动脚本测试生成...${NC}"
|
||||||
format_results
|
format_results
|
||||||
}
|
}
|
||||||
|
|
||||||
# 提取IP质量报告
|
|
||||||
extract_ip_report() {
|
|
||||||
awk '/^########################################################################$/,/^IP质量体检报告$/' |
|
|
||||||
sed '/按回车键返回主菜单.../d' # 移除"按回车键返回主菜单..."行
|
|
||||||
}
|
|
||||||
|
|
||||||
# 格式化结果为 Markdown
|
# 格式化结果为 Markdown
|
||||||
format_results() {
|
format_results() {
|
||||||
result="[tabs]
|
result="[tabs]
|
||||||
|
|
||||||
[tab=\"IP质量\"]
|
[tab=\"IP质量\"]
|
||||||
\`\`\`
|
\`\`\`
|
||||||
$ip_quality_result
|
$ip_quality_result
|
||||||
\`\`\`
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[/tabs]"
|
[/tabs]"
|
||||||
|
|
||||||
echo "$result" > results.md
|
echo "$result" > results.md
|
||||||
echo -e "${GREEN}结果已保存到 results.md 文件中。${NC}"
|
echo -e "${GREEN}结果已保存到 results.md 文件中。${NC}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user