Skip to content

Commit

Permalink
修复linux下测速统计错误
Browse files Browse the repository at this point in the history
  • Loading branch information
badafans committed Aug 25, 2021
1 parent d22994e commit 8453592
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 120 deletions.
24 changes: 9 additions & 15 deletions linux/src/cf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ while true
do
while true
do
rm -rf temp ip.txt data.txt meta.txt log.txt temp.txt
rm -rf temp ip.txt data.txt meta.txt log.txt temp.txt speed.txt
while true
do
if [ -f "resolve.txt" ]
Expand Down Expand Up @@ -56,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" != "20210315" ]
if [ "$app" != "20210825" ]
then
echo 发现新版本程序: $app
echo 更新地址: $url
Expand Down Expand Up @@ -114,7 +114,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -150,7 +149,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -165,9 +163,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$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
Expand All @@ -192,7 +190,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -228,7 +225,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -243,9 +239,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$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
Expand All @@ -270,7 +266,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -306,7 +301,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -321,9 +315,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10
fi
fi
done
Expand All @@ -336,7 +330,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 ''20210315-$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 ''20210825-$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
Expand Down
24 changes: 9 additions & 15 deletions shell/cf-openwrt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ do
declare -i m
declare -i n
declare -i per
rm -rf icmp temp data.txt meta.txt log.txt anycast.txt temp.txt
rm -rf icmp temp data.txt meta.txt log.txt anycast.txt temp.txt speed.txt
mkdir icmp
while true
do
Expand Down Expand Up @@ -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" != "20210315" ]
if [ "$app" != "20210825" ]
then
echo 发现新版本程序: $app
echo 更新地址: $url
Expand Down Expand Up @@ -149,7 +149,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -185,7 +184,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -200,9 +198,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$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
Expand All @@ -227,7 +225,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -263,7 +260,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -278,9 +274,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$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
Expand All @@ -305,7 +301,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -341,7 +336,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -356,9 +350,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10
fi
fi
done
Expand All @@ -371,7 +365,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 ''20210315-$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 ''20210825-$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
Expand Down
24 changes: 9 additions & 15 deletions shell/cf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ do
declare -i m
declare -i n
declare -i per
rm -rf icmp temp data.txt meta.txt log.txt anycast.txt temp.txt
rm -rf icmp temp data.txt meta.txt log.txt anycast.txt temp.txt speed.txt
mkdir icmp
while true
do
Expand Down Expand Up @@ -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" != "20210315" ]
if [ "$app" != "20210825" ]
then
echo 发现新版本程序: $app
echo 更新地址: $url
Expand Down Expand Up @@ -149,7 +149,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -185,7 +184,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -200,9 +198,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$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
Expand All @@ -227,7 +225,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -263,7 +260,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -278,9 +274,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$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
Expand All @@ -305,7 +301,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand Down Expand Up @@ -341,7 +336,6 @@ do
max=0
for i in `cat speed.txt`
do
max=$i
if [ $i -ge $max ]; then
max=$i
fi
Expand All @@ -356,9 +350,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 ''20210315-$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 ''20210825-$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 ''20210315-$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 ''20210825-$third-$max2'' "https://service.udpfile.com?asn="$asn"&city="$city"" -o /dev/null --connect-timeout 5 --max-time 10
fi
fi
done
Expand All @@ -371,7 +365,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 ''20210315-$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 ''20210825-$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
Expand Down
10 changes: 5 additions & 5 deletions windows/CF优选IP.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ set url=%%a
)
for /f "tokens=2 delims==" %%a in ('findstr /C:"app" data.txt') do (
set app=%%a
if !app! NEQ 20210315 (echo 发现新版本程序: !app!&echo 更新地址: !url!&title 更新后才可以使用&echo 按任意键退出程序&pause>nul&exit)
if !app! NEQ 20210825 (echo 发现新版本程序: !app!&echo 更新地址: !url!&title 更新后才可以使用&echo 按任意键退出程序&pause>nul&exit)
)
del data.txt
title 测试 ICMP 丢包率
Expand Down Expand Up @@ -248,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 "20210315-!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 "20210315-!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 "20210825-!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 "20210825-!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
Expand Down Expand Up @@ -333,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 "20210315-!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 "20210315-!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 "20210825-!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 "20210825-!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
Expand Down Expand Up @@ -419,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 "20210315-!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 "20210315-!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 "20210825-!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 "20210825-!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
Expand All @@ -429,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 "20210315-!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 "20210825-!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
)
Expand Down
Loading

0 comments on commit 8453592

Please sign in to comment.