mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2025-01-27 15:35:18 +00:00
Update nodeloc_vps_autotest.sh
This commit is contained in:
parent
14d10c9ce3
commit
6058833a00
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# 定义版本
|
# 定义版本
|
||||||
@ -29,24 +28,6 @@ if [ "$(id -u)" != "0" ]; then
|
|||||||
echo "已获取 sudo 权限。"
|
echo "已获取 sudo 权限。"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 更新系统
|
|
||||||
update_system() {
|
|
||||||
if command -v apt &>/dev/null; then
|
|
||||||
apt-get update && apt-get upgrade -y
|
|
||||||
elif command -v dnf &>/dev/null; then
|
|
||||||
dnf check-update && dnf upgrade -y
|
|
||||||
elif command -v yum &>/dev/null; then
|
|
||||||
yum check-update && yum upgrade -y
|
|
||||||
elif command -v apk &>/dev/null; then
|
|
||||||
apk update && apk upgrade
|
|
||||||
else
|
|
||||||
echo -e "${RED}不支持的Linux发行版${NC}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
update_system
|
|
||||||
|
|
||||||
# 检查并安装依赖
|
# 检查并安装依赖
|
||||||
install_dependencies() {
|
install_dependencies() {
|
||||||
echo -e "${YELLOW}正在检查并安装必要的依赖项...${NC}"
|
echo -e "${YELLOW}正在检查并安装必要的依赖项...${NC}"
|
||||||
@ -176,85 +157,82 @@ run_all_tests() {
|
|||||||
echo "开始运行测试..."
|
echo "开始运行测试..."
|
||||||
|
|
||||||
# YABS
|
# YABS
|
||||||
echo "运行${YELLOW}YABS...${NC}"
|
echo -e "运行${YELLOW}YABS...${NC}"
|
||||||
yabs_result=$(run_and_capture "wget -qO- yabs.sh | bash")
|
yabs_result=$(run_and_capture "wget -qO- yabs.sh | bash")
|
||||||
|
|
||||||
# 融合怪
|
# 融合怪
|
||||||
echo "运行${YELLOW}融合怪...${NC}"
|
echo -e "运行${YELLOW}融合怪...${NC}"
|
||||||
fusion_result=$(run_and_capture "curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && echo '1' | bash ecs.sh")
|
fusion_result=$(run_and_capture "curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && echo '1' | bash ecs.sh")
|
||||||
|
|
||||||
# IP质量
|
# IP质量
|
||||||
echo "运行${YELLOW}IP质量测试...${NC}"
|
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)")
|
||||||
|
|
||||||
# 流媒体解锁
|
# 流媒体解锁
|
||||||
echo "运行${YELLOW}流媒体解锁测试...${NC}"
|
echo -e "运行${YELLOW}流媒体解锁测试...${NC}"
|
||||||
run_streaming_test
|
run_streaming_test
|
||||||
|
|
||||||
# 响应测试
|
# 响应测试
|
||||||
echo "运行${YELLOW}响应测试...${NC}"
|
echo -e "运行${YELLOW}响应测试...${NC}"
|
||||||
response_result=$(run_and_capture "bash <(curl -sL https://nodebench.mereith.com/scripts/curltime.sh)")
|
response_result=$(run_and_capture "bash <(curl -sL https://nodebench.mereith.com/scripts/curltime.sh)")
|
||||||
|
|
||||||
# 三网测速
|
# 三网测速
|
||||||
echo "运行${YELLOW}三网测速(多线程/单线程)...${NC}"
|
echo -e "运行${YELLOW}三网测速(多线程/单线程)...${NC}"
|
||||||
speedtest_multi_result=$(run_and_capture "echo '1' | bash <(curl -sL bash.icu/speedtest)")
|
speedtest_multi_result=$(run_and_capture "echo '1' | bash <(curl -sL bash.icu/speedtest)")
|
||||||
speedtest_single_result=$(run_and_capture "echo '2' | bash <(curl -sL bash.icu/speedtest)")
|
speedtest_single_result=$(run_and_capture "echo '2' | bash <(curl -sL bash.icu/speedtest)")
|
||||||
|
|
||||||
# AutoTrace三网回程路由
|
# AutoTrace三网回程路由
|
||||||
echo "运行${YELLOW}AutoTrace三网回程路由...${NC}"
|
echo -e "运行${YELLOW}AutoTrace三网回程路由...${NC}"
|
||||||
autotrace_result=$(run_and_capture "wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && echo '1' | bash AutoTrace.sh)
|
autotrace_result=$(run_and_capture "wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && echo '1' | bash AutoTrace.sh)
|
||||||
|
|
||||||
# 生成Markdown结果
|
# 测试报告Markdown
|
||||||
echo "生成${YELLOW}Markdown${NC}结果..."
|
echo -e "运行${YELLOW}此报告由Nodeloc_VPS_自动脚本测试生成${NC}"
|
||||||
result="
|
format_results() {
|
||||||
# 测试报告
|
result="[tabs]
|
||||||
*此报告由Nodeloc_VPS_自动脚本测试生成*
|
|
||||||
|
|
||||||
[tabs]
|
|
||||||
[tab=\"YABS\"]
|
[tab=\"YABS\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$yabs_result
|
$yabs_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"融合怪\"]
|
[tab=\"融合怪\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$fusion_result
|
$fusion_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"IP质量\"]
|
[tab=\"IP质量\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$ip_quality_result
|
$ip_quality_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"流媒体\"]
|
[tab=\"流媒体\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$streaming_result
|
$streaming_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"响应\"]
|
[tab=\"响应\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$response_result
|
$response_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"多线程测速\"]
|
[tab=\"多线程测速\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$speedtest_multi_result
|
$speedtest_multi_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"单线程测速\"]
|
[tab=\"单线程测速\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$speedtest_single_result
|
$speedtest_single_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"iperf3\"]
|
[tab=\"iperf3\"]
|
||||||
\\\
|
\`\`\`
|
||||||
|
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"回程路由\"]
|
[tab=\"回程路由\"]
|
||||||
\\\
|
\`\`\`
|
||||||
$autotrace_result
|
$autotrace_result
|
||||||
\\\
|
\`\`\`
|
||||||
[/tab]
|
[/tab]
|
||||||
[tab=\"去程路由\"]
|
[tab=\"去程路由\"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user