diff --git a/init.d/openwrt/zapret b/init.d/openwrt/zapret index 5bcb510..9fc640c 100755 --- a/init.d/openwrt/zapret +++ b/init.d/openwrt/zapret @@ -20,8 +20,8 @@ TPWS_USER=daemon TPPORT_HTTP=1188 TPPORT_HTTPS=1189 TPWS="$ZAPRET_BASE/tpws/tpws" -TPWS_HOSTLIST=$ZAPRET_BASE/ipset/zapret-hosts.txt.gz -[ -f "$TPWS_HOSTLIST" ] || TPWS_HOSTLIST=$ZAPRET_BASE/ipset/zapret-hosts-user.txt +TPWS_HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts.txt.gz" +[ -f "$TPWS_HOSTLIST" ] || TPWS_HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts-user.txt" TPWS_OPT_BASE="--user=$TPWS_USER --bind-addr=127.0.0.1" TPWS_OPT_BASE6="--user=$TPWS_USER --bind-addr=::1" # first wait for lan to ifup, then wait for bind-wait-ip-linklocal seconds for link local address and bind-wait-ip for any ipv6 as the worst case diff --git a/init.d/sysv/functions b/init.d/sysv/functions index 20d6d13..3fed09e 100644 --- a/init.d/sysv/functions +++ b/init.d/sysv/functions @@ -17,8 +17,8 @@ NFQWS_OPT_BASE="--qnum=$QNUM --user=$WS_USER" TPPORT_HTTP=1188 TPPORT_HTTPS=1189 TPWS="$ZAPRET_BASE/tpws/tpws" -TPWS_HOSTLIST=$ZAPRET_BASE/ipset/zapret-hosts.txt.gz -[ -f "$TPWS_HOSTLIST" ] || TPWS_HOSTLIST=$ZAPRET_BASE/ipset/zapret-hosts-user.txt +TPWS_HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts.txt.gz" +[ -f "$TPWS_HOSTLIST" ] || TPWS_HOSTLIST="$ZAPRET_BASE/ipset/zapret-hosts-user.txt" TPWS_OPT_BASE="--user=$WS_USER --bind-addr=127.0.0.1" TPWS_OPT_BASE6="--user=$WS_USER --bind-addr=::1" # first wait for lan to ifup, then wait for bind-wait-ip-linklocal seconds for link local address and bind-wait-ip for any ipv6 as the worst case diff --git a/ipset/create_ipset.sh b/ipset/create_ipset.sh index 14c512e..11ce876 100755 --- a/ipset/create_ipset.sh +++ b/ipset/create_ipset.sh @@ -5,7 +5,7 @@ SCRIPT=$(readlink -f "$0") EXEDIR=$(dirname "$SCRIPT") IPSET_OPT="hashsize 131072 maxelem 524288" -IP2NET=$EXEDIR/../ip2net/ip2net +IP2NET="$EXEDIR/../ip2net/ip2net" . "$EXEDIR/def.sh" diff --git a/ipset/def.sh b/ipset/def.sh index c567f04..bb8b839 100755 --- a/ipset/def.sh +++ b/ipset/def.sh @@ -3,24 +3,24 @@ TMPDIR=/tmp ZIPSET=zapret ZIPSET6=zapret6 -ZIPLIST=$EXEDIR/zapret-ip.txt -ZIPLIST6=$EXEDIR/zapret-ip6.txt -ZIPLIST_EXCLUDE=$EXEDIR/zapret-ip-exclude.txt -ZIPLIST_EXCLUDE6=$EXEDIR/zapret-ip-exclude6.txt -ZIPLIST_USER=$EXEDIR/zapret-ip-user.txt -ZIPLIST_USER6=$EXEDIR/zapret-ip-user6.txt -ZUSERLIST=$EXEDIR/zapret-hosts-user.txt -ZHOSTLIST=$EXEDIR/zapret-hosts.txt +ZIPLIST="$EXEDIR/zapret-ip.txt" +ZIPLIST6="$EXEDIR/zapret-ip6.txt" +ZIPLIST_EXCLUDE="$EXEDIR/zapret-ip-exclude.txt" +ZIPLIST_EXCLUDE6="$EXEDIR/zapret-ip-exclude6.txt" +ZIPLIST_USER="$EXEDIR/zapret-ip-user.txt" +ZIPLIST_USER6="$EXEDIR/zapret-ip-user6.txt" +ZUSERLIST="$EXEDIR/zapret-hosts-user.txt" +ZHOSTLIST="$EXEDIR/zapret-hosts.txt" ZIPSET_IPBAN=ipban ZIPSET_IPBAN6=ipban6 -ZIPLIST_IPBAN=$EXEDIR/zapret-ip-ipban.txt -ZIPLIST_IPBAN6=$EXEDIR/zapret-ip-ipban6.txt -ZIPLIST_USER_IPBAN=$EXEDIR/zapret-ip-user-ipban.txt -ZIPLIST_USER_IPBAN6=$EXEDIR/zapret-ip-user-ipban6.txt -ZUSERLIST_IPBAN=$EXEDIR/zapret-hosts-user-ipban.txt +ZIPLIST_IPBAN="$EXEDIR/zapret-ip-ipban.txt" +ZIPLIST_IPBAN6="$EXEDIR/zapret-ip-ipban6.txt" +ZIPLIST_USER_IPBAN="$EXEDIR/zapret-ip-user-ipban.txt" +ZIPLIST_USER_IPBAN6="$EXEDIR/zapret-ip-user-ipban6.txt" +ZUSERLIST_IPBAN="$EXEDIR/zapret-hosts-user-ipban.txt" -MDIG=$EXEDIR/../mdig/mdig +MDIG="$EXEDIR/../mdig/mdig" [ -z "$MDIG_THREADS" ] && MDIG_THREADS=30 zzexist() diff --git a/ipset/get_antizapret.sh b/ipset/get_antizapret.sh index 9ec0e1f..a74d3ae 100755 --- a/ipset/get_antizapret.sh +++ b/ipset/get_antizapret.sh @@ -8,7 +8,7 @@ EXEDIR=$(dirname "$SCRIPT") #ZURL=https://github.com/zapret-info/z-i/raw/master/dump.csv ZURL=http://antizapret.prostovpn.org/iplist.txt -ZIPLISTTMP=$TMPDIR/zapret-ip.txt +ZIPLISTTMP="$TMPDIR/zapret-ip.txt" getuser diff --git a/ipset/get_combined.sh b/ipset/get_combined.sh index 84895c2..d96b41c 100755 --- a/ipset/get_combined.sh +++ b/ipset/get_combined.sh @@ -6,12 +6,12 @@ EXEDIR=$(dirname "$SCRIPT") . "$EXEDIR/def.sh" -ZREESTR=$TMPDIR/reestr.txt +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 -ZAZ=$TMPDIR/zapret-ip.txt +ZAZ="$TMPDIR/zapret-ip.txt" ZURL_AZ=http://antizapret.prostovpn.org/iplist.txt -ZIPLIST_IPBAN_TMP=/tmp/zapret-ipban.txt +ZIPLIST_IPBAN_TMP="$TMPDIR/zapret-ipban.txt" getuser diff --git a/ipset/get_hostlist.sh b/ipset/get_hostlist.sh index 2583e68..c062d67 100755 --- a/ipset/get_hostlist.sh +++ b/ipset/get_hostlist.sh @@ -6,7 +6,7 @@ EXEDIR=$(dirname "$SCRIPT") . "$EXEDIR/def.sh" -ZREESTR=$TMPDIR/zapret.txt +ZREESTR="$TMPDIR/zapret.txt" #ZURL=https://reestr.rublacklist.net/api/current ZURL=https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv diff --git a/ipset/get_reestr.sh b/ipset/get_reestr.sh index 6178c97..6e8f702 100755 --- a/ipset/get_reestr.sh +++ b/ipset/get_reestr.sh @@ -6,9 +6,9 @@ EXEDIR=$(dirname "$SCRIPT") . "$EXEDIR/def.sh" -ZREESTR=$TMPDIR/zapret.txt -ZDIG=$TMPDIR/zapret-dig.txt -ZIPLISTTMP=$TMPDIR/zapret-ip.txt +ZREESTR="$TMPDIR/zapret.txt" +ZDIG="$TMPDIR/zapret-dig.txt" +ZIPLISTTMP="$TMPDIR/zapret-ip.txt" #ZURL=https://reestr.rublacklist.net/api/current ZURL=https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv