mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-03 23:20:54 +03:00
get_antizapret use now http://antizapret.prostovpn.org/iplist.txt
This commit is contained in:
parent
4c6482a58c
commit
b8ad407912
@ -6,19 +6,23 @@ EXEDIR=$(dirname $SCRIPT)
|
|||||||
|
|
||||||
. "$EXEDIR/def.sh"
|
. "$EXEDIR/def.sh"
|
||||||
|
|
||||||
ZURL=https://github.com/zapret-info/z-i/raw/master/dump.csv
|
#ZURL=https://github.com/zapret-info/z-i/raw/master/dump.csv
|
||||||
|
ZURL=http://antizapret.prostovpn.org/iplist.txt
|
||||||
ZIPLISTTMP=/tmp/zapret-ip.txt
|
ZIPLISTTMP=/tmp/zapret-ip.txt
|
||||||
|
|
||||||
getuser
|
getuser
|
||||||
|
|
||||||
curl --fail --max-time 300 --max-filesize 33554432 -k -L "$ZURL" | \
|
#curl --fail --max-time 300 --max-filesize 33554432 -k -L "$ZURL" \
|
||||||
sed -nre "s/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/\1\n/gp" | \
|
# | sed -nre "s/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/\1\n/gp" \
|
||||||
sed -nre "s/^[^0-9]*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$/\1/p" | \
|
# | sed -nre "s/^[^0-9]*([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*$/\1/p" \
|
||||||
grep -vE '^192.168.[0-9]*.[0-9]*$' | grep -vE '^127.[0-9]*.[0-9]*.[0-9]*$' | grep -vE '^10.[0-9]*.[0-9]*.[0-9]*$' \
|
# | grep -vE '^192.168.[0-9]*.[0-9]*$' | grep -vE '^127.[0-9]*.[0-9]*.[0-9]*$' | grep -vE '^10.[0-9]*.[0-9]*.[0-9]*$' \
|
||||||
|
# | sort -u \
|
||||||
|
curl --fail --max-time 300 --max-filesize 33554432 -k -L "$ZURL" \
|
||||||
|
| grep -vE '^192.168.[0-9]*.[0-9]*$' | grep -vE '^127.[0-9]*.[0-9]*.[0-9]*$' | grep -vE '^10.[0-9]*.[0-9]*.[0-9]*$' \
|
||||||
>$ZIPLISTTMP &&
|
>$ZIPLISTTMP &&
|
||||||
{
|
{
|
||||||
dlsize=$(wc -c "$ZIPLISTTMP" | cut -f 1 -d ' ')
|
dlsize=$(wc -c "$ZIPLISTTMP" | cut -f 1 -d ' ')
|
||||||
if test $dlsize -lt 20480; then
|
if test $dlsize -lt 204800; then
|
||||||
echo list file is too small. can be bad.
|
echo list file is too small. can be bad.
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user