mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-29 21:40:52 +03:00
chore (blockcheck): ask when REPEATS > 1
and fix TIMEOUT_FLAG
This commit is contained in:
parent
4deac3e2dc
commit
62b81e3356
@ -869,7 +869,7 @@ curl_test()
|
|||||||
[ $REPEATS -gt 1 ] && echo 'AVAILABLE'
|
[ $REPEATS -gt 1 ] && echo 'AVAILABLE'
|
||||||
else
|
else
|
||||||
code=$?
|
code=$?
|
||||||
if [ "$TIMEOUT_FLAG" = "Y" ] && [ $code -eq 28 ]; then
|
if [ "$TIMEOUT_FLAG" = 1 ] && [ $code -eq 28 ]; then
|
||||||
echo "Timeout occurred. Interrupting further attempts."
|
echo "Timeout occurred. Interrupting further attempts."
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -1592,10 +1592,6 @@ ask_params()
|
|||||||
[ "$IGNORE_CA" = 1 ] && CURL_OPT=-k
|
[ "$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
|
||||||
echo "sometimes ISPs use multiple DPIs or load balancing. bypass strategies may work unstable."
|
echo "sometimes ISPs use multiple DPIs or load balancing. bypass strategies may work unstable."
|
||||||
printf "how many times to repeat each test (default: 1) : "
|
printf "how many times to repeat each test (default: 1) : "
|
||||||
@ -1606,6 +1602,12 @@ ask_params()
|
|||||||
exitp 1
|
exitp 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TIMEOUT_FLAG=0
|
||||||
|
if [ "$REPEATS" -gt 1 ]; then
|
||||||
|
echo
|
||||||
|
ask_yes_no_var TIMEOUT_FLAG "Interrupt on timeout"
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo quick - scan as fast as possible to reveal any working strategy
|
echo quick - scan as fast as possible to reveal any working strategy
|
||||||
echo standard - do investigation what works on your DPI
|
echo standard - do investigation what works on your DPI
|
||||||
|
Loading…
Reference in New Issue
Block a user