Update Nlbench.sh

This commit is contained in:
Jensfrank 2024-09-21 23:57:26 +08:00 committed by GitHub
parent e81ccd304a
commit ca784f8316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -353,18 +353,8 @@ run_script() {
sed -i '/^\s*$/d' "$temp_file" sed -i '/^\s*$/d' "$temp_file"
cp "$temp_file" "${output_file}_yabs" cp "$temp_file" "${output_file}_yabs"
;; ;;
# 融合怪
2)
echo -e "运行${YELLOW}融合怪...${NC}"
curl -L https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh -m -base -bansp -banup <<< "y" | tee "$temp_file"
sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
sed -i 's/\.\.\.\.\.\./\.\.\.\.\.\.\n/g' "$temp_file"
sed -i '1,/\.\.\.\.\.\./d' "$temp_file"
sed -i -n '/--------------------- A Bench Script By spiritlhl ----------------------/,${s/^.*\(--------------------- A Bench Script By spiritlhl ----------------------\)/\1/;p}' "$temp_file"
cp "$temp_file" "${output_file}_fusion"
;;
# IP质量 # IP质量
3) 2)
echo -e "运行${YELLOW}IP质量测试...${NC}" echo -e "运行${YELLOW}IP质量测试...${NC}"
echo y | bash <(curl -Ls IP.Check.Place) | tee "$temp_file" echo y | bash <(curl -Ls IP.Check.Place) | tee "$temp_file"
sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
@ -375,7 +365,7 @@ run_script() {
cp "$temp_file" "${output_file}_ip_quality" cp "$temp_file" "${output_file}_ip_quality"
;; ;;
# 流媒体解锁 # 流媒体解锁
4) 3)
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"
@ -386,14 +376,14 @@ run_script() {
cp "$temp_file" "${output_file}_streaming" cp "$temp_file" "${output_file}_streaming"
;; ;;
# 响应测试 # 响应测试
5) 4)
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 -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file"
cp "$temp_file" "${output_file}_response" cp "$temp_file" "${output_file}_response"
;; ;;
# 多线程测速 # 多线程测速
6) 5)
echo -e "运行${YELLOW}多线程测速...${NC}" echo -e "运行${YELLOW}多线程测速...${NC}"
if [ "$use_ipv6" = true ]; then if [ "$use_ipv6" = true ]; then
echo "使用IPv6测试选项" echo "使用IPv6测试选项"
@ -410,7 +400,7 @@ run_script() {
cp "$temp_file" "${output_file}_multi_thread" cp "$temp_file" "${output_file}_multi_thread"
;; ;;
# 单线程测速 # 单线程测速
7) 6)
echo -e "运行${YELLOW}单线程测速...${NC}" echo -e "运行${YELLOW}单线程测速...${NC}"
if [ "$use_ipv6" = true ]; then if [ "$use_ipv6" = true ]; then
echo "使用IPv6测试选项" echo "使用IPv6测试选项"
@ -427,7 +417,7 @@ run_script() {
cp "$temp_file" "${output_file}_single_thread" cp "$temp_file" "${output_file}_single_thread"
;; ;;
# 回程路由 # 回程路由
8) 7)
echo -e "运行${YELLOW}回程路由测试...${NC}" echo -e "运行${YELLOW}回程路由测试...${NC}"
if [ "$use_ipv6" = true ]; then if [ "$use_ipv6" = true ]; then
echo "使用IPv6测试选项" echo "使用IPv6测试选项"
@ -448,8 +438,8 @@ run_script() {
generate_markdown_output() { generate_markdown_output() {
local base_output_file=$1 local base_output_file=$1
local temp_output_file="${base_output_file}.md" local temp_output_file="${base_output_file}.md"
local sections=("YABS" "融合怪" "IP质量" "流媒体" "响应" "多线程测速" "单线程测速" "回程路由") local sections=("YABS" "IP质量" "流媒体" "响应" "多线程测速" "单线程测速" "回程路由")
local file_suffixes=("yabs" "fusion" "ip_quality" "streaming" "response" "multi_thread" "single_thread" "route") local file_suffixes=("yabs" "ip_quality" "streaming" "response" "multi_thread" "single_thread" "route")
local empty_tabs=("去程路由" "Ping.pe" "哪吒 ICMP" "其他") local empty_tabs=("去程路由" "Ping.pe" "哪吒 ICMP" "其他")
# 修改这里,添加 UTF-8 编码设置 # 修改这里,添加 UTF-8 编码设置
@ -516,21 +506,20 @@ run_selected_scripts() {
local base_output_file="NLvps_results_$(date +%Y%m%d_%H%M%S)" local base_output_file="NLvps_results_$(date +%Y%m%d_%H%M%S)"
echo -e "${YELLOW}Nodeloc VPS 自动测试脚本 $VERSION${NC}" echo -e "${YELLOW}Nodeloc VPS 自动测试脚本 $VERSION${NC}"
echo "1. Yabs" echo "1. Yabs"
echo "2. 融合怪" echo "2. IP质量"
echo "3. IP质量" echo "3. 流媒体解锁"
echo "4. 流媒体解锁" echo "4. 响应测试"
echo "5. 响应测试" echo "5. 多线程测试"
echo "6. 多线程测试" echo "6. 单线程测试"
echo "7. 单线程测试" echo "7. 回程路由"
echo "8. 回程路由"
echo "0. 返回" echo "0. 返回"
while true; do while true; do
read -p "请输入要执行的脚本编号用英文逗号分隔例如1,2,3):" script_numbers read -p "请输入要执行的脚本编号用英文逗号分隔例如1,2,3):" script_numbers
if [[ "$script_numbers" =~ ^(0|10|[1-8])(,(0|10|[1-8]))*$ ]]; then if [[ "$script_numbers" =~ ^(0|10|[1-7])(,(0|10|[1-7]))*$ ]]; then
break break
else else
echo -e "${RED}无效输入请输入0-9之间的数字,用英文逗号分隔。${NC}" echo -e "${RED}无效输入请输入0-7之间的数字,用英文逗号分隔。${NC}"
fi fi
done done