adblock: update 4.1.4-5
* auto-whitelist ext. dns lookup domain * add public doh server blocklist source * whitespace fixes in adblock.sources Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
parent
6b71d2fbde
commit
5603ed9237
3 changed files with 18 additions and 9 deletions
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=adblock
|
PKG_NAME:=adblock
|
||||||
PKG_VERSION:=4.1.4
|
PKG_VERSION:=4.1.4
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
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>
|
||||||
|
|
||||||
|
|
|
@ -585,7 +585,7 @@ f_extconf() {
|
||||||
# restart dns backend
|
# restart dns backend
|
||||||
#
|
#
|
||||||
f_dnsup() {
|
f_dnsup() {
|
||||||
local dns_service dns_up dns_pid restart_rc cnt="0" out_rc="4" in_rc="${1:-0}"
|
local rset dns_service dns_up dns_pid restart_rc cnt="0" out_rc="4" in_rc="${1:-0}"
|
||||||
|
|
||||||
if [ "${adb_dns}" = "raw" ]; then
|
if [ "${adb_dns}" = "raw" ]; then
|
||||||
out_rc="0"
|
out_rc="0"
|
||||||
|
@ -621,12 +621,13 @@ f_dnsup() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "${restart_rc}" = "0" ]; then
|
if [ "${restart_rc}" = "0" ]; then
|
||||||
|
rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
|
||||||
while [ "${cnt}" -le "${adb_dnstimeout}" ]; do
|
while [ "${cnt}" -le "${adb_dnstimeout}" ]; do
|
||||||
dns_service="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}")"
|
dns_service="$(ubus -S call service list "{\"name\":\"${adb_dns}\"}")"
|
||||||
dns_up="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
|
dns_up="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.running")"
|
||||||
dns_pid="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.pid")"
|
dns_pid="$(printf "%s" "${dns_service}" | jsonfilter -l1 -e "@[\"${adb_dns}\"].instances.*.pid")"
|
||||||
if [ "${dns_up}" = "true" ] && [ -n "${dns_pid}" ] && ! ls "/proc/${dns_pid}/fd/${adb_dnsdir}/${adb_dnsfile}" >/dev/null 2>&1; then
|
if [ "${dns_up}" = "true" ] && [ -n "${dns_pid}" ] && ! ls "/proc/${dns_pid}/fd/${adb_dnsdir}/${adb_dnsfile}" >/dev/null 2>&1; then
|
||||||
if [ -x "${adb_lookupcmd}" ] && [ "${adb_lookupdomain}" != "false" ]; then
|
if [ -x "${adb_lookupcmd}" ] && [ -n "$(printf "%s" "${adb_lookupdomain}" | "${adb_awk}" "${rset}")" ]; then
|
||||||
if "${adb_lookupcmd}" "${adb_lookupdomain}" >/dev/null 2>&1; then
|
if "${adb_lookupcmd}" "${adb_lookupdomain}" >/dev/null 2>&1; then
|
||||||
out_rc="0"
|
out_rc="0"
|
||||||
break
|
break
|
||||||
|
@ -692,7 +693,8 @@ f_list() {
|
||||||
rm -f "${adb_tmpdir}/tmp.raw.${src_name}"
|
rm -f "${adb_tmpdir}/tmp.raw.${src_name}"
|
||||||
elif [ "${src_name}" = "whitelist" ] && [ -f "${adb_whitelist}" ]; then
|
elif [ "${src_name}" = "whitelist" ] && [ -f "${adb_whitelist}" ]; then
|
||||||
rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
|
rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}"
|
||||||
"${adb_awk}" "${rset}" "${adb_whitelist}" >"${adb_tmpdir}/tmp.raw.${src_name}"
|
printf "%s\n" "${adb_lookupdomain}" | "${adb_awk}" "${rset}" >"${adb_tmpdir}/tmp.raw.${src_name}"
|
||||||
|
"${adb_awk}" "${rset}" "${adb_whitelist}" >>"${adb_tmpdir}/tmp.raw.${src_name}"
|
||||||
out_rc="${?}"
|
out_rc="${?}"
|
||||||
if [ "${out_rc}" = "0" ]; then
|
if [ "${out_rc}" = "0" ]; then
|
||||||
rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}"
|
rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}"
|
||||||
|
|
|
@ -62,6 +62,13 @@
|
||||||
"focus": "general",
|
"focus": "general",
|
||||||
"descurl": "https://disconnect.me"
|
"descurl": "https://disconnect.me"
|
||||||
},
|
},
|
||||||
|
"doh_blocklist": {
|
||||||
|
"url": "https://raw.githubusercontent.com/dibdot/DoH-IP-blocklists/master/doh-domains_overall.txt",
|
||||||
|
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
|
"size": "S",
|
||||||
|
"focus": "doh_server",
|
||||||
|
"descurl": "https://github.com/dibdot/DoH-IP-blocklists"
|
||||||
|
},
|
||||||
"energized": {
|
"energized": {
|
||||||
"url": "https://block.energized.pro/",
|
"url": "https://block.energized.pro/",
|
||||||
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
|
@ -91,12 +98,12 @@
|
||||||
"descurl": "https://hblock.molinero.dev"
|
"descurl": "https://hblock.molinero.dev"
|
||||||
},
|
},
|
||||||
"lightswitch05": {
|
"lightswitch05": {
|
||||||
"url": "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt",
|
"url": "https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt",
|
||||||
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
|
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
|
||||||
"size": "XL",
|
"size": "XL",
|
||||||
"focus": "compilation",
|
"focus": "compilation",
|
||||||
"descurl": "https://github.com/lightswitch05/hosts"
|
"descurl": "https://github.com/lightswitch05/hosts"
|
||||||
},
|
},
|
||||||
"notracking": {
|
"notracking": {
|
||||||
"url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt",
|
"url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt",
|
||||||
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
|
|
Loading…
Reference in a new issue