diff --git a/linux/src/cf.sh b/linux/src/cf.sh index 10667d9..c5b88aa 100644 --- a/linux/src/cf.sh +++ b/linux/src/cf.sh @@ -9,8 +9,6 @@ while true do while true do - declare -i n - declare -i count rm -rf temp ip.txt data.txt meta.txt log.txt temp.txt while true do @@ -58,7 +56,7 @@ do file=$(cat data.txt | grep file= | cut -f 2- -d'=') url=$(cat data.txt | grep url= | cut -f 2- -d'=') app=$(cat data.txt | grep app= | cut -f 2- -d'=') - if [ "$app" != "20210307" ] + if [ "$app" != "20210308" ] then echo 发现新版本程序: $app echo 更新地址: $url @@ -70,13 +68,10 @@ do echo $i>>ip.txt done rm -rf meta.txt data.txt - n=0 - m=$(cat ip.txt | wc -l) - count=m/30+1 - ./fping -f ip.txt -c $count -i 0 > fping.txt - sort -t/ -k 5n fping.txt | cut -f 1 -d: | sed '31,$d' > ip.txt + ./fping -f ip.txt -c 10 -i 0 > fping.txt + sort -t/ -k 5n -k 8n fping.txt | cut -f 1 -d: | sed '21,$d' > ip.txt rm -rf fping.txt - echo 选取30个丢包率最少的IP地址下载测速 + echo 选取20个丢包率最少的IP地址下载测速 mkdir temp for i in `cat ip.txt` do @@ -88,6 +83,7 @@ do echo 测速完成 ls -S temp > ip.txt rm -rf temp + declare -i n n=$(wc -l ip.txt | awk '{print $1}') if [ $n -ge 3 ]; then first=$(sed -n '1p' ip.txt) @@ -169,9 +165,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210307-$first-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210308-$first-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210307-$first-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210308-$first-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi echo 第一次测试 $second curl --resolve $domain:443:$second https://$domain/$file -o /dev/null --connect-timeout 5 --max-time 10 > log.txt 2>&1 @@ -247,9 +243,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210307-$second-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210308-$second-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210307-$second-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210308-$second-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi echo 第一次测试 $third curl --resolve $domain:443:$third https://$domain/$file -o /dev/null --connect-timeout 5 --max-time 10 > log.txt 2>&1 @@ -325,9 +321,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210307-$third-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210308-$third-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210307-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210308-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi fi done @@ -340,7 +336,7 @@ done start_seconds=$(date --date="$starttime" +%s) end_seconds=$(date --date="$endtime" +%s) clear - curl --ipv4 --resolve service.udpfile.com:443:$anycast --retry 3 -s -X POST -d ''20210307-$anycast-$max'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o temp.txt + curl --ipv4 --resolve service.udpfile.com:443:$anycast --retry 3 -s -X POST -d ''20210308-$anycast-$max'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o temp.txt publicip=$(cat temp.txt | grep publicip= | cut -f 2- -d'=') colo=$(cat temp.txt | grep colo= | cut -f 2- -d'=') rm -rf temp.txt diff --git a/shell/cf-openwrt.sh b/shell/cf-openwrt.sh index 4a3125d..1356bd1 100644 --- a/shell/cf-openwrt.sh +++ b/shell/cf-openwrt.sh @@ -9,9 +9,9 @@ while true do while true do + declare -i m declare -i n declare -i per - declare -i count rm -rf icmp temp data.txt meta.txt log.txt anycast.txt temp.txt mkdir icmp while true @@ -60,7 +60,7 @@ do file=$(cat data.txt | grep file= | cut -f 2- -d'=') url=$(cat data.txt | grep url= | cut -f 2- -d'=') app=$(cat data.txt | grep app= | cut -f 2- -d'=') - if [ "$app" != "20210307" ] + if [ "$app" != "20210308" ] then echo 发现新版本程序: $app echo 更新地址: $url @@ -72,18 +72,16 @@ do echo $i>>anycast.txt done rm -rf meta.txt data.txt - n=0 m=$(cat anycast.txt | wc -l) - count=m/30+1 for i in `cat anycast.txt` do - ping -c $count -i 1 -n -q $i > icmp/$n.log& + ping -c 10 -i 1 -n -q $i > icmp/$n.log& n=$[$n+1] per=$n*100/$m while true do p=$(ps -ef | grep ping | grep -v "grep" | wc -l) - if [ $p -ge 200 ] + if [ $p -ge 100 ] then echo 正在测试 ICMP 丢包率:进程数 $p,已完成 $per % sleep 1 @@ -96,7 +94,7 @@ do rm -rf anycast.txt while true do - p=$(ps -ef | grep ping | grep -v "grep" | wc -l) + p=$(ps | grep ping | grep -v "grep" | wc -l) if [ $p -ne 0 ] then echo 等待 ICMP 进程结束:剩余进程数 $p @@ -106,9 +104,9 @@ do break fi done - cat icmp/*.log | grep 'statistics\|loss' | sed -n '{N;s/\n/\t/p}' | cut -f 1 -d'%' | awk '{print $NF,$2}' | sort -n | awk '{print $2}' | sed '31,$d' > ip.txt + cat icmp/*.log | grep 'statistics\|loss\|avg' | sed 'N;N;s/\n/ /g' | awk -F, '{print $1,$3}' | awk '{print $2,$9,$15}' | awk -F% '{print $1,$2}' | awk -F/ '{print $1,$2}' | awk '{print $2,$4,$1}' | sort -n | awk '{print $3}' | sed '21,$d' > ip.txt rm -rf icmp - echo 选取30个丢包率最少的IP地址下载测速 + echo 选取20个丢包率最少的IP地址下载测速 mkdir temp for i in `cat ip.txt` do @@ -201,9 +199,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210307-$first-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210308-$first-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210307-$first-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210308-$first-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi echo 第一次测试 $second curl --resolve $domain:443:$second https://$domain/$file -o /dev/null --connect-timeout 5 --max-time 10 > log.txt 2>&1 @@ -279,9 +277,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210307-$second-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210308-$second-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210307-$second-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210308-$second-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi echo 第一次测试 $third curl --resolve $domain:443:$third https://$domain/$file -o /dev/null --connect-timeout 5 --max-time 10 > log.txt 2>&1 @@ -357,9 +355,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210307-$third-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210308-$third-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210307-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210308-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi fi done @@ -372,7 +370,7 @@ done start_seconds=$(date --date="$starttime" +%s) end_seconds=$(date --date="$endtime" +%s) clear - curl --ipv4 --resolve service.udpfile.com:443:$anycast --retry 3 -s -X POST -d ''20210307-$anycast-$max'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o temp.txt + curl --ipv4 --resolve service.udpfile.com:443:$anycast --retry 3 -s -X POST -d ''20210308-$anycast-$max'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o temp.txt publicip=$(cat temp.txt | grep publicip= | cut -f 2- -d'=') colo=$(cat temp.txt | grep colo= | cut -f 2- -d'=') rm -rf temp.txt diff --git a/shell/cf.sh b/shell/cf.sh index 2ed60dc..7404346 100644 --- a/shell/cf.sh +++ b/shell/cf.sh @@ -9,9 +9,9 @@ while true do while true do + declare -i m declare -i n declare -i per - declare -i count rm -rf icmp temp data.txt meta.txt log.txt anycast.txt temp.txt mkdir icmp while true @@ -60,7 +60,7 @@ do file=$(cat data.txt | grep file= | cut -f 2- -d'=') url=$(cat data.txt | grep url= | cut -f 2- -d'=') app=$(cat data.txt | grep app= | cut -f 2- -d'=') - if [ "$app" != "20210307" ] + if [ "$app" != "20210308" ] then echo 发现新版本程序: $app echo 更新地址: $url @@ -72,18 +72,16 @@ do echo $i>>anycast.txt done rm -rf meta.txt data.txt - n=0 m=$(cat anycast.txt | wc -l) - count=m/30+1 for i in `cat anycast.txt` do - ping -c $count -i 0.2 -n -q $i > icmp/$n.log& + ping -c 10 -i 0.2 -n -q $i > icmp/$n.log& n=$[$n+1] per=$n*100/$m while true do - p=$(ps -ef | grep ping | grep -v "grep" | wc -l) - if [ $p -ge 200 ] + p=$(ps | grep ping | grep -v "grep" | wc -l) + if [ $p -ge 100 ] then echo 正在测试 ICMP 丢包率:进程数 $p,已完成 $per % sleep 0.5 @@ -106,9 +104,9 @@ do break fi done - cat icmp/*.log | sed -n '3~5p;4~5p' | sed -n '{N;s/\n/\t/p}' | cut -f 1 -d'%' | awk '{print $2,$NF}' | sort -k 2 -n | awk '{print $1}' | sed '31,$d' > ip.txt + cat icmp/*.log | sed -n '3~5p;4~5p;5~5p' | sed 'N;N;s/\n/ /g' | awk -F, '{print $1,$3,$4}' | sort -t' ' -n -k 9 | awk -F/ '{print $1,$5}' | awk '{print $2,$9,$16}' | sort -t' ' -n -k 2 -k 3 | awk '{print $1}' | sed '21,$d' > ip.txt rm -rf icmp - echo 选取30个丢包率最少的IP地址下载测速 + echo 选取20个丢包率最少的IP地址下载测速 mkdir temp for i in `cat ip.txt` do @@ -201,9 +199,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210307-$first-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210308-$first-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210307-$first-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$first --retry 3 -s -X POST -d ''20210308-$first-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi echo 第一次测试 $second curl --resolve $domain:443:$second https://$domain/$file -o /dev/null --connect-timeout 5 --max-time 10 > log.txt 2>&1 @@ -279,9 +277,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210307-$second-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210308-$second-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210307-$second-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$second --retry 3 -s -X POST -d ''20210308-$second-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi echo 第一次测试 $third curl --resolve $domain:443:$third https://$domain/$file -o /dev/null --connect-timeout 5 --max-time 10 > log.txt 2>&1 @@ -357,9 +355,9 @@ do echo 峰值速度 $max kB/s if [ $max1 -ge $max2 ] then - curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210307-$third-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210308-$third-$max1'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 else - curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210307-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 + curl --ipv4 --resolve service.udpfile.com:443:$third --retry 3 -s -X POST -d ''20210308-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10 fi fi done @@ -372,7 +370,7 @@ done start_seconds=$(date --date="$starttime" +%s) end_seconds=$(date --date="$endtime" +%s) clear - curl --ipv4 --resolve service.udpfile.com:443:$anycast --retry 3 -s -X POST -d ''20210307-$anycast-$max'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o temp.txt + curl --ipv4 --resolve service.udpfile.com:443:$anycast --retry 3 -s -X POST -d ''20210308-$anycast-$max'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o temp.txt publicip=$(cat temp.txt | grep publicip= | cut -f 2- -d'=') colo=$(cat temp.txt | grep colo= | cut -f 2- -d'=') rm -rf temp.txt diff --git "a/windows/CF\344\274\230\351\200\211IP.bat" "b/windows/CF\344\274\230\351\200\211IP.bat" index 34e18fe..b994cbe 100644 --- "a/windows/CF\344\274\230\351\200\211IP.bat" +++ "b/windows/CF\344\274\230\351\200\211IP.bat" @@ -70,38 +70,62 @@ set url=%%a ) for /f "tokens=2 delims==" %%a in ('findstr /C:"app" data.txt') do ( set app=%%a -if !app! NEQ 20210307 (echo °汾: !app!&echo µַ: !url!&title ºſʹ&echo ˳&pause>nul&exit) +if !app! NEQ 20210308 (echo °汾: !app!&echo µַ: !url!&title ºſʹ&echo ˳&pause>nul&exit) ) del data.txt -for /f "tokens=2 delims=:" %%a in ('find /c /v "" ip.txt') do ( -set /a count=%%a -set /a count=count/30+1 -) title ICMP -fping -f ip.txt -c %count% --interval=0 -s > ping.csv -findstr "%%" ping.csv > temp.csv +fping -f ip.txt -c 10 --interval=0 -s > ping.csv +echo ʼ +findstr "%%" ping.csv>temp.csv +del ping.csv +for /f "tokens=1,2,5 delims=, " %%a in (temp.csv) do ( +echo %%a,%%b,%%c>>ping.csv +) +del temp.csv +for /f "delims=" %%a in (ping.csv) do ( +set temp=%%a +set temp=!temp:%%=! +set temp=!temp:ms=! +echo !temp!>>temp.csv +) del ping.csv +for /f "tokens=1,2,3 delims=," %%a in (temp.csv) do ( +if %%b LSS 10 (echo %%b,%%c,%%a>>ping.csv) else if %%b LSS 100 (echo %%b,%%c,%%a>>ping.csv) +) +del temp.csv +for /f "tokens=1,2,3 delims=," %%a in (ping.csv) do ( +set temp=%%b +set temp=!temp:.0=! +set temp=!temp:.1=! +set temp=!temp:.2=! +set temp=!temp:.3=! +set temp=!temp:.4=! +set temp=!temp:.5=! +set temp=!temp:.6=! +set temp=!temp:.7=! +set temp=!temp:.8=! +set temp=!temp:.9=! +if !temp! LSS 100 (echo %%a, %%b,%%c>>temp.csv) else (echo %%a,%%b,%%c>>temp.csv) +) +sort /+5 temp.csv | sort /o ping.csv del ip.txt -sort /+17 temp.csv /o ping.csv del temp.csv del sort.txt cls set /a a=0 -for /f "delims=" %%a in (ping.csv) do ( -set s=%%a -set s=!s:~0,15! +for /f "tokens=3 delims=," %%a in (ping.csv) do ( +echo %%a>>sort.txt set /a a=a+1 title ȡԺIPַ----ڴ !a! -echo !s%!>>sort.txt ) del ping.csv cls set count=0 for /f "tokens=1,2" %%a in ('type "sort.txt"') do ( echo %%a >> ip.txt -title ѡȡ30ٵIPַز +title ѡȡ20ٵIPַز set /a count+=1 -if !count! equ 30 goto speedtest +if !count! equ 20 goto speedtest ) :speedtest del sort.txt @@ -224,7 +248,7 @@ if !max! GEQ !speed! (cls&set anycast=!a!&goto end) else (goto three) chcp 936 del CRLF.txt cut.txt speed.txt cls -if !max1! GEQ !max2! (curl --ipv4 --resolve service.udpfile.com:443:!a! --retry 3 -s -X POST -d "20210307-!a!-!max1!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) else (curl --ipv4 --resolve service.udpfile.com:443:!a! --retry 3 -s -X POST -d "20210307-!a!-!max2!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) +if !max1! GEQ !max2! (curl --ipv4 --resolve service.udpfile.com:443:!a! --retry 3 -s -X POST -d "20210308-!a!-!max1!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) else (curl --ipv4 --resolve service.udpfile.com:443:!a! --retry 3 -s -X POST -d "20210308-!a!-!max2!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) echo ڶβ !a! ,ֵٶ !max! kB/s echo һβ !b! curl --resolve !domain!:443:!b! https://!domain!/!file! -o nul --connect-timeout 5 --max-time 10 > CR.txt 2>&1 @@ -309,7 +333,7 @@ if !max! GEQ !speed! (cls&set anycast=!b!&goto end) else (goto five) chcp 936 del CRLF.txt cut.txt speed.txt cls -if !max1! GEQ !max2! (curl --ipv4 --resolve service.udpfile.com:443:!b! --retry 3 -s -X POST -d "20210307-!b!-!max1!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) else (curl --ipv4 --resolve service.udpfile.com:443:!b! --retry 3 -s -X POST -d "20210307-!b!-!max2!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) +if !max1! GEQ !max2! (curl --ipv4 --resolve service.udpfile.com:443:!b! --retry 3 -s -X POST -d "20210308-!b!-!max1!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) else (curl --ipv4 --resolve service.udpfile.com:443:!b! --retry 3 -s -X POST -d "20210308-!b!-!max2!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) echo ڶβ !b! ,ֵٶ !max! kB/s echo һβ !c! curl --resolve !domain!:443:!c! https://!domain!/!file! -o nul --connect-timeout 5 --max-time 10 > CR.txt 2>&1 @@ -395,7 +419,7 @@ chcp 936 del CRLF.txt cut.txt speed.txt cls echo ڶβ !c! ,ֵٶ !max! kB/s -if !max1! GEQ !max2! (curl --ipv4 --resolve service.udpfile.com:443:!c! --retry 3 -s -X POST -d "20210307-!c!-!max1!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) else (curl --ipv4 --resolve service.udpfile.com:443:!c! --retry 3 -s -X POST -d "20210307-!c!-!max2!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) +if !max1! GEQ !max2! (curl --ipv4 --resolve service.udpfile.com:443:!c! --retry 3 -s -X POST -d "20210308-!c!-!max1!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) else (curl --ipv4 --resolve service.udpfile.com:443:!c! --retry 3 -s -X POST -d "20210308-!c!-!max2!" https://service.udpfile.com?asn=%asn%^&city=%city% -o nul --connect-timeout 5 --max-time 10) goto start :end set /a realbandwidth=max/128 @@ -405,7 +429,7 @@ if %time:~6,1% EQU 0 (set /a stopS=%time:~7,1%) else (set /a stopS=%time:~6,2%) set /a starttime=%startH%*3600+%startM%*60+%startS% set /a stoptime=%stopH%*3600+%stopM%*60+%stopS% if %starttime% GTR %stoptime% (set /a alltime=86400-%starttime%+%stoptime%) else (set /a alltime=%stoptime%-%starttime%) -curl --ipv4 --resolve service.udpfile.com:443:!anycast! --retry 3 -s -X POST -d "20210307-!anycast!-!max!" https://service.udpfile.com?asn=%asn%^&city=%city% -o data.txt +curl --ipv4 --resolve service.udpfile.com:443:!anycast! --retry 3 -s -X POST -d "20210308-!anycast!-!max!" https://service.udpfile.com?asn=%asn%^&city=%city% -o data.txt for /f "tokens=2 delims==" %%a in ('findstr /C:"publicip" data.txt') do ( set publicip=%%a )