adblock: release 4.4.4-1

* major feed cleanup, removed the following default feeds:
   - adaway, unmaintained for more than 2 years
   - easylist/easyprivacy, not effective for DNS-based ad blocking plus too many false positives
   - energized_*,  broken
   - lightswitch05, abandoned
   - notracking, abandoned
   - openphish, not effective for DNS-based ad blocking plus too many false positives
   - reg_*, not effective for DNS-based ad blocking plus too many false positives
   - winhelp, unmaintained for more than 2 years
* update the utcapitole categories
* automatically migrate the hagezi categories via uci-defaults script to the new format
* the adblock status now includes the backend- and frontend version information
* small performance improvements
* LuCI: no longer call the logread binary, use rpc / the ubus log object instead
* LuCI: various code cleanups
* LuCI: various small usability improvements
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2025-11-21 19:00:06 +01:00
parent d97294e7af
commit 2ec48cb029
7 changed files with 68 additions and 236 deletions

View File

@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
PKG_VERSION:=4.4.3
PKG_VERSION:=4.4.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View File

@@ -10,9 +10,11 @@ export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
config="adblock"
old_options="adb_sources adb_forcedns adb_fetchutil adb_hag_sources adb_hst_sources adb_stb_sources adb_utc_sources \
adb_maxqueue adb_backup adb_dnsfilereset adb_tmpbase adb_mailcnt adb_safesearchmod adb_srcfile adb_srcarc adb_nice"
adb_maxqueue adb_backup adb_dnsfilereset adb_tmpbase adb_mailcnt adb_safesearchmod adb_srcfile adb_srcarc adb_nice \
adb_hag_feed"
for option in ${old_options}; do
inplace="0"
if uci -q get ${config}.global.${option} >/dev/null 2>&1; then
old_values="$(uci -q get ${config}.global.${option})"
for value in ${old_values}; do
@@ -54,9 +56,16 @@ for option in ${old_options}; do
"adb_nice")
uci -q set ${config}.global.adb_nicelimit="${value}"
;;
"adb_hag_feed")
inplace="1"
if ! printf "%s" "${value}" | grep -qE "^(wildcard/|domains/)"; then
uci -q del_list ${config}.global.adb_hag_feed="${value}"
uci -q add_list ${config}.global.adb_hag_feed="wildcard/${value}"
fi
;;
esac
done
uci -q delete ${config}.global.${option}
[ "${inplace}" = "0" ] && uci -q delete ${config}.global.${option}
fi
done
[ -n "$(uci -q changes ${config})" ] && uci -q commit ${config}

View File

