Browse Source

adblock: release 4.0.5

* update energized source urls, add ultimate variant
* switch shalla source to http (invalid server certificate)
* add another stevenblack source variant (normal / porn)
* small cornercase fixes
* update readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
lilik-openwrt-22.03
Dirk Brenken 4 years ago
parent
commit
c9f91ecc47
No known key found for this signature in database GPG Key ID: 9D71CD547BFAE684
5 changed files with 53 additions and 30 deletions
  1. +3
    -3
      net/adblock/Makefile
  2. +9
    -7
      net/adblock/files/README.md
  3. +4
    -4
      net/adblock/files/adblock.init
  4. +11
    -4
      net/adblock/files/adblock.sh
  5. +26
    -12
      net/adblock/files/adblock.sources

+ 3
- 3
net/adblock/Makefile View File

@ -6,8 +6,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
PKG_VERSION:=4.0.4
PKG_RELEASE:=4
PKG_VERSION:=4.0.5
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
@ -17,7 +17,7 @@ define Package/adblock
SECTION:=net
CATEGORY:=Network
TITLE:=Powerful adblock script to block ad/abuse domains by using DNS
DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort +ca-bundle
DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort +ca-bundle +opkg
PKGARCH:=all
endef


+ 9
- 7
net/adblock/files/README.md View File

