From 62b81e33563e1ca81534514f6997c1d55a4883b9 Mon Sep 17 00:00:00 2001 From: GoSSy4691 Date: Tue, 8 Oct 2024 20:47:24 +0300 Subject: [PATCH] chore (blockcheck): ask when REPEATS > 1 and fix TIMEOUT_FLAG --- blockcheck.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/blockcheck.sh b/blockcheck.sh index 158fc04..874c305 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -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