mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-29 21:40:52 +03:00
ipset: github disabled gzip support
This commit is contained in:
parent
dcae31fae8
commit
eebe68ca65
@ -103,13 +103,21 @@ zzexist()
|
||||
{
|
||||
[ -f "$1.gz" ] || [ -f "$1" ]
|
||||
}
|
||||
zztest()
|
||||
{
|
||||
gzip -t "$1" 2>/dev/null
|
||||
}
|
||||
zzcat()
|
||||
{
|
||||
if [ -f "$1.gz" ]; then
|
||||
gunzip -c "$1.gz"
|
||||
elif [ -f "$1" ]; then
|
||||
if zztest "$1"; then
|
||||
gunzip -c "$1"
|
||||
else
|
||||
cat "$1"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
zz()
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ dl_checked()
|
||||
# $3 - minsize
|
||||
# $4 - maxsize
|
||||
# $5 - maxtime
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time $5 --connect-timeout 10 --retry 4 --max-filesize $4 "$1" | gunzip - >"$2" ||
|
||||
curl -k --fail --max-time $5 --connect-timeout 10 --retry 4 --max-filesize $4 -o "$2" "$1" ||
|
||||
{
|
||||
echo list download failed : $1
|
||||
return 2
|
||||
|
@ -19,7 +19,7 @@ dl()
|
||||
# $2 - file
|
||||
# $3 - minsize
|
||||
# $4 - maxsize
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time 120 --connect-timeout 10 --retry 4 --max-filesize $4 "$1" | gunzip - >"$TMPLIST" ||
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time 120 --connect-timeout 10 --retry 4 --max-filesize $4 -o "$TMPLIST" "$1" ||
|
||||
{
|
||||
echo list download failed : $1
|
||||
exit 2
|
||||
@ -29,7 +29,7 @@ dl()
|
||||
echo list is too small : $dlsize bytes. can be bad.
|
||||
exit 2
|
||||
fi
|
||||
zz "$2" <"$TMPLIST"
|
||||
zzcat "$TMPLIST" | zz "$2"
|
||||
rm -f "$TMPLIST"
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ dl()
|
||||
# $2 - file
|
||||
# $3 - minsize
|
||||
# $4 - maxsize
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time 120 --connect-timeout 10 --retry 4 --max-filesize $4 "$1" | gunzip - >"$TMPLIST" ||
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time 120 --connect-timeout 10 --retry 4 --max-filesize $4 -o "$TMPLIST" "$1" ||
|
||||
{
|
||||
echo list download failed : $1
|
||||
exit 2
|
||||
@ -29,7 +29,7 @@ dl()
|
||||
echo list is too small : $dlsize bytes. can be bad.
|
||||
exit 2
|
||||
fi
|
||||
zz "$2" <"$TMPLIST"
|
||||
zzcat "$TMPLIST" | zz "$2"
|
||||
rm -f "$TMPLIST"
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ dl()
|
||||
# $2 - file
|
||||
# $3 - minsize
|
||||
# $4 - maxsize
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time 120 --connect-timeout 10 --retry 4 --max-filesize $4 "$1" | gunzip - >"$TMPLIST" ||
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time 120 --connect-timeout 10 --retry 4 --max-filesize $4 -o "$TMPLIST" "$1" ||
|
||||
{
|
||||
echo list download failed : $1
|
||||
exit 2
|
||||
@ -28,7 +28,7 @@ dl()
|
||||
echo list is too small : $dlsize bytes. can be bad.
|
||||
exit 2
|
||||
fi
|
||||
zz "$2" <"$TMPLIST"
|
||||
zzcat "$TMPLIST" | zz "$2"
|
||||
rm -f "$TMPLIST"
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ dl_checked()
|
||||
# $3 - minsize
|
||||
# $4 - maxsize
|
||||
# $5 - maxtime
|
||||
curl -H "Accept-Encoding: gzip" -k --fail --max-time $5 --connect-timeout 10 --retry 4 --max-filesize $4 "$1" | gunzip - >"$2" ||
|
||||
curl -k --fail --max-time $5 --connect-timeout 10 --retry 4 --max-filesize $4 -o "$2" "$1" ||
|
||||
{
|
||||
echo list download failed : $1
|
||||
return 2
|
||||
|
Loading…
Reference in New Issue
Block a user