@@ -13,7 +13,6 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| Feed | Enabled | Size | Focus | Information |
| :------------------ | :-----: | :--- | :--------------- | :-------------------------------------------------------------------------------- |
| 1Hosts | | VAR | compilation | [Link](https://github.com/badmojr/1Hosts) |
| adaway | | S | mobile | [Link](https://github.com/AdAway/adaway.github.io) |
| adguard | x | L | general | [Link](https://adguard.com) |
| adguard_tracking | x | L | tracking | [Link](https://github.com/AdguardTeam/cname-trackers) |
| android_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
@@ -26,40 +25,15 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| disconnect | | S | general | [Link](https://disconnect.me) |
| divested | | XXL | compilation | [Link](https://divested.dev/pages/dnsbl) |
| doh_blocklist | | S | doh_server | [Link](https://github.com/dibdot/DoH-IP-blocklists) |
| easylist | | M | compilation | [Link](https://easylist.to) |
| easyprivacy | | M | tracking | [Link](https://easylist.to) |
| energized_blu | | XL | compilation | [Link](https://energized.pro) |
| energized_spark | | L | compilation | [Link](https://energized.pro) |
| energized_ultimate | | XXL | compilation | [Link](https://energized.pro) |
| firetv_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
| games_tracking | | S | tracking | [Link](https://www.gameindustry.eu) |
| hagezi | | VAR | compilation | [Link](https://github.com/hagezi/dns-blocklists) |
| hblock | | XL | compilation | [Link](https://hblock.molinero.dev) |
| lightswitch05 | | XL | compilation | [Link](https://github.com/lightswitch05/hosts) |
| notracking | | XL | tracking | [Link](https://github.com/notracking/hosts-blocklists) |
| oisd_big | | XXL | general | [Link](https://oisd.nl) |
| oisd_nsfw | | XXL | porn | [Link](https://oisd.nl) |
| oisd_nsfw_small | | M | porn | [Link](https://oisd.nl) |
| oisd_small | | L | general | [Link](https://oisd.nl) |
| openphish | | S | phishing | [Link](https://openphish.com) |
| phishing_army | | S | phishing | [Link](https://phishing.army) |
| reg_cn | | S | reg_china | [Link](https://easylist.to) |
| reg_cz | | S | reg_czech+slovak | [Link](https://easylist.to) |
| reg_de | | S | reg_germany | [Link](https://easylist.to) |
| reg_es | | S | reg_espania | [Link](https://easylist.to) |
| reg_fi | | S | reg_finland | [Link](https://github.com/finnish-easylist-addition) |
| reg_fr | | M | reg_france | [Link](https://forums.lanik.us/viewforum.php?f=91) |
| reg_id | | S | reg_indonesia | [Link](https://easylist.to) |
| reg_it | | S | reg_italy | [Link](https://easylist.to) |
| reg_jp | | S | reg_japan | [Link](https://github.com/k2jp/abp-japanese-filters) |
| reg_kr | | S | reg_korea | [Link](https://github.com/List-KR/List-KR) |
| reg_lt | | S | reg_lithuania | [Link](https://easylist.to) |
| reg_nl | | S | reg_netherlands | [Link](https://easylist.to) |
| reg_pl | | M | reg_poland | [Link](https://kadantiscam.netlify.com) |
| reg_ro | | S | reg_romania | [Link](https://easylist.to) |
| reg_ru | | S | reg_russia | [Link](https://easylist.to) |
| reg_se | | S | reg_sweden | [Link](https://github.com/lassekongo83/Frellwits-filter-lists) |
| reg_vn | | S | reg_vietnam | [Link](https://bigdargon.github.io/hostsVN) |
| smarttv_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
| spam404 | | S | general | [Link](https://github.com/Dawsey21) |
| stevenblack | | VAR | compilation | [Link](https://github.com/StevenBlack/hosts) |
@@ -67,7 +41,6 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| utcapitole | | VAR | general | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) |
| wally3k | | S | compilation | [Link](https://firebog.net/about) |
| whocares | | M | general | [Link](https://someonewhocares.org) |
| winhelp | | S | general | [Link](https://winhelp2002.mvps.org) |
| winspy | | S | win_telemetry | [Link](https://github.com/crazy-max/WindowsSpyBlocker) |
| yoyo | | S | general | [Link](https://pgl.yoyo.org/adservers) |

View File

@@ -75,6 +75,7 @@ stb;porn-social;alternates/porn-social-only/hosts
stb;social;alternates/social-only/hosts
utc;adult
utc;agressif
utc;ai
utc;arjel
utc;associations_religieuses
utc;astrology
@@ -95,9 +96,11 @@ utc;dialer
utc;doh
utc;download
utc;drogue
utc;dynamic-dns
utc;educational_games
utc;examen_pix
utc;exceptions_liste_bu
utc;fakenews
utc;filehosting
utc;financial
utc;forums
@@ -120,6 +123,7 @@ utc;radio
utc;reaffected
utc;redirector
utc;remote-control
utc;residential-proxies
utc;sect
utc;sexual_education
utc;shopping
@@ -132,7 +136,9 @@ utc;strict_redirector
utc;strong_redirector
utc;translation
utc;tricheur
utc;tricheur_pix
utc;update
utc;vpn
utc;warez
utc;webhosting
utc;webmail

View File

@@ -1,349 +1,187 @@
{
"1hosts": {
"url": "https://raw.githubusercontent.com/badmojr/1Hosts/master/",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "VAR",
"descr": "compilation"
},
"adaway": {
"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"descr": "mobile"
},
"adguard": {
"url": "https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}\\^(\\$third-party)?$/{print tolower($3)}",
"size": "L",
"descr": "general"
},
"adguard_tracking": {
"url": "https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers_justdomains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "L",
"descr": "tracking"
},
"android_tracking": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/android-tracking.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "tracking"
},
"andryou": {
"url": "https://gitlab.com/andryou/block/raw/master/kouhai-compressed-domains",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "L",
"descr": "compilation"
},
"anti_ad": {
"url": "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "L",
"descr": "compilation"
},
"anudeep": {
"url": "https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"rule": "/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($2)}",
"size": "M",
"descr": "compilation"
},
"bitcoin": {
"url": "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"rule": "/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($2)}",
"size": "S",
"descr": "mining"
},
"certpl": {
"url": "https://hole.cert.pl/domains/v2/domains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "L",
"descr": "phishing"
},
"cpbl": {
"url": "https://raw.githubusercontent.com/bongochong/CombinedPrivacyBlockLists/master/NoFormatting/cpbl-ctld.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XL",
"descr": "compilation"
},
"disconnect": {
"url": "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "general"
},
"divested": {
"url": "https://divested.dev/hosts-domains-wildcards",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XXL",
"descr": "compilation"
},
"doh_blocklist": {
"url": "https://raw.githubusercontent.com/dibdot/DoH-IP-blocklists/master/doh-domains_overall.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "doh_server"
},
"easylist": {
"url": "https://easylist-downloads.adblockplus.org/easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"descr": "compilation"
},
"easyprivacy": {
"url": "https://easylist-downloads.adblockplus.org/easyprivacy.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"descr": "tracking"
},
"energized_blu": {
"url": "https://energized.pro/blu/domains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XL",
"descr": "compilation"
},
"energized_spark": {
"url": "https://energized.pro/spark/domains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "L",
"descr": "compilation"
},
"energized_ultimate": {
"url": "https://energized.pro/ultimate/domains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XXL",
"descr": "compilation"
},
"firetv_tracking": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/AmazonFireTV.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "tracking"
},
"games_tracking": {
"url": "https://raw.githubusercontent.com/KodoPengin/GameIndustry-hosts-Template/master/Main-Template/hosts",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"rule": "/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($2)}",
"size": "S",
"descr": "tracking"
},
"hblock": {
"url": "https://hblock.molinero.dev/hosts_domains.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XL",
"descr": "compilation"
},
"hagezi": {
"url": "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "VAR",
"descr": "compilation"
},
"lightswitch05": {
"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)}",
"size": "XL",
"descr": "compilation"
},
"notracking": {
"url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XL",
"descr": "tracking"
},
"oisd_big": {
"url": "https://big.oisd.nl/domainswild2",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XXL",
"descr": "general"
},
"oisd_nsfw": {
"url": "https://nsfw.oisd.nl/domainswild2",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "XXL",
"descr": "porn"
},
"oisd_nsfw_small": {
"url": "https://nsfw-small.oisd.nl/domainswild2",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "M",
"descr": "porn"
},
"oisd_small": {
"url": "https://small.oisd.nl/domainswild2",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "L",
"descr": "general"
},
"openphish": {
"url": "https://openphish.com/feed.txt",
"rule": "BEGIN{FS=\"\/\"}/^http[s]?:\\/\\/([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+(\\/|$)/{print tolower($3)}",
"size": "S",
"descr": "phishing"
},
"phishing_army": {
"url": "https://phishing.army/download/phishing_army_blocklist_extended.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "phishing"
},
"reg_cn": {
"url": "https://easylist-downloads.adblockplus.org/easylistchina.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_china"
},
"reg_cz": {
"url": "https://easylist-downloads.adblockplus.org/easylistczechslovak.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_czech+slovak"
},
"reg_de": {
"url": "https://easylist-downloads.adblockplus.org/easylistgermany.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_germany"
},
"reg_es": {
"url": "https://easylist-downloads.adblockplus.org/easylistspanish.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_spain"
},
"reg_fi": {
"url": "https://raw.githubusercontent.com/finnish-easylist-addition/finnish-easylist-addition/master/Finland_adb.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_finland"
},
"reg_fr": {
"url": "https://easylist-downloads.adblockplus.org/liste_fr.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"descr": "reg_france"
},
"reg_id": {
"url": "https://easylist-downloads.adblockplus.org/abpindo.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_indonesia"
},
"reg_it": {
"url": "https://easylist-downloads.adblockplus.org/easylistitaly.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_italy"
},
"reg_jp": {
"url": "https://raw.githubusercontent.com/k2jp/abp-japanese-filters/master/abpjf.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_japan"
},
"reg_kr": {
"url": "https://raw.githubusercontent.com/List-KR/List-KR/master/filters-share/adservice.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_korea"
},
"reg_lt": {
"url": "https://easylist-downloads.adblockplus.org/easylistlithuania.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_lithuania"
},
"reg_nl": {
"url": "https://easylist-downloads.adblockplus.org/easylistdutch.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_netherlands"
},
"reg_pl": {
"url": "https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "M",
"descr": "reg_poland"
},
"reg_ro": {
"url": "https://easylist-downloads.adblockplus.org/rolist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_romania"
},
"reg_ru": {
"url": "https://easylist-downloads.adblockplus.org/ruadlist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"descr": "reg_russia"
},
"reg_se": {
"url": "https://raw.githubusercontent.com/lassekongo83/Frellwits-filter-lists/master/Frellwits-Swedish-Hosts-File.txt",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"descr": "reg_sweden"
},
"reg_vn": {
"url": "https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"descr": "reg_vietnam"
},
"smarttv_tracking": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "tracking"
},
"spam404": {
"url": "https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "general"
},
"stevenblack": {
"url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"rule": "/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($2)}",
"size": "VAR",
"descr": "compilation"
},
"stopforumspam": {
"url": "https://www.stopforumspam.com/downloads/toxic_domains_whole.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "spam"
},
"utcapitole": {
"url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "VAR",
"descr": "general"
},
"wally3k": {
"url": "https://v.firebog.net/hosts/static/w3kbl.txt",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "compilation"
},
"whocares": {
"url": "https://someonewhocares.org/hosts/hosts",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"rule": "/^(127\\.0\\.0\\.1 ([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($2)}",
"size": "M",
"descr": "general"
},
"winhelp": {
"url": "https://winhelp2002.mvps.org/hosts.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"descr": "general"
},
"winspy": {
"url": "https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"rule": "/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($2)}",
"size": "S",
"descr": "win_telemetry"
},
"yoyo": {
"url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"rule": "/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower($1)}",
"size": "S",
"descr": "general"
}

View File

@@ -45,7 +45,11 @@ adb_mailtext="${adb_mailtext}</pre></body></html>"
#
if [ -x "${adb_mailcmd}" ]; then
printf "%b" "${adb_mailhead}${adb_mailtext}" 2>/dev/null | "${adb_mailcmd}" ${debug} -a "${adb_mailprofile}" "${adb_mailreceiver}" >/dev/null 2>&1
f_log "info" "mail sent to '${adb_mailreceiver}' with rc '${?}'"
if [ "${?}" = "0" ]; then
f_log "info" "mail successfully sent to '${adb_mailreceiver}'"
else
f_log "err" "failed to send mail to '${adb_mailreceiver}' with rc '${?}'"
fi
else
f_log "err" "msmtp mail daemon not found"
fi

View File

@@ -85,7 +85,8 @@ f_load() {
local bg_pid iface port ports cpu core
adb_packages="$("${adb_ubuscmd}" -S call rpc-sys packagelist '{ "all": true }' 2>/dev/null)"
adb_ver="$(printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e '@.packages.adblock')"
adb_bver="$(printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e '@.packages.adblock')"
adb_fver="$(printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e '@.packages["luci-app-adblock"]')"
adb_sysver="$("${adb_ubuscmd}" -S call system board 2>/dev/null |
"${adb_jsoncmd}" -ql1 -e '@.model' -e '@.release.target' -e '@.release.distribution' -e '@.release.version' -e '@.release.revision' |
"${adb_awkcmd}" 'BEGIN{RS="";FS="\n"}{printf "%s, %s, %s %s %s %s",$1,$2,$3,$4,$5,$6}')"
@@ -699,7 +700,7 @@ f_list() {
;;
"blocklist" | "allowlist")
src_name="${mode}"
rset="/^(([[:alnum:]_-]{1,63}\\.)*[[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower(\$1)}"
rset="/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{2,63}([[:space:]]|$))/{print tolower(\$1)}"
case "${src_name}" in
"blocklist")
if [ -f "${adb_blocklist}" ]; then
@@ -708,7 +709,7 @@ f_list() {
if [ -s "${adb_allowlist}" ]; then
"${adb_awkcmd}" 'NR==FNR{member[$1];next}!($1 in member)' "${adb_allowlist}" "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}"
else
"${adb_catcmd}" "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}"
"${adb_mvcmd}" -f "${adb_tmpdir}/tmp.raw.${src_name}" "${adb_tmpdir}/tmp.deduplicate.${src_name}"
fi
if [ "${adb_tld}" = "1" ]; then
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "${adb_tmpdir}/tmp.deduplicate.${src_name}" |
@@ -907,16 +908,15 @@ f_tld() {
local cnt_tld cnt_rem source="${1}" temp_tld="${1}.tld"
if "${adb_awkcmd}" '{if(NR==1){tld=$NF};while(getline){if(index($NF,tld".")==0){print tld;tld=$NF}}print tld}' "${source}" |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' >"${temp_tld}"; then
"${adb_awkcmd}" 'BEGIN{FS="."}{out=$NF;for(i=NF-1;i>=1;i--)out=out"."$i;print out}' >"${temp_tld}"; then
[ "${adb_debug}" = "1" ] && cnt_tld="$(f_count tld "${temp_tld}" "var")"
if [ -s "${adb_tmpdir}/tmp.rem.allowlist" ]; then
"${adb_awkcmd}" 'NR==FNR{del[$0];next};!($0 in del)' "${adb_tmpdir}/tmp.rem.allowlist" "${temp_tld}" >"${source}"
"${adb_awkcmd}" 'NR==FNR{del[$0];next}!($0 in del)' "${adb_tmpdir}/tmp.rem.allowlist" "${temp_tld}" > "${source}"
[ "${adb_debug}" = "1" ] && cnt_rem="$(f_count tld "${source}" "var")"
else
"${adb_catcmd}" "${temp_tld}" >"${source}"
"${adb_mvcmd}" -f "${temp_tld}" "${source}"
fi
fi
: >"${temp_tld}"
f_log "debug" "f_tld ::: name: -, cnt: ${adb_cnt:-"-"}, cnt_tld: ${cnt_tld:-"-"}, cnt_rem: ${cnt_rem:-"-"}"
}
@@ -1111,7 +1111,8 @@ f_jsnup() {
json_init
json_load_file "${adb_rtfile}" >/dev/null 2>&1
json_add_string "adblock_status" "${status}"
json_add_string "adblock_version" "${adb_ver}"
json_add_string "frontend_ver" "${adb_fver}"
json_add_string "backend_ver" "${adb_bver}"
json_add_string "blocked_domains" "${adb_cnt:-"0"}"
json_add_array "active_feeds"
for object in ${feeds:-"-"}; do
@@ -1137,8 +1138,8 @@ f_log() {
local class="${1}" log_msg="${2}"
if [ -n "${log_msg}" ] && { [ "${class}" != "debug" ] || [ "${adb_debug}" = "1" ]; }; then
[ -x "${adb_loggercmd}" ] && "${adb_loggercmd}" -p "${class}" -t "adblock-${adb_ver}[${$}]" "${log_msg::256}" ||
printf "%s %s %s\n" "${class}" "adblock-${adb_ver}[${$}]" "${log_msg::256}"
[ -x "${adb_loggercmd}" ] && "${adb_loggercmd}" -p "${class}" -t "adblock-${adb_bver}[${$}]" "${log_msg::256}" ||
printf "%s %s %s\n" "${class}" "adblock-${adb_bver}[${$}]" "${log_msg::256}"
if [ "${class}" = "err" ] || [ "${class}" = "emerg" ]; then
[ "${adb_action}" != "mail" ] && f_rmdns
f_jsnup "error"
@@ -1168,7 +1169,7 @@ f_main() {
#
if [ "${adb_jail}" = "1" ] && [ "${adb_dnsstop}" != "0" ]; then
if [ "${adb_jaildir}" = "${adb_dnsdir}" ]; then
"${adb_catcmd}" "${adb_tmpdir}/${adb_dnsjail}" >"${adb_finaldir}/${adb_dnsfile}"
"${adb_mvcmd}" -f "${adb_tmpdir}/${adb_dnsjail}" "${adb_finaldir}/${adb_dnsfile}"
chown "${adb_dnsuser}" "${adb_finaldir}/${adb_dnsfile}" 2>/dev/null
if [ "${adb_dnsshift}" = "1" ] && [ ! -L "${adb_dnsdir}/${adb_dnsfile}" ]; then
ln -fs "${adb_finaldir}/${adb_dnsfile}" "${adb_dnsdir}/${adb_dnsfile}"
@@ -1186,7 +1187,7 @@ f_main() {
f_rmtemp
return
else
"${adb_catcmd}" "${adb_tmpdir}/${adb_dnsjail}" >"${adb_jaildir}/${adb_dnsjail}"
"${adb_mvcmd}" -f "${adb_tmpdir}/${adb_dnsjail}" "${adb_jaildir}/${adb_dnsjail}"
chown "${adb_dnsuser}" "${adb_jaildir}/${adb_dnsjail}" 2>/dev/null
f_log "info" "additional restrictive jail blocklist placed in ${adb_jaildir}"
fi
@@ -1582,6 +1583,7 @@ fi
# reference required system utilities
#
adb_wccmd="$(f_cmd wc)"
adb_mvcmd="$(f_cmd mv)"
adb_catcmd="$(f_cmd cat)"
adb_zcatcmd="$(f_cmd zcat)"
adb_awkcmd="$(f_cmd gawk awk)"