mirror of
				https://github.com/everett7623/nodeloc_vps_test.git
				synced 2025-11-04 08:27:51 +00:00 
			
		
		
		
	Update Nlbench_beta.sh
This commit is contained in:
		
							parent
							
								
									d723a20c17
								
							
						
					
					
						commit
						7a3f87529f
					
				@ -84,21 +84,20 @@ detect_region() {
 | 
				
			|||||||
    esac
 | 
					    esac
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# iperf3测试函数
 | 
					# 服务器 VPS 信息
 | 
				
			||||||
run_iperf3_test() {
 | 
					AUXILIARY_VPS="205.185.119.208"
 | 
				
			||||||
    local servers=(
 | 
					IPERF_PORT=5201
 | 
				
			||||||
        "iperf.he.net"
 | 
					TEST_DURATION=30
 | 
				
			||||||
        "iperf.biznetnetworks.com"
 | 
					PARALLEL_STREAMS=3
 | 
				
			||||||
        "iperf.scottlinux.com"
 | 
					 | 
				
			||||||
        "bouygues.iperf.fr"
 | 
					 | 
				
			||||||
        "ping.online.net"
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for server in "${servers[@]}"; do
 | 
					run_iperf3_test() {
 | 
				
			||||||
        echo "测试服务器: $server"
 | 
					    echo -e "${GREEN}服务端VPS位于美国拉斯维加斯${NC}"
 | 
				
			||||||
        iperf3 -c "$server" -t 30 -P 3
 | 
					    echo -e "${GREEN}连接到服务端进行iperf3测试。。。${NC}"
 | 
				
			||||||
        echo "----------------------------------------"
 | 
					    if iperf3 -c $AUXILIARY_VPS -p $IPERF_PORT -t $TEST_DURATION -P $PARALLEL_STREAMS; then
 | 
				
			||||||
    done
 | 
					    echo -e "${YELLOW}iperf3 测试完成${NC}"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    echo -e "${RED}iperf3 测试失败${NC}"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 统计使用次数
 | 
					# 统计使用次数
 | 
				
			||||||
@ -158,28 +157,32 @@ run_script() {
 | 
				
			|||||||
            sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
 | 
					            sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
 | 
				
			||||||
            sed -i 's/\.\.\.\.\.\./\.\.\.\.\.\.\n/g' "$temp_file"
 | 
					            sed -i 's/\.\.\.\.\.\./\.\.\.\.\.\.\n/g' "$temp_file"
 | 
				
			||||||
            sed -i '1,/\.\.\.\.\.\./d' "$temp_file"
 | 
					            sed -i '1,/\.\.\.\.\.\./d' "$temp_file"
 | 
				
			||||||
            sed -i '1,/\.\.\.\.\.\./d' "$temp_file"
 | 
					 | 
				
			||||||
            cp "$temp_file" "${output_file}_fusion"
 | 
					            cp "$temp_file" "${output_file}_fusion"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        # IP质量
 | 
					        # IP质量
 | 
				
			||||||
        3)
 | 
					        3)
 | 
				
			||||||
            echo -e "运行${YELLOW}IP质量测试...${NC}"
 | 
					            echo -e "运行${YELLOW}IP质量测试...${NC}"
 | 
				
			||||||
            
 | 
					 | 
				
			||||||
            bash <(curl -Ls IP.Check.Place) | tee "$temp_file"
 | 
					            bash <(curl -Ls IP.Check.Place) | tee "$temp_file"
 | 
				
			||||||
            sed  's/\x1B\[[0-9;]*[JKmsu]//g; /\.\.\.\.\.\.\.\.\.\./d'  "$temp_file"  > "${output_file}_ip_quality"
 | 
					            sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
 | 
				
			||||||
 | 
					            sed -i '/\.\.\.\.\.\.\.\.\.\./d' "$temp_file"
 | 
				
			||||||
 | 
					            cp "$temp_file" "${output_file}_ip_quality"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        # 流媒体解锁
 | 
					        # 流媒体解锁
 | 
				
			||||||
        4)
 | 
					        4)
 | 
				
			||||||
            echo -e "运行${YELLOW}流媒体解锁测试...${NC}"
 | 
					            echo -e "运行${YELLOW}流媒体解锁测试...${NC}"
 | 
				
			||||||
            local region=$(detect_region)
 | 
					            local region=$(detect_region)
 | 
				
			||||||
            bash <(curl -L -s media.ispvps.com) <<< "$region" |tee "$temp_file" 
 | 
					            bash <(curl -L -s media.ispvps.com) <<< "$region" | tee "$temp_file"
 | 
				
			||||||
            sed 's/\x1B\[[0-9;]*[JKmsu]//g; 1,/脚本适配/d' "$temp_file" > "${output_file}_streaming"
 | 
					            sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
 | 
				
			||||||
 | 
					            sed -i '1,/脚本适配/d' "$temp_file"
 | 
				
			||||||
 | 
					            sed -i '/^$/d' "$temp_file"  # 删除空行
 | 
				
			||||||
 | 
					            cp "$temp_file" "${output_file}_streaming"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        # 响应测试
 | 
					        # 响应测试
 | 
				
			||||||
        5)
 | 
					        5)
 | 
				
			||||||
            echo -e "运行${YELLOW}响应测试...${NC}"
 | 
					            echo -e "运行${YELLOW}响应测试...${NC}"
 | 
				
			||||||
            bash <(curl -sL https://nodebench.mereith.com/scripts/curltime.sh) |tee "$temp_file"
 | 
					            bash <(curl -sL https://nodebench.mereith.com/scripts/curltime.sh) | tee "$temp_file"
 | 
				
			||||||
            sed 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" > "${output_file}_response"
 | 
					            sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
 | 
				
			||||||
 | 
					            cp "$temp_file" "${output_file}_response"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
        # 多线程测速
 | 
					        # 多线程测速
 | 
				
			||||||
        6)
 | 
					        6)
 | 
				
			||||||
