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>
(cherry picked from commit c9f91ecc47
)
This commit is contained in:
parent
a41e068db8
commit
c8d2ed2cbc
5 changed files with 54 additions and 31 deletions
|
@ -6,8 +6,8 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=adblock
|
PKG_NAME:=adblock
|
||||||
PKG_VERSION:=4.0.4
|
PKG_VERSION:=4.0.5
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ define Package/adblock
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
TITLE:=Powerful adblock script to block ad/abuse domains by using DNS
|
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
|
PKGARCH:=all
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -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) |
|
| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) |
|
||||||
| disconnect | x | S | general | [Link](https://disconnect.me) |
|
| disconnect | x | S | general | [Link](https://disconnect.me) |
|
||||||
| dshield | | XL | general | [Link](https://dshield.org) |
|
| dshield | | XL | general | [Link](https://dshield.org) |
|
||||||
| energized_blugo | | XL | compilation | [Link](https://github.com/EnergizedProtection/block) |
|
| energized_blugo | | XL | compilation | [Link](https://energized.pro) |
|
||||||
| energized_blu | | XL | compilation | [Link](https://github.com/EnergizedProtection/block) |
|
| energized_blu | | XL | compilation | [Link](https://energized.pro) |
|
||||||
| energized_porn | | XXL | compilation+porn | [Link](https://github.com/EnergizedProtection/block) |
|
| energized_porn | | XXL | compilation+porn | [Link](https://energized.pro) |
|
||||||
| energized_unified | | XXL | compilation | [Link](https://github.com/EnergizedProtection/block) |
|
| energized_ultimate | | XXL | compilation | [Link](https://energized.pro) |
|
||||||
|
| energized_unified | | XXL | compilation | [Link](https://energized.pro) |
|
||||||
| malwaredomains | | M | malware | [Link](https://malwaredomains.com) |
|
| malwaredomains | | M | malware | [Link](https://malwaredomains.com) |
|
||||||
| malwarelist | | S | malware | [Link](https://www.malwaredomainlist.com) |
|
| malwarelist | | S | malware | [Link](https://www.malwaredomainlist.com) |
|
||||||
| notracking | | XL | tracking | [Link](https://github.com/notracking/hosts-blocklists) |
|
| 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_ro | | M | reg_romania | [Link](https://easylist.to) |
|
||||||
| reg_ru | | M | reg_russia | [Link](https://easylist.to) |
|
| reg_ru | | M | reg_russia | [Link](https://easylist.to) |
|
||||||
| reg_vn | | M | reg_vietnam | [Link](https://bigdargon.github.io/hostsVN) |
|
| reg_vn | | M | reg_vietnam | [Link](https://bigdargon.github.io/hostsVN) |
|
||||||
| shallalist | | L | general | [Link](https://www.shallalist.de) |
|
| shallalist | | L | general | [Link](http://www.shallalist.de) |
|
||||||
| shallalist_porn | | XXL | general+porn | [Link](https://www.shallalist.de) |
|
| shallalist_porn | | XXL | general+porn | [Link](http://www.shallalist.de) |
|
||||||
| smarttv | | S | smarttv | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
|
| smarttv | | S | smarttv | [Link](https://github.com/Perflyst/PiHoleBlocklist) |
|
||||||
| spam404 | | S | general | [Link](https://github.com/Dawsey21) |
|
| 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) |
|
| stopforumspam | | S | spam | [Link](https://www.stopforumspam.com) |
|
||||||
| sysctl | | M | general | [Link](http://sysctl.org/cameleon) |
|
| sysctl | | M | general | [Link](http://sysctl.org/cameleon) |
|
||||||
| utcapitole | | L | general | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) |
|
| utcapitole | | L | general | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) |
|
||||||
|
|
|
@ -134,8 +134,8 @@ list()
|
||||||
src_enabled="${src_enabled//\'}"
|
src_enabled="${src_enabled//\'}"
|
||||||
printf "%s\\n" "::: Available adblock sources"
|
printf "%s\\n" "::: Available adblock sources"
|
||||||
printf "%s\\n" ":::"
|
printf "%s\\n" ":::"
|
||||||
printf "%-25s%-10s%-7s%-20s%s\\n" " Name" "Enabled" "Size" "Focus" "Info URL"
|
printf "%-25s%-10s%-7s%-21s%s\\n" " Name" "Enabled" "Size" "Focus" "Info URL"
|
||||||
printf "%s\\n" " ------------------------------------------------------------------"
|
printf "%s\\n" " -------------------------------------------------------------------"
|
||||||
json_load_file "${src_file}"
|
json_load_file "${src_file}"
|
||||||
json_get_keys keylist
|
json_get_keys keylist
|
||||||
for key in ${keylist}
|
for key in ${keylist}
|
||||||
|
@ -155,7 +155,7 @@ list()
|
||||||
enabled=" "
|
enabled=" "
|
||||||
fi
|
fi
|
||||||
src_enabled="${src_enabled/${key}}"
|
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
|
else
|
||||||
src_enabled="${src_enabled} ${key}"
|
src_enabled="${src_enabled} ${key}"
|
||||||
fi
|
fi
|
||||||
|
@ -168,7 +168,7 @@ list()
|
||||||
printf "%s\\n" " ----------------------------------------------"
|
printf "%s\\n" " ----------------------------------------------"
|
||||||
for key in ${src_enabled}
|
for key in ${src_enabled}
|
||||||
do
|
do
|
||||||
printf " - %s\\n" "${key}"
|
printf " - %s\\n" "${key:0:20}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
adb_ver="4.0.4"
|
adb_ver="4.0.5"
|
||||||
adb_enabled=0
|
adb_enabled=0
|
||||||
adb_debug=0
|
adb_debug=0
|
||||||
adb_forcedns=0
|
adb_forcedns=0
|
||||||
|
@ -125,13 +125,20 @@ f_conf()
|
||||||
|
|
||||||
if [ ! -r "/etc/config/adblock" ] || [ -n "$(uci -q show adblock.@source[0])" ]
|
if [ ! -r "/etc/config/adblock" ] || [ -n "$(uci -q show adblock.@source[0])" ]
|
||||||
then
|
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
|
then
|
||||||
if [ -r "/etc/config/adblock" ]
|
if [ -r "/etc/config/adblock" ]
|
||||||
then
|
then
|
||||||
cp -pf "/etc/config/adblock" "/etc/config/adblock-backup"
|
cp -pf "/etc/config/adblock" "/etc/config/adblock-backup"
|
||||||
fi
|
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"
|
f_log "info" "missing or old adblock config replaced with new valid default config"
|
||||||
else
|
else
|
||||||
f_log "err" "unrecoverable adblock config error, please re-install the package via opkg with the '--force-reinstall --force-maintainer' options"
|
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_dnsinstance="${adb_dnsinstance:-"0"}"
|
||||||
adb_dnsuser="${adb_dnsuser:-"root"}"
|
adb_dnsuser="${adb_dnsuser:-"root"}"
|
||||||
adb_dnsdir="${adb_dnsdir:-"/etc/kresd"}"
|
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_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_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}"
|
||||||
adb_dnssafesearch="${adb_dnssafesearch:-"0"}"
|
adb_dnssafesearch="${adb_dnssafesearch:-"0"}"
|
||||||
|
|
|
@ -49,32 +49,39 @@
|
||||||
"descurl": "https://www.dshield.org"
|
"descurl": "https://www.dshield.org"
|
||||||
},
|
},
|
||||||
"energized_blugo": {
|
"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)}",
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
"size": "XL",
|
"size": "XL",
|
||||||
"focus": "compilation",
|
"focus": "compilation",
|
||||||
"descurl": "https://github.com/EnergizedProtection/block"
|
"descurl": "https://energized.pro"
|
||||||
},
|
},
|
||||||
"energized_blu": {
|
"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)}",
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
"size": "XL",
|
"size": "XL",
|
||||||
"focus": "compilation",
|
"focus": "compilation",
|
||||||
"descurl": "https://github.com/EnergizedProtection/block"
|
"descurl": "https://energized.pro"
|
||||||
},
|
},
|
||||||
"energized_porn": {
|
"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)}",
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
"size": "XXL",
|
"size": "XXL",
|
||||||
"focus": "compilation+porn",
|
"focus": "compilation+porn",
|
||||||
"descurl": "https://github.com/EnergizedProtection/block"
|
"descurl": "https://energized.pro"
|
||||||
},
|
},
|
||||||
"energized_unified": {
|
"energized_ultimate": {
|
||||||
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/unified/formats/domains.txt",
|
"url": "https://block.energized.pro/ultimate/formats/domains.txt",
|
||||||
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
"size": "XXL",
|
"size": "XXL",
|
||||||
"focus": "compilation",
|
"focus": "compilation",
|
||||||
"descurl": "https://github.com/EnergizedProtection/block"
|
"descurl": "https://energized.pro"
|
||||||
|
},
|
||||||
|
"energized_unified": {
|
||||||
|
"url": "https://block.energized.pro/unified/formats/domains.txt",
|
||||||
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
|
"size": "XXL",
|
||||||
|
"focus": "compilation",
|
||||||
|
"descurl": "https://energized.pro"
|
||||||
},
|
},
|
||||||
"malwaredomains": {
|
"malwaredomains": {
|
||||||
"url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains",
|
"url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains",
|
||||||
|
@ -189,24 +196,24 @@
|
||||||
"descurl": "https://bigdargon.github.io/hostsVN"
|
"descurl": "https://bigdargon.github.io/hostsVN"
|
||||||
},
|
},
|
||||||
"shallalist": {
|
"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)}",
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
"categories": [
|
"categories": [
|
||||||
"adv", "costtraps", "spyware", "tracker", "warez"
|
"adv", "costtraps", "spyware", "tracker", "warez"
|
||||||
],
|
],
|
||||||
"size": "L",
|
"size": "L",
|
||||||
"focus": "general",
|
"focus": "general",
|
||||||
"descurl": "https://www.shallalist.de"
|
"descurl": "http://www.shallalist.de"
|
||||||
},
|
},
|
||||||
"shallalist_porn": {
|
"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)}",
|
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||||
"categories": [
|
"categories": [
|
||||||
"adv", "costtraps", "porn", "spyware", "tracker", "warez"
|
"adv", "costtraps", "porn", "spyware", "tracker", "warez"
|
||||||
],
|
],
|
||||||
"size": "XXL",
|
"size": "XXL",
|
||||||
"focus": "general+porn",
|
"focus": "general+porn",
|
||||||
"descurl": "https://www.shallalist.de"
|
"descurl": "http://www.shallalist.de"
|
||||||
},
|
},
|
||||||
"smarttv": {
|
"smarttv": {
|
||||||
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
|
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
|
||||||
|
@ -223,6 +230,13 @@
|
||||||
"descurl": "https://github.com/Dawsey21"
|
"descurl": "https://github.com/Dawsey21"
|
||||||
},
|
},
|
||||||
"stevenblack": {
|
"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",
|
"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)}",
|
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
|
||||||
"size": "L",
|
"size": "L",
|
||||||
|
|
Loading…
Reference in a new issue