adblock: update 4.0.1
* fix dependency issue * fix query timeouts in web frontend (seen with many selected lists), now the query comes back latest after 30 seconds, to prevent any timeouts, with all results to this point. * add missing parameter in readme.md Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
parent
ecb4acfbcd
commit
5626900e35
3 changed files with 17 additions and 9 deletions
|
@ -6,7 +6,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=adblock
|
PKG_NAME:=adblock
|
||||||
PKG_VERSION:=4.0.0
|
PKG_VERSION:=4.0.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
|
@ -17,7 +17,7 @@ define Package/adblock
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
TITLE:=Powerful adblock script to block ad/abuse domains by using DNS
|
TITLE:=Powerful adblock script to block ad/abuse domains by using DNS
|
||||||
DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort @(PACKAGE_aria2||PACKAGE_curl||PACKAGE_wget||PACKAGE_uclient-fetch&&(PACKAGE_libustream-mbedtls||PACKAGE_libustream-openssl||PACKAGE_libustream-wolfssl))
|
DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort
|
||||||
PKGARCH:=all
|
PKGARCH:=all
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,6 @@ Available commands:
|
||||||
| :---------------- | :------------------------ | :--------------------------------------------------------------------------------------------- |
|
| :---------------- | :------------------------ | :--------------------------------------------------------------------------------------------- |
|
||||||
| adb_enabled | 1, enabled | set to 0 to disable the adblock service |
|
| adb_enabled | 1, enabled | set to 0 to disable the adblock service |
|
||||||
| adb_dns | -, auto-detected | 'dnsmasq', 'unbound', 'named', 'kresd' or 'raw' |
|
| adb_dns | -, auto-detected | 'dnsmasq', 'unbound', 'named', 'kresd' or 'raw' |
|
||||||
| adb_dnsdir | -, auto-detected | path for the generated blocklist file 'adb_list.overall' |
|
|
||||||
| adb_fetchutil | -, auto-detected | 'uclient-fetch', 'wget', 'curl' or 'aria2c' |
|
| adb_fetchutil | -, auto-detected | 'uclient-fetch', 'wget', 'curl' or 'aria2c' |
|
||||||
| adb_fetchparm | -, auto-detected | special config options for the selected download utility |
|
| adb_fetchparm | -, auto-detected | special config options for the selected download utility |
|
||||||
| adb_trigger | -, not set | trigger network interface or 'not set' to use a time-based startup |
|
| adb_trigger | -, not set | trigger network interface or 'not set' to use a time-based startup |
|
||||||
|
@ -139,11 +138,13 @@ Available commands:
|
||||||
| adb_nice | 0, standard prio. | valid nice level range 0-19 of the adblock processes |
|
| adb_nice | 0, standard prio. | valid nice level range 0-19 of the adblock processes |
|
||||||
| adb_forcedns | 0, disabled | set to 1 to force DNS requests to the local resolver |
|
| adb_forcedns | 0, disabled | set to 1 to force DNS requests to the local resolver |
|
||||||
| adb_maxqueue | 4 | size of the download queue to handle downloads & list processing in parallel |
|
| adb_maxqueue | 4 | size of the download queue to handle downloads & list processing in parallel |
|
||||||
|
| adb_dnsdir | -, auto-detected | path for the generated blocklist file 'adb_list.overall' |
|
||||||
|
| adb_dnstimeout | 10 | timeout in seconds to wait for a successful DNS backend restart |
|
||||||
|
| adb_dnsinstance | 0, first instance | set to the relevant dns backend instance used by adblock (dnsmasq only) |
|
||||||
| adb_dnsfilereset | 0, disabled | set to 1 to purge the final DNS blocklist file after DNS backend loading |
|
| adb_dnsfilereset | 0, disabled | set to 1 to purge the final DNS blocklist file after DNS backend loading |
|
||||||
| adb_dnsflush | 0, disabled | set to 1 to flush the DNS Cache before & after adblock processing |
|
| adb_dnsflush | 0, disabled | set to 1 to flush the DNS Cache before & after adblock processing |
|
||||||
| adb_dnsinotify | -, not set | set to 1 to prevent adblock triggered restarts for DNS backends with autoload functions |
|
| adb_dnsinotify | -, not set | set to 1 to prevent adblock triggered restarts for DNS backends with autoload functions |
|
||||||
| adb_dnsallow | -, not set | set to 1 to disable selective DNS whitelisting (RPZ pass through) |
|
| adb_dnsallow | -, not set | set to 1 to disable selective DNS whitelisting (RPZ pass through) |
|
||||||
| adb_dnstimeout | 10 | timeout in seconds to wait for a successful DNS backend restart |
|
|
||||||
| adb_lookupdomain | example.com | external domain to check for a successful DNS backend restart or 'false' to disable this check |
|
| adb_lookupdomain | example.com | external domain to check for a successful DNS backend restart or 'false' to disable this check |
|
||||||
| adb_portlist | 53 853 5353 | space separated list of firewall ports which should be redirected locally |
|
| adb_portlist | 53 853 5353 | space separated list of firewall ports which should be redirected locally |
|
||||||
| adb_report | 0, disabled | set to 1 to enable the background tcpdump gathering process for reporting |
|
| adb_report | 0, disabled | set to 1 to enable the background tcpdump gathering process for reporting |
|
||||||
|
@ -253,7 +254,7 @@ This file is directly parsed in LuCI and accessible via CLI, just call _/etc/ini
|
||||||
+ yoyo x S general https://pgl.yoyo.org
|
+ yoyo x S general https://pgl.yoyo.org
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
To add new or edit existing sources extract the compressed JSON file _gunzip /etc/adblock/adblock.sources.gz_.
|
To add new or edit existing sources extract the compressed JSON file _gunzip /etc/adblock/adblock.sources.gz_.
|
||||||
A valid JSON source object contains the following required information, e.g.:
|
A valid JSON source object contains the following required information, e.g.:
|
||||||
<pre><code>
|
<pre><code>
|
||||||
[...]
|
[...]
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
adb_ver="4.0.0"
|
adb_ver="4.0.1"
|
||||||
adb_enabled=0
|
adb_enabled=0
|
||||||
adb_debug=0
|
adb_debug=0
|
||||||
adb_forcedns=0
|
adb_forcedns=0
|
||||||
|
@ -354,7 +354,7 @@ f_fetch()
|
||||||
do
|
do
|
||||||
if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^libustream-")" ]; } || \
|
if { [ "${util}" = "uclient-fetch" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^libustream-")" ]; } || \
|
||||||
{ [ "${util}" = "wget" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^wget -")" ]; } || \
|
{ [ "${util}" = "wget" ] && [ -n "$(printf "%s" "${adb_packages}" | grep "^wget -")" ]; } || \
|
||||||
{ [ "${util}" != "uclient-fetch" ] && [ "${util}" != "wget" ]; }
|
[ "${util}" = "curl" ] || [ "${util}" = "aria2c" ]
|
||||||
then
|
then
|
||||||
if [ -x "$(command -v "${util}")" ]
|
if [ -x "$(command -v "${util}")" ]
|
||||||
then
|
then
|
||||||
|
@ -960,7 +960,7 @@ f_switch()
|
||||||
#
|
#
|
||||||
f_query()
|
f_query()
|
||||||
{
|
{
|
||||||
local search result prefix suffix field domain="${1}" tld="${1#*.}"
|
local search result prefix suffix field query_start query_end query_timeout=30 domain="${1}" tld="${1#*.}"
|
||||||
|
|
||||||
if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
|
if [ -z "${domain}" ] || [ "${domain}" = "${tld}" ]
|
||||||
then
|
then
|
||||||
|
@ -993,6 +993,7 @@ f_query()
|
||||||
field=1
|
field=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
query_start="$(date "+%s")"
|
||||||
if [ "${adb_dnsfilereset}" -eq 0 ]
|
if [ "${adb_dnsfilereset}" -eq 0 ]
|
||||||
then
|
then
|
||||||
while [ "${domain}" != "${tld}" ]
|
while [ "${domain}" != "${tld}" ]
|
||||||
|
@ -1024,6 +1025,12 @@ f_query()
|
||||||
if [ "${?}" -eq 0 ]
|
if [ "${?}" -eq 0 ]
|
||||||
then
|
then
|
||||||
result="true"
|
result="true"
|
||||||
|
query_end="$(date "+%s")"
|
||||||
|
if [ "$((query_end-query_start))" -gt "${query_timeout}" ]
|
||||||
|
then
|
||||||
|
printf "%s\\n\\n" " - [...]"
|
||||||
|
break
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "${result}" != "true" ]
|
if [ "${result}" != "true" ]
|
||||||
|
@ -1097,7 +1104,7 @@ f_jsnup()
|
||||||
json_close_object
|
json_close_object
|
||||||
done
|
done
|
||||||
json_close_array
|
json_close_array
|
||||||
json_add_string "dns_backend" "${adb_dns}, ${adb_dnsdir}"
|
json_add_string "dns_backend" "${adb_dns:-"-"}, ${adb_dnsdir:-"-"}"
|
||||||
json_add_string "run_utils" "${utils:-"-"}"
|
json_add_string "run_utils" "${utils:-"-"}"
|
||||||
json_add_string "run_ifaces" "trigger: ${adb_trigger:-"-"}, report: ${adb_repiface:-"-"}"
|
json_add_string "run_ifaces" "trigger: ${adb_trigger:-"-"}, report: ${adb_repiface:-"-"}"
|
||||||
json_add_string "run_directories" "base: ${adb_tmpbase}, backup: ${adb_backupdir}, report: ${adb_reportdir}, jail: ${adb_jaildir}"
|
json_add_string "run_directories" "base: ${adb_tmpbase}, backup: ${adb_backupdir}, report: ${adb_reportdir}, jail: ${adb_jaildir}"
|
||||||
|
|
Loading…
Reference in a new issue