Skip to content

Commit

Permalink
Allow all subnets that is divisible by 16 without remainder - #6
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo committed May 9, 2023
1 parent 1b5023f commit 1764b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ipv6-proxy-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <number> count of proxies]
[-u | --username <string> proxy auth username]
[-p | --password <string> proxy password]
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1764b0e

Please sign in to comment.