adblock: update 4.2.7-3

* fixed a reversed domain output when TLD compression is disabled (reported in the forum)
* removed abandoned antipopads source
* added three energized source variants (blu, spark, ultimate)

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2025-03-22 08:53:45 +01:00
parent b1a648e1ff
commit ed57afa392
No known key found for this signature in database
GPG Key ID: 9D71CD547BFAE684
4 changed files with 66 additions and 31 deletions

View File

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

View File

@ -17,7 +17,6 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| android_tracking | | S | tracking | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
| andryou | | L | compilation | [Link](https://gitlab.com/andryou/block/-/blob/master/readme.md) |
| anti_ad | | L | compilation | [Link](https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md) |
| antipopads | | L | compilation | [Link](https://github.com/AdroitAdorKhan/antipopads-re) |
| anudeep | | M | compilation | [Link](https://github.com/anudeepND/blacklist) |
| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) |
| certpl | | L | phishing | [Link](https://cert.pl/en/warning-list/) |
@ -26,6 +25,9 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| 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) |

View File

@ -669,9 +669,14 @@ f_list() {
else
"${adb_catcmd}" "${adb_tmpdir}/tmp.raw.${src_name}" >"${adb_tmpdir}/tmp.deduplicate.${src_name}"
fi
"${adb_awkcmd}" '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_sortcmd}" ${adb_srtopts} -u "${adb_tmpdir}/tmp.raw.${src_name}" 2>/dev/null >"${file_name}"
out_rc="${?}"
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}" |
"${adb_sortcmd}" ${adb_srtopts} -u >"${file_name}"
out_rc="${?}"
else
"${adb_sortcmd}" ${adb_srtopts} -u "${adb_tmpdir}/tmp.deduplicate.${src_name}" 2>/dev/null >"${file_name}"
out_rc="${?}"
fi
fi
;;
"whitelist")
@ -943,8 +948,14 @@ f_query() {
for file in "${adb_backupdir}/${adb_dnsprefix}".*.gz "${adb_blacklist}" "${adb_whitelist}"; do
suffix="${file##*.}"
if [ "${suffix}" = "gz" ]; then
"${adb_zcatcmd}" "${file}" 2>/dev/null |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' | "${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}"
if [ "${adb_tld}" = "1" ]; then
"${adb_zcatcmd}" "${file}" 2>/dev/null |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
"${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}"
else
"${adb_zcatcmd}" "${file}" 2>/dev/null |
"${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}"
fi
else
"${adb_awkcmd}" -v f="${file##*/}" "BEGIN{rc=1};/^($search|.*\\.${search})$/{i++;if(i<=3){printf \" + %-30s%s\n\",f,\$1;rc=0}else if(i==4){printf \" + %-30s%s\n\",f,\"[...]\"}};END{exit rc}" "${file}"
fi
@ -1066,8 +1077,7 @@ f_main() {
(
f_list "${entry}" "${entry}"
) &
hold="$((cnt % adb_cores))"
[ "${hold}" = "0" ] && wait -n
[ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
@ -1098,8 +1108,7 @@ f_main() {
(
f_list safesearch "${entry}"
) &
hold="$((cnt % adb_cores))"
[ "${hold}" = "0" ] && wait -n
[ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
fi
@ -1160,10 +1169,16 @@ f_main() {
f_log "info" "download of '${src_name}' failed, url: ${src_url}, rule: ${src_rset:-"-"}, categories: ${src_cat:-"-"}, rc: ${src_rc}"
fi
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpload}" ]; then
"${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
"${adb_sortcmd}" ${adb_srtopts} -u 2>/dev/null >"${src_tmpfile}"
src_rc="${?}"
if [ "${adb_tld}" = "1" ]; then
"${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
"${adb_sortcmd}" ${adb_srtopts} -u 2>/dev/null >"${src_tmpfile}"
src_rc="${?}"
else
"${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
"${adb_sortcmd}" ${adb_srtopts} -u 2>/dev/null >"${src_tmpfile}"
src_rc="${?}"
fi
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpfile}" ]; then
f_list download
[ "${adb_backup}" = "1" ] && f_list backup
@ -1205,10 +1220,16 @@ f_main() {
fi
done
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpload}" ]; then
"${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
"${adb_sortcmd}" ${adb_srtopts} -u >"${src_tmpfile}"
src_rc="${?}"
if [ "${adb_tld}" = "1" ]; then
"${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
"${adb_awkcmd}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' |
"${adb_sortcmd}" ${adb_srtopts} -u >"${src_tmpfile}"
src_rc="${?}"
else
"${adb_awkcmd}" "${src_rset}" "${src_tmpload}" | "${adb_sedcmd}" "s/\r//g" |
"${adb_sortcmd}" ${adb_srtopts} -u >"${src_tmpfile}"
src_rc="${?}"
fi
if [ "${src_rc}" = "0" ] && [ -s "${src_tmpfile}" ]; then
f_list download
[ "${adb_backup}" = "1" ] && f_list backup
@ -1223,8 +1244,7 @@ f_main() {
fi
) &
fi
hold="$((cnt % adb_cores))"
[ "${hold}" = "0" ] && wait -n
[ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
wait
@ -1250,7 +1270,7 @@ f_main() {
# trace dns queries via tcpdump and prepare a report
#
f_report() {
local report_raw report_txt content status total start end start_date start_time end_date end_time blocked percent top_list top array item index hold ports value key key_list cnt="0" resolve="-nn" action="${1}" top_count="${2:-"10"}" res_count="${3:-"50"}" search="${4:-"+"}"
local report_raw report_txt content status total start end start_date start_time end_date end_time blocked percent top_list top array item index ports value key key_list cnt="0" resolve="-nn" action="${1}" top_count="${2:-"10"}" res_count="${3:-"50"}" search="${4:-"+"}"
report_raw="${adb_reportdir}/adb_report.raw"
report_srt="${adb_reportdir}/adb_report.srt"
@ -1289,8 +1309,7 @@ f_report() {
printf "%08d\t%s\t%s\t%s\t%-25s\t%s\n",$7,type,$1,substr($2,1,8),$4,domain}' >>"${report_raw}"
fi
) &
hold="$((cnt % adb_cores))"
[ "${hold}" = "0" ] && wait -n
[ "${cnt}" -gt "${adb_cores}" ] && wait -n
cnt="$((cnt + 1))"
done
wait

View File

@ -48,13 +48,6 @@
"focus": "compilation",
"descurl": "https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md"
},
"antipopads": {
"url": "https://raw.githubusercontent.com/AdroitAdorKhan/antipopads-re/master/formats/domains.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "L",
"focus": "compilation",
"descurl": "https://github.com/AdroitAdorKhan/antipopads-re"
},
"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)}",
@ -111,6 +104,27 @@
"focus": "tracking",
"descurl": "https://easylist.to"
},
"energized_blu": {
"url": "https://energized.pro/blu/domains.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "compilation",
"descurl": "https://energized.pro"
},
"energized_spark": {
"url": "https://energized.pro/spark/domains.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "L",
"focus": "compilation",
"descurl": "https://energized.pro"
},
"energized_ultimate": {
"url": "https://energized.pro/ultimate/domains.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "compilation",
"descurl": "https://energized.pro"
},
"firetv_tracking": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/AmazonFireTV.txt",
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",