diff options
author | Dirk Brenken <dev@brenken.org> | 2023-03-20 20:27:19 +0100 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2023-03-20 20:27:49 +0100 |
commit | a4b9697684ad13e9c60e22a830c5d5c28bd5e9ad (patch) | |
tree | 463623069cfda3f7bb141932a965da1134ac4071 | |
parent | e5395396bd34c8eba0e01529fe01637e4468e401 (diff) |
adblock: update to 4.1.5-7
* fix cornercase issue with duplicate entries in black- and whitelist
* change cpbl source URL
* firewall redirects now blocks IPv4 and IPv6 (set family to "any")
Signed-off-by: Dirk Brenken <dev@brenken.org>
-rw-r--r-- | net/adblock/Makefile | 2 | ||||
-rwxr-xr-x | net/adblock/files/adblock.sh | 12 | ||||
-rw-r--r-- | net/adblock/files/adblock.sources | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 22a59a926..6eda908a4 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock PKG_VERSION:=4.1.5 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh index 2647df093..e76e81450 100755 --- a/net/adblock/files/adblock.sh +++ b/net/adblock/files/adblock.sh @@ -1,6 +1,6 @@ #!/bin/sh # dns based ad/abuse domain blocking -# Copyright (c) 2015-2022 Dirk Brenken (dev@brenken.org) +# Copyright (c) 2015-2023 Dirk Brenken (dev@brenken.org) # This is free software, licensed under the GNU General Public License v3. # disable (s)hellcheck in release @@ -566,6 +566,7 @@ f_extconf() { set firewall."adblock_${zone}${port}".src_dport="${port}" set firewall."adblock_${zone}${port}".dest_port="${port}" set firewall."adblock_${zone}${port}".target="DNAT" + set firewall."adblock_${zone}${port}".family="any" EOC fi fwcfg="${fwcfg/adblock_${zone}${port}[ |\$]/}" @@ -686,8 +687,13 @@ f_list() { src_name="${mode}" if [ "${src_name}" = "blacklist" ] && [ -f "${adb_blacklist}" ]; then rset="/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}" - "${adb_awk}" "${rset}" "${adb_blacklist}" | - "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' >"${adb_tmpdir}/tmp.raw.${src_name}" + "${adb_awk}" "${rset}" "${adb_blacklist}" >"${adb_tmpdir}/tmp.raw.${src_name}" + if [ -s "${adb_whitelist}" ]; then + "${adb_awk}" 'NR==FNR{member[$1];next}!($1 in member)' "${adb_whitelist}" "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}" + else + cat "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}" + fi + "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${adb_tmpdir}/tmp.deduplicate.${src_name}" >"${adb_tmpdir}/tmp.raw.${src_name}" "${adb_sort}" ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null >"${adb_tmpfile}.${src_name}" out_rc="${?}" rm -f "${adb_tmpdir}/tmp.raw.${src_name}" diff --git a/net/adblock/files/adblock.sources b/net/adblock/files/adblock.sources index d6f56f6d4..85af8602b 100644 --- a/net/adblock/files/adblock.sources +++ b/net/adblock/files/adblock.sources @@ -63,7 +63,7 @@ "descurl": "https://github.com/hoshsadiq/adblock-nocoin-list" }, "cpbl": { - "url": "https://raw.githubusercontent.com/bongochong/CombinedPrivacyBlockLists/master/NoFormatting/BlacklistedDomains.txt", + "url": "https://raw.githubusercontent.com/bongochong/CombinedPrivacyBlockLists/master/NoFormatting/cpbl-ctld.txt", "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}", "size": "XL", "focus": "compilation", |