From 1764b0e75e8a1993d5d4b5bbe1481f1f3a44ccfc Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 9 May 2023 10:14:37 +0300 Subject: [PATCH] Allow all subnets that is divisible by 16 without remainder - #6 --- ipv6-proxy-server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipv6-proxy-server.sh b/ipv6-proxy-server.sh index aff7e6e..f13dea7 100644 --- a/ipv6-proxy-server.sh +++ b/ipv6-proxy-server.sh @@ -6,7 +6,7 @@ if [ "$EUID" -ne 0 ]; fi; # Program help info for users -function usage() { echo "Usage: $0 [-s | --subnet <32|48|64> proxy subnet (default 64)] +function usage() { echo "Usage: $0 [-s | --subnet <16|32|48|64|80|96|112> proxy subnet (default 64)] [-c | --proxy-count count of proxies] [-u | --username proxy auth username] [-p | --password proxy password] @@ -103,7 +103,7 @@ if [ $proxies_type != "http" ] && [ $proxies_type != "socks5" ] ; then usage; fi; -if [ $subnet != 64 ] && [ $subnet != 48 ] && [ $subnet != 32 ]; then +if [ $(expr $subnet % 16) != 0 ]; then echo_log_err "Error: invalid value of '-s' (subnet) parameter"; usage; fi;