mirror of
https://github.com/bol-van/zapret.git
synced 2026-02-04 00:30:34 +03:00
Revert "ipset: check dns before processing lists"
This reverts commit 033def82ffec51155bb44daf7cef408647e5b8cd.
This commit is contained in:
@@ -9,6 +9,7 @@ ZREESTR="$TMPDIR/reestr.txt"
|
||||
#ZURL_REESTR=https://reestr.rublacklist.net/api/current
|
||||
ZURL_REESTR=https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv
|
||||
|
||||
getuser
|
||||
|
||||
dig_reestr()
|
||||
{
|
||||
@@ -22,31 +23,29 @@ dig_reestr()
|
||||
}
|
||||
|
||||
|
||||
getuser && {
|
||||
# assume all https banned by ip
|
||||
curl -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" -o "$ZREESTR" ||
|
||||
{
|
||||
echo reestr list download failed
|
||||
exit 2
|
||||
}
|
||||
dlsize=$(LANG=C wc -c "$ZREESTR" | xargs | cut -f 1 -d ' ')
|
||||
if test $dlsize -lt 1048576; then
|
||||
echo reestr ip list is too small. can be bad.
|
||||
exit 2
|
||||
fi
|
||||
#sed -i 's/\\n/\r\n/g' $ZREESTR
|
||||
# assume all https banned by ip
|
||||
curl -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" -o "$ZREESTR" ||
|
||||
{
|
||||
echo reestr list download failed
|
||||
exit 2
|
||||
}
|
||||
dlsize=$(LANG=C wc -c "$ZREESTR" | xargs | cut -f 1 -d ' ')
|
||||
if test $dlsize -lt 1048576; then
|
||||
echo reestr ip list is too small. can be bad.
|
||||
exit 2
|
||||
fi
|
||||
#sed -i 's/\\n/\r\n/g' $ZREESTR
|
||||
|
||||
get_ip_regex
|
||||
get_ip_regex
|
||||
|
||||
[ "$DISABLE_IPV4" != "1" ] && {
|
||||
dig_reestr "$REG_IPV4" "$ZIPLIST" 4
|
||||
}
|
||||
|
||||
[ "$DISABLE_IPV6" != "1" ] && {
|
||||
dig_reestr "$REG_IPV6" "$ZIPLIST6" 6
|
||||
}
|
||||
|
||||
rm -f "$ZREESTR"
|
||||
[ "$DISABLE_IPV4" != "1" ] && {
|
||||
dig_reestr "$REG_IPV4" "$ZIPLIST" 4
|
||||
}
|
||||
|
||||
[ "$DISABLE_IPV6" != "1" ] && {
|
||||
dig_reestr "$REG_IPV6" "$ZIPLIST6" 6
|
||||
}
|
||||
|
||||
rm -f "$ZREESTR"
|
||||
|
||||
"$IPSET_DIR/create_ipset.sh"
|
||||
|
||||
Reference in New Issue
Block a user