feat (blockcheck): add ask skip timeout

This commit is contained in:
GoSSy4691 2024-10-08 20:27:40 +03:00
parent 2cd6db3ba5
commit 4deac3e2dc

View File

@ -869,6 +869,10 @@ curl_test()
[ $REPEATS -gt 1 ] && echo 'AVAILABLE' [ $REPEATS -gt 1 ] && echo 'AVAILABLE'
else else
code=$? code=$?
if [ "$TIMEOUT_FLAG" = "Y" ] && [ $code -eq 28 ]; then
echo "Timeout occurred. Interrupting further attempts."
break
fi
[ "$SCANLEVEL" = quick ] && break [ "$SCANLEVEL" = quick ] && break
fi fi
done done
@ -1588,6 +1592,10 @@ 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) : "