mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-12-29 09:45:18 +00:00
Update nodeloc_vps_autotest.sh
This commit is contained in:
parent
9bcc752916
commit
7513516e5c
@ -75,29 +75,13 @@ detect_region() {
|
|||||||
local country
|
local country
|
||||||
country=$(curl -s ipinfo.io/country)
|
country=$(curl -s ipinfo.io/country)
|
||||||
case $country in
|
case $country in
|
||||||
"TW") echo "1" ;; # 台湾
|
"US") echo "na" ;; # 北美
|
||||||
"HK") echo "2" ;; # 香港
|
"CA") echo "na" ;;
|
||||||
"JP") echo "3" ;; # 日本
|
# 添加更多国家和地区的映射
|
||||||
"US" | "CA") echo "4" ;; # 北美
|
*) echo "default" ;;
|
||||||
"BR" | "AR" | "CL") echo "5" ;; # 南美
|
|
||||||
"GB" | "DE" | "FR" | "NL" | "SE" | "NO" | "FI" | "DK" | "IT" | "ES" | "CH" | "AT" | "BE" | "IE" | "PT" | "GR" | "PL" | "CZ" | "HU" | "RO" | "BG" | "HR" | "SI" | "SK" | "LT" | "LV" | "EE") echo "6" ;; # 欧洲
|
|
||||||
"AU" | "NZ") echo "7" ;; # 大洋洲
|
|
||||||
"KR") echo "8" ;; # 韩国
|
|
||||||
"SG" | "MY" | "TH" | "ID" | "PH" | "VN") echo "9" ;; # 东南亚
|
|
||||||
"IN") echo "10" ;; # 印度
|
|
||||||
"ZA" | "NG" | "EG" | "KE" | "MA" | "TN" | "GH" | "CI" | "SN" | "UG" | "ET" | "MZ" | "ZM" | "ZW" | "BW" | "MW" | "NA" | "RW" | "SD" | "DJ" | "CM" | "AO") echo "11" ;; # 非洲
|
|
||||||
*) echo "0" ;; # 跨国平台
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# 流媒体解锁测试函数
|
|
||||||
run_streaming_test() {
|
|
||||||
local region
|
|
||||||
region=$(detect_region)
|
|
||||||
echo "运行${YELLOW}流媒体解锁测试...${NC}"
|
|
||||||
streaming_result=$(run_and_capture "echo '$region' | bash <(curl -L -s media.ispvps.com)")
|
|
||||||
}
|
|
||||||
|
|
||||||
# 统计使用次数
|
# 统计使用次数
|
||||||
sum_run_times() {
|
sum_run_times() {
|
||||||
local COUNT
|
local COUNT
|
||||||
@ -170,7 +154,8 @@ run_all_tests() {
|
|||||||
|
|
||||||
# 流媒体解锁
|
# 流媒体解锁
|
||||||
echo "运行${YELLOW}流媒体解锁测试...${NC}"
|
echo "运行${YELLOW}流媒体解锁测试...${NC}"
|
||||||
run_streaming_test
|
region=$(detect_region)
|
||||||
|
streaming_result=$(run_and_capture "echo '$region' | bash <(curl -L -s media.ispvps.com)")
|
||||||
|
|
||||||
# 响应测试
|
# 响应测试
|
||||||
echo "运行${YELLOW}响应测试...${NC}"
|
echo "运行${YELLOW}响应测试...${NC}"
|
||||||
|
Loading…
Reference in New Issue
Block a user