@ -15,10 +15,11 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) |
| disconnect | x | S | general | [Link](https://disconnect.me) |
| dshield | | XL | general | [Link](https://dshield.org) |
| energized_blugo | | XL | compilation | [Link](https://github.com/EnergizedProtection/block) |
| energized_blu | | XL | compilation | [Link](https://github.com/EnergizedProtection/block) |
| energized_porn | | XXL | compilation+porn | [Link](https://github.com/EnergizedProtection/block) |
| energized_unified | | XXL | compilation | [Link](https://github.com/EnergizedProtection/block) |
| energized_blugo | | XL | compilation | [Link](https://energized.pro) |
| energized_blu | | XL | compilation | [Link](https://energized.pro) |
| energized_porn | | XXL | compilation+porn | [Link](https://energized.pro) |
| energized_ultimate | | XXL | compilation | [Link](https://energized.pro) |
| energized_unified | | XXL | compilation | [Link](https://energized.pro) |
| malwaredomains | | M | malware | [Link](https://malwaredomains.com) |
| malwarelist | | S | malware | [Link](https://www.malwaredomainlist.com) |
| notracking | | XL | tracking | [Link](https://github.com/notracking/hosts-blocklists) |
@ -35,11 +36,12 @@ A lot of people already use adblocker plugins within their desktop browsers, but
| reg_ro | | M | reg_romania | [Link](https://easylist.to) |
| reg_ru | | M | reg_russia | [Link](https://easylist.to) |
| reg_vn | | M | reg_vietnam | [Link](https://bigdargon.github.io/hostsVN) |
| shallalist | | L | general | [Link](https://www.shallalist.de) |
| shallalist_porn | | XXL | general+porn | [Link](https://www.shallalist.de) |
| shallalist | | L | general | [Link](http://www.shallalist.de) |
| shallalist_porn | | XXL | general+porn | [Link](http://www.shallalist.de) |
| smarttv | | S | smarttv | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
| spam404 | | S | general | [Link](https://github.com/Dawsey21) |
| stevenblack | | L | compilation | [Link](https://github.com/StevenBlack/hosts) |
| stevenblack | | L | compilation+porn | [Link](https://github.com/StevenBlack/hosts) |
| stevenblack_porn | | L | compilation+porn | [Link](https://github.com/StevenBlack/hosts) |
| stopforumspam | | S | spam | [Link](https://www.stopforumspam.com) |
| sysctl | | M | general | [Link](http://sysctl.org/cameleon) |
| utcapitole | | L | general | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) |


+ 4
- 4
net/adblock/files/adblock.init View File

@ -134,8 +134,8 @@ list()
src_enabled="${src_enabled//\'}"
printf "%s\\n" "::: Available adblock sources"
printf "%s\\n" ":::"
printf "%-25s%-10s%-7s%-20s%s\\n" " Name" "Enabled" "Size" "Focus" "Info URL"
printf "%s\\n" " ------------------------------------------------------------------"
printf "%-25s%-10s%-7s%-21s%s\\n" " Name" "Enabled" "Size" "Focus" "Info URL"
printf "%s\\n" " -------------------------------------------------------------------"
json_load_file "${src_file}"
json_get_keys keylist
for key in ${keylist}
@ -155,7 +155,7 @@ list()
enabled=" "
fi
src_enabled="${src_enabled/${key}}"
printf " + %-21s%-10s%-7s%-20s%s\\n" "${key}" "${enabled}" "${size}" "${focus}" "${descurl}"
printf " + %-21s%-10s%-7s%-21s%s\\n" "${key:0:20}" "${enabled}" "${size:0:3}" "${focus:0:20}" "${descurl:0:50}"
else
src_enabled="${src_enabled} ${key}"
fi
@ -168,7 +168,7 @@ list()
printf "%s\\n" " ----------------------------------------------"
for key in ${src_enabled}
do
printf " - %s\\n" "${key}"
printf " - %s\\n" "${key:0:20}"
done
fi
else


+ 11
- 4
net/adblock/files/adblock.sh View File

@ -11,7 +11,7 @@
export LC_ALL=C
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
set -o pipefail
adb_ver="4.0.4"
adb_ver="4.0.5"
adb_enabled=0
adb_debug=0
adb_forcedns=0
@ -125,13 +125,20 @@ f_conf()
if [ ! -r "/etc/config/adblock" ] || [ -n "$(uci -q show adblock.@source[0])" ]
then
if [ -r "/etc/config/adblock-opkg" ] && [ -z "$(uci -q show adblock-opkg.@source[0])" ]
if { [ -r "/etc/config/adblock-opkg" ] && [ -z "$(uci -q show adblock-opkg.@source[0])" ]; } || \
{ [ -r "/rom/etc/config/adblock" ] && [ -z "$(uci -q show /rom/etc/config/adblock.@source[0])" ]; }
then
if [ -r "/etc/config/adblock" ]
then
cp -pf "/etc/config/adblock" "/etc/config/adblock-backup"
fi
cp -pf "/etc/config/adblock-opkg" "/etc/config/adblock"
if [ -r "/etc/config/adblock-opkg" ]
then
cp -pf "/etc/config/adblock-opkg" "/etc/config/adblock"
elif [ -r "/rom/etc/config/adblock" ]
then
cp -pf "/rom/etc/config/adblock" "/etc/config/adblock"
fi
f_log "info" "missing or old adblock config replaced with new valid default config"
else
f_log "err" "unrecoverable adblock config error, please re-install the package via opkg with the '--force-reinstall --force-maintainer' options"
@ -242,7 +249,7 @@ f_dns()
adb_dnsinstance="${adb_dnsinstance:-"0"}"
adb_dnsuser="${adb_dnsuser:-"root"}"
adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n IN NS localhost.\n"}"
adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n"}"
adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"}"
adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}"
adb_dnssafesearch="${adb_dnssafesearch:-"0"}"


+ 26
- 12
net/adblock/files/adblock.sources View File

@ -49,32 +49,39 @@
"descurl": "https://www.dshield.org"
},
"energized_blugo": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/bluGo/formats/domains.txt",
"url": "https://block.energized.pro/bluGo/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "compilation",
"descurl": "https://github.com/EnergizedProtection/block"
"descurl": "https://energized.pro"
},
"energized_blu": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/blu/formats/domains.txt",
"url": "https://block.energized.pro/blu/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "compilation",
"descurl": "https://github.com/EnergizedProtection/block"
"descurl": "https://energized.pro"
},
"energized_porn": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/porn/formats/domains.txt",
"url": "https://block.energized.pro/porn/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "compilation+porn",
"descurl": "https://github.com/EnergizedProtection/block"
"descurl": "https://energized.pro"
},
"energized_ultimate": {
"url": "https://block.energized.pro/ultimate/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "compilation",
"descurl": "https://energized.pro"
},
"energized_unified": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/unified/formats/domains.txt",
"url": "https://block.energized.pro/unified/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "compilation",
"descurl": "https://github.com/EnergizedProtection/block"
"descurl": "https://energized.pro"
},
"malwaredomains": {
"url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains",
@ -189,24 +196,24 @@
"descurl": "https://bigdargon.github.io/hostsVN"
},
"shallalist": {
"url": "https://www.shallalist.de/Downloads/shallalist.tar.gz",
"url": "http://www.shallalist.de/Downloads/shallalist.tar.gz",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"categories": [
"adv", "costtraps", "spyware", "tracker", "warez"
],
"size": "L",
"focus": "general",
"descurl": "https://www.shallalist.de"
"descurl": "http://www.shallalist.de"
},
"shallalist_porn": {
"url": "https://www.shallalist.de/Downloads/shallalist.tar.gz",
"url": "http://www.shallalist.de/Downloads/shallalist.tar.gz",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"categories": [
"adv", "costtraps", "porn", "spyware", "tracker", "warez"
],
"size": "XXL",
"focus": "general+porn",
"descurl": "https://www.shallalist.de"
"descurl": "http://www.shallalist.de"
},
"smarttv": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
@ -223,6 +230,13 @@
"descurl": "https://github.com/Dawsey21"
},
"stevenblack": {
"url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "L",
"focus": "compilation",
"descurl": "https://github.com/StevenBlack/hosts"
},
"stevenblack_porn": {
"url": "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "L",


Loading…
Cancel
Save