adblock: update 4.2.7-3
authorDirk Brenken <[email protected]>
Sat, 22 Mar 2025 07:53:45 +0000 (08:53 +0100)
committerDirk Brenken <[email protected]>
Sat, 22 Mar 2025 07:55:31 +0000 (08:55 +0100)
* 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 <[email protected]>
net/adblock/Makefile
net/adblock/files/README.md
net/adblock/files/adblock.sh
net/adblock/files/adblock.sources

index 2316a51084188bb2eabf230cf32cdb9444882bb1..68c294205f13ec66a2ae6b37bebf39dbc1b47fd0 100644 (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 <[email protected]>
 
index fc7fab9b4cb75ad1b4e79f756db3632494c5b54b..8bf8b5954647eb30e858dd831ffdc36a9c61c9e8 100644 (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)                                  |
index 7a8753b04443b65e49cf92b18bba84811b9c46ac..61c50a8a0f14360befa520601fe6d8aecbfc76bb 100755 (executable)
@@ -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
index 0838c942ad22f240c84f9946bbf17d37f9d14b66..48424a6459e64a1197cd647714bf08f30b7037e3 100644 (file)
                "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)}",
                "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)}",