adblock: update to 4.2.1

* added full 1Hosts feed support (4 categories)
* changed the OISD list sources to alternate wildcard domains syntax
* used only the adguard source in default config
* fixed a needless reload delay plus a few cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2024-08-11 09:31:29 +02:00
parent df990b96da
commit 875fcf3f12
No known key found for this signature in database
GPG Key ID: 9D71CD547BFAE684
7 changed files with 36 additions and 20 deletions

View File

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

View File

@ -10,7 +10,8 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| Source | Enabled | Size | Focus | Information |
| :------------------ | :-----: | :--- | :--------------- | :-------------------------------------------------------------------------------- |
| adaway | x | S | mobile | [Link](https://github.com/AdAway/adaway.github.io) |
| 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 | | L | tracking | [Link](https://github.com/AdguardTeam/cname-trackers) |
| android_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
@ -20,7 +21,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| anudeep | | M | compilation | [Link](https://github.com/anudeepND/blacklist) |
| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) |
| cpbl | | XL | compilation | [Link](https://github.com/bongochong/CombinedPrivacyBlockLists) |
| disconnect | x | S | general | [Link](https://disconnect.me) |
| disconnect | | S | general | [Link](https://disconnect.me) |
| 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) |
@ -60,7 +61,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| 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 | x | S | general | [Link](https://pgl.yoyo.org/adservers) |
| yoyo | | S | general | [Link](https://pgl.yoyo.org/adservers) |
* List of supported and fully pre-configured adblock sources, already active sources are pre-selected.
<b><em>To avoid OOM errors, please do not select too many lists!</em></b>
@ -134,7 +135,7 @@ Available commands:
resume Resume adblock processing
query &lt;domain&gt; Query active blocklists and backups for a specific domain
report [&lt;search&gt;] Print DNS statistics with an optional search parameter
list [&lt;add&gt;|&lt;add_utc&gt;|&lt;add_eng&gt;|&lt;add_stb&gt;|&lt;remove&gt;|&lt;remove_utc&gt;|&lt;remove_eng&gt;|&lt;remove_stb&gt;] &lt;source(s)&gt; List/Edit available sources
list List available sources
timer [&lt;add&gt; &lt;tasks&gt; &lt;hour&gt; [&lt;minute&gt;] [&lt;weekday&gt;]]|[&lt;remove&gt; &lt;line no.&gt;] List/Edit cron update intervals
version Print version information
running Check if service is running

View File

@ -1,7 +1,7 @@
hag;multi-light;light-onlydomains.txt
hag;multi-normal;multi-onlydomains.txt
hag;multi-pro;pro-onlydomains.txt
hag;multi-pro;pro.mini-onlydomains.txt
hag;multi-pro.mini;pro.mini-onlydomains.txt
hag;multi-pro.plus;pro.plus-onlydomains.txt
hag;multi-pro.mini;pro.plus.mini-onlydomains.txt
hag;multi-ultimate;ultimate-onlydomains.txt
@ -30,6 +30,10 @@ hag;native.winoffice;native.winoffice-onlydomains.txt
hag;native.xiaomi;native.xiaomi-onlydomains.txt
hag;nosafesearch;nosafesearch-onlydomains.txt
hag;popupads;popupads-onlydomains.txt
hst;mini;mini/domains.wildcards
hst;lite;Lite/domains.wildcards
hst;pro;Pro/domains.wildcards
hst;xtra;Xtra/domains.wildcards
stb;standard;hosts
stb;standard-fakenews;alternates/fakenews/hosts
stb;standard-fakenews-gambling;alternates/fakenews-gambling/hosts

View File

@ -8,7 +8,4 @@ config adblock 'global'
option adb_mail '0'
option adb_report '0'
option adb_backup '1'
list adb_sources 'adaway'
list adb_sources 'adguard'
list adb_sources 'disconnect'
list adb_sources 'yoyo'

View File

@ -201,8 +201,10 @@ service_triggers() {
iface="$(uci_get adblock global adb_trigger)"
delay="$(uci_get adblock global adb_triggerdelay "5")"
PROCD_RELOAD_DELAY="$((delay * 1000))"
PROCD_RELOAD_DELAY="$((delay * 1000))"
[ -n "${iface}" ] && procd_add_interface_trigger "interface.*.up" "${iface}" "${adb_init}" "start"
PROCD_RELOAD_DELAY="$((2 * 1000))"
procd_add_reload_trigger "adblock"
}

View File

@ -11,7 +11,7 @@
export LC_ALL=C
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
adb_ver="4.2.0"
adb_ver="4.2.1"
adb_enabled="0"
adb_debug="0"
adb_forcedns="0"
@ -185,6 +185,8 @@ f_conf() {
eval "${option}=\"$(printf "%s" "${adb_sources}") ${value}\""
elif [ "${option}" = "adb_hag_sources" ]; then
eval "${option}=\"$(printf "%s" "${adb_hag_sources}") ${value}\""
elif [ "${option}" = "adb_hst_sources" ]; then
eval "${option}=\"$(printf "%s" "${adb_hst_sources}") ${value}\""
elif [ "${option}" = "adb_stb_sources" ]; then
eval "${option}=\"$(printf "%s" "${adb_stb_sources}") ${value}\""
elif [ "${option}" = "adb_utc_sources" ]; then
@ -1211,11 +1213,14 @@ f_main() {
) &
fi
else
if [ "${src_name}" = "stevenblack" ] && [ -n "${adb_stb_sources}" ]; then
src_cat="${adb_stb_sources}"
if [ "${src_name}" = "1hosts" ] && [ -n "${adb_hst_sources}" ]; then
src_cat="${adb_hst_sources}"
elif [ "${src_name}" = "hagezi" ] && [ -n "${adb_hag_sources}" ]; then
src_cat="${adb_hag_sources}"
elif { [ "${src_name}" = "hagezi" ] && [ -z "${adb_hag_sources}" ]; } ||
elif [ "${src_name}" = "stevenblack" ] && [ -n "${adb_stb_sources}" ]; then
src_cat="${adb_stb_sources}"
elif { [ "${src_name}" = "1hosts" ] && [ -z "${adb_hst_sources}" ]; } ||
{ [ "${src_name}" = "hagezi" ] && [ -z "${adb_hag_sources}" ]; } ||
{ [ "${src_name}" = "stevenblack" ] && [ -z "${adb_stb_sources}" ]; }; then
continue
fi

View File

@ -1,4 +1,11 @@
{
"1hosts": {
"url": "https://raw.githubusercontent.com/badmojr/1Hosts/master/",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "VAR",
"focus": "compilation",
"descurl": "https://github.com/badmojr/1Hosts"
},
"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)}",
@ -140,22 +147,22 @@
"descurl": "https://github.com/notracking/hosts-blocklists"
},
"oisd_big": {
"url": "https://big.oisd.nl/domainswild",
"rule": "BEGIN{FS=\"\\\\*.\"}/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"url": "https://big.oisd.nl/domainswild2",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "general",
"descurl": "https://oisd.nl"
},
"oisd_nsfw": {
"url": "https://nsfw.oisd.nl/domainswild",
"rule": "BEGIN{FS=\"\\\\*.\"}/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"url": "https://nsfw.oisd.nl/domainswild2",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "porn",
"descurl": "https://oisd.nl"
},
"oisd_small": {
"url": "https://small.oisd.nl/domainswild",
"rule": "BEGIN{FS=\"\\\\*.\"}/^\\*\\.([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"url": "https://small.oisd.nl/domainswild2",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "L",
"focus": "general",
"descurl": "https://oisd.nl"