From 51afc9fa1e0d483eb38b2b185189e194112b0230 Mon Sep 17 00:00:00 2001 From: gyurix Date: Mon, 13 Mar 2023 09:05:04 +0000 Subject: [PATCH] If no target ip added check proxy variable is valid IP address or not --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 14e3715..458396a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -147,6 +147,7 @@ if [ ! -z "$SOURCE" ]; then for i in $(echo $SOURCE) ; do if [[ $i =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then SOURCE_IP=$i; + NO_TARGET_IP="true"; else name_resolver $i; debug "source ip is $APP_IP"; @@ -192,7 +193,9 @@ if [ ! -z "$TARGET" ]; then done else debug "TARGET is empty"; - exit; + if [ "$NO_TARGET_IP" != "true" ]; then + exit; + fi fi; # CHECKING WHETHER IS IT NEEDED TO USE PUBLIC PROXY SERVICE