If no target ip added check proxy variable is valid IP address or not

This commit is contained in:
2023-03-13 09:05:04 +00:00
parent ac3bd2d2df
commit 51afc9fa1e

View File

@@ -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