From 4deac3e2dccd533a00e135aa051ad2866669c51a Mon Sep 17 00:00:00 2001 From: GoSSy4691 Date: Tue, 8 Oct 2024 20:27:40 +0300 Subject: [PATCH] feat (blockcheck): add ask skip timeout --- blockcheck.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/blockcheck.sh b/blockcheck.sh index eb91336..158fc04 100755 --- a/blockcheck.sh +++ b/blockcheck.sh @@ -869,6 +869,10 @@ curl_test() [ $REPEATS -gt 1 ] && echo 'AVAILABLE' else code=$? + if [ "$TIMEOUT_FLAG" = "Y" ] && [ $code -eq 28 ]; then + echo "Timeout occurred. Interrupting further attempts." + break + fi [ "$SCANLEVEL" = quick ] && break fi done @@ -1588,6 +1592,10 @@ 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) : "