ipset: rewrite IPSET_HOOK logic. now scripts outputs ip addresses

This commit is contained in:
bol-van
2022-03-17 13:26:06 +03:00
parent 027b3818c3
commit e079e3a607
3 changed files with 28 additions and 15 deletions

4
config
View File

@@ -13,8 +13,8 @@ SET_MAXELEM=522288
# too low hashsize can cause memory allocation errors on low RAM systems , even if RAM is enough
# too large hashsize will waste lots of RAM
IPSET_OPT="hashsize 262144 maxelem $SET_MAXELEM"
# create_ipset hook
#IPSET_POST_HOOK="/etc/zapret.ipset.hook"
# dynamically generate additional ip. $1 = ipset/nfset/table name
#IPSET_HOOK="/etc/zapret.ipset.hook"
# options for ip2net. "-4" or "-6" auto added by ipset create script
IP2NET_OPT4="--prefix-length=22-30 --v4-threshold=3/4"