@ -205,15 +208,16 @@ run_script() {
 | 
				
			|||||||
        8)
 | 
					        8)
 | 
				
			||||||
            echo -e "运行${YELLOW}iperf3测试...${NC}"
 | 
					            echo -e "运行${YELLOW}iperf3测试...${NC}"
 | 
				
			||||||
            run_iperf3_test | tee "$temp_file"
 | 
					            run_iperf3_test | tee "$temp_file"
 | 
				
			||||||
            sed -e 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" > "${output_file}_iperf3"
 | 
					            sed -i -e 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
 | 
				
			||||||
 | 
					            sed -i -r '1,/\[ ID\] /d' "$temp_file"
 | 
				
			||||||
 | 
					            cp "$temp_file" "${output_file}_iperf3"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
 | 
					       # 回程路由
 | 
				
			||||||
        # 回程路由
 | 
					 | 
				
			||||||
        9)
 | 
					        9)
 | 
				
			||||||
 | 
					 | 
				
			||||||
            echo -e "运行${YELLOW}回程路由测试...${NC}"
 | 
					            echo -e "运行${YELLOW}回程路由测试...${NC}"
 | 
				
			||||||
            wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh <<< "1" |tee "$temp_file"
 | 
					            wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh <<< "1" | tee "$temp_file"
 | 
				
			||||||
            sed -e 's/\x1B\[[0-9;]*[JKmsu]//g' -e ' /测试项/,+9d'  -e '/信息/d'  -e '/^\s*$/d' "$temp_file" > "${output_file}_route"
 | 
					            sed -i -e 's/\x1B\[[0-9;]*[JKmsu]//g' -e '/测试项/,+9d' -e '/信息/d' -e '/^\s*$/d' "$temp_file"
 | 
				
			||||||
 | 
					            cp "$temp_file" "${output_file}_route"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
    rm "$temp_file"
 | 
					    rm "$temp_file"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user