mirror of
https://github.com/bol-van/zapret2.git
synced 2026-03-13 22:03:09 +00:00
ipset: mdig eagain support
This commit is contained in:
@@ -41,6 +41,8 @@ AUTOHOSTLIST_DEBUGLOG=0
|
|||||||
|
|
||||||
# number of parallel threads for domain list resolves
|
# number of parallel threads for domain list resolves
|
||||||
MDIG_THREADS=30
|
MDIG_THREADS=30
|
||||||
|
MDIG_EAGAIN=10
|
||||||
|
MDIG_EAGAIN_DELAY=500
|
||||||
|
|
||||||
# ipset/*.sh can compress large lists
|
# ipset/*.sh can compress large lists
|
||||||
GZIP_LISTS=1
|
GZIP_LISTS=1
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ ZUSERLIST_EXCLUDE="$IPSET_RW_DIR/zapret-hosts-user-exclude.txt"
|
|||||||
|
|
||||||
[ -n "$IP2NET" ] || IP2NET="$ZAPRET_BASE/ip2net/ip2net"
|
[ -n "$IP2NET" ] || IP2NET="$ZAPRET_BASE/ip2net/ip2net"
|
||||||
[ -n "$MDIG" ] || MDIG="$ZAPRET_BASE/mdig/mdig"
|
[ -n "$MDIG" ] || MDIG="$ZAPRET_BASE/mdig/mdig"
|
||||||
[ -z "$MDIG_THREADS" ] && MDIG_THREADS=30
|
MDIG_THREADS=${MDIG_THREADS:-30}
|
||||||
|
MDIG_EAGAIN=${MDIG_EAGAIN:-10}
|
||||||
|
MDIG_EAGAIN_DELAY=${MDIG_EAGAIN_DELAY:-500}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -161,7 +163,7 @@ digger()
|
|||||||
if [ -x "$MDIG" ]; then
|
if [ -x "$MDIG" ]; then
|
||||||
local cmd
|
local cmd
|
||||||
[ "$2" = "s" ] && cmd=--stats=1000
|
[ "$2" = "s" ] && cmd=--stats=1000
|
||||||
"$MDIG" --family=$1 --threads=$MDIG_THREADS $cmd
|
"$MDIG" --family=$1 --threads=$MDIG_THREADS --eagain=$MDIG_EAGAIN --eagain-delay=$MDIG_EAGAIN_DELAY $cmd
|
||||||
else
|
else
|
||||||
local A=A
|
local A=A
|
||||||
[ "$1" = "6" ] && A=AAAA
|
[ "$1" = "6" ] && A=AAAA
|
||||||
|
|||||||
Reference in New Issue
Block a user