From e24598ddbe236d6f9e23b03d7ed52a034ccdad91 Mon Sep 17 00:00:00 2001 From: bol-van Date: Sun, 11 Dec 2022 09:52:01 +0300 Subject: [PATCH] get_reestr: download compressed from github --- ipset/get_reestr_combined.sh | 2 +- ipset/get_reestr_hostlist.sh | 2 +- ipset/get_reestr_ip.sh | 2 +- ipset/get_reestr_resolve.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ipset/get_reestr_combined.sh b/ipset/get_reestr_combined.sh index c71697d..c553013 100755 --- a/ipset/get_reestr_combined.sh +++ b/ipset/get_reestr_combined.sh @@ -42,7 +42,7 @@ dig_reestr() getuser && { - curl -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" -o "$ZREESTR" || + curl -H "Accept-Encoding: gzip" -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" | gunzip - >"$ZREESTR" || { echo reestr list download failed exit 2 diff --git a/ipset/get_reestr_hostlist.sh b/ipset/get_reestr_hostlist.sh index 77ec571..7b6ab22 100755 --- a/ipset/get_reestr_hostlist.sh +++ b/ipset/get_reestr_hostlist.sh @@ -15,7 +15,7 @@ ZREESTR="$TMPDIR/zapret.txt" #ZURL=https://reestr.rublacklist.net/api/current ZURL=https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv -curl -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL" >"$ZREESTR" || +curl -H "Accept-Encoding: gzip" -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" | gunzip - >"$ZREESTR" || { echo reestr list download failed exit 2 diff --git a/ipset/get_reestr_ip.sh b/ipset/get_reestr_ip.sh index ef24881..2af8319 100755 --- a/ipset/get_reestr_ip.sh +++ b/ipset/get_reestr_ip.sh @@ -28,7 +28,7 @@ dig_reestr() } getuser && { - curl -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" -o "$ZREESTR" || + curl -H "Accept-Encoding: gzip" -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" | gunzip - >"$ZREESTR" || { echo reestr list download failed exit 2 diff --git a/ipset/get_reestr_resolve.sh b/ipset/get_reestr_resolve.sh index ae986ed..cffa1b2 100755 --- a/ipset/get_reestr_resolve.sh +++ b/ipset/get_reestr_resolve.sh @@ -15,7 +15,7 @@ getuser && { # both disabled [ "$DISABLE_IPV4" = "1" ] && [ "$DISABLE_IPV6" = "1" ] && exit 0 - curl -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL" >"$ZREESTR" || + curl -H "Accept-Encoding: gzip" -k --fail --max-time 600 --connect-timeout 5 --retry 3 --max-filesize 251658240 "$ZURL_REESTR" | gunzip - >"$ZREESTR" || { echo reestr list download failed exit 2