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 962f017
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Old instance will be disabled and new starts without reinstallation very quickly

**Command line arguments:**

- `-s` or `--subnet` - IPv6 [subnet](https://docs.netgate.com/pfsense/en/latest/network/ipv6/subnets.html), fully dedicated for your server. `48` or `64`, default `64`
- `-s` or `--subnet` - IPv6 [subnet](https://docs.netgate.com/pfsense/en/latest/network/ipv6/subnets.html), fully dedicated for your server. `16`, `32`, `48`, `64`, `80`, `96` or `112`, default `64`
- `-c` or `--proxy-count` - The total number of proxies you want to have (from 1 to 10000)
- `-t` or `--proxies-type` - Proxies type - `http` or `socks5`. Default `http`, if no value provided
- `-u` or `--username` - All proxies auth login
Expand Down
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 962f017

Please sign in to comment.