chore (blockcheck): ask when REPEATS > 1

and fix TIMEOUT_FLAG
This commit is contained in:
GoSSy4691 2024-10-08 20:47:24 +03:00
parent 4deac3e2dc
commit 62b81e3356

View File

@ -869,7 +869,7 @@ curl_test()
[ $REPEATS -gt 1 ] && echo 'AVAILABLE'
else
code=$?
if [ "$TIMEOUT_FLAG" = "Y" ] && [ $code -eq 28 ]; then
if [ "$TIMEOUT_FLAG" = 1 ] && [ $code -eq 28 ]; then
echo "Timeout occurred. Interrupting further attempts."
break
fi
@ -1592,10 +1592,6 @@ ask_params()
[ "$IGNORE_CA" = 1 ] && CURL_OPT=-k
}
TIMEOUT_FLAG=N
echo
ask_yes_no_var TIMEOUT_FLAG "Interrupt on timeout (Y/N) [default: N]"
echo
echo "sometimes ISPs use multiple DPIs or load balancing. bypass strategies may work unstable."
printf "how many times to repeat each test (default: 1) : "
@ -1606,6 +1602,12 @@ ask_params()
exitp 1
}
TIMEOUT_FLAG=0
if [ "$REPEATS" -gt 1 ]; then
echo
ask_yes_no_var TIMEOUT_FLAG "Interrupt on timeout"
fi
echo
echo quick - scan as fast as possible to reveal any working strategy
echo standard - do investigation what works on your DPI