diff --git a/README.md b/README.md index d6185af..e71a616 100644 --- a/README.md +++ b/README.md @@ -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 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;