commit
fa1abf5fe0
4 changed files with 119 additions and 100 deletions
|
@ -6,8 +6,8 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=adblock
|
||||
PKG_VERSION:=4.0.5
|
||||
PKG_RELEASE:=5
|
||||
PKG_VERSION:=4.0.6
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@ A lot of people already use adblocker plugins within their desktop browsers, but
|
|||
* Support of the following fully pre-configured domain blocklist sources (free for private usage, for commercial use please check their individual licenses)
|
||||
|
||||
| Source | Enabled | Size | Focus | Information |
|
||||
| :------------------ | :-----: | :--- | :--------------- | :--------------------------------------------------------------- |
|
||||
| :------------------ | :-----: | :--- | :--------------- | :-------------------------------------------------------------------------------- |
|
||||
| adaway | x | S | mobile | [Link](https://github.com/AdAway/adaway.github.io) |
|
||||
| adguard | x | L | general | [Link](https://adguard.com) |
|
||||
| anti_ad | | L | compilation | [Link](https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md) |
|
||||
| andryou | | L | compilation | [Link](https://gitlab.com/andryou/block/-/blob/master/readme.md) |
|
||||
| anudeep | | M | compilation | [Link](https://github.com/anudeepND/blacklist) |
|
||||
| bitcoin | | S | mining | [Link](https://github.com/hoshsadiq/adblock-nocoin-list) |
|
||||
|
@ -138,7 +139,7 @@ Available commands:
|
|||
* Usually the auto pre-configured adblock setup works quite well and no manual overrides are needed
|
||||
|
||||
| Option | Default | Description/Valid Values |
|
||||
| :---------------- | :--------------------------------- | :--------------------------------------------------------------------------------------------- |
|
||||
| :----------------- | :--------------------------------- | :--------------------------------------------------------------------------------------------- |
|
||||
| adb_enabled | 1, enabled | set to 0 to disable the adblock service |
|
||||
| adb_srcarc | -, /etc/adblock/adblock.sources.gz | full path to the used adblock source archive |
|
||||
| adb_srcfile | -, /tmp/adb_sources.json | full path to the used adblock source file, which has a higher precedence than the archive file |
|
||||
|
@ -170,6 +171,7 @@ Available commands:
|
|||
| adb_backupdir | /tmp | path for adblock backups |
|
||||
| adb_tmpbase | /tmp | path for all adblock related runtime operations, e.g. downloading, sorting, merging etc. |
|
||||
| adb_safesearch | 0, disabled | set to 1 to enforce SafeSearch for google, bing, duckduckgo, yandex, youtube and pixabay |
|
||||
| adb_safesearchlist | -, not set | Limit SafeSearch to certain provider (see above) |
|
||||
| adb_safesearchmod | 0, disabled | set to 1 to enable moderate SafeSearch filters for youtube |
|
||||
| adb_mail | 0, disabled | set to 1 to enable notification E-Mails in case of a processing errors |
|
||||
| adb_mailreceiver | -, not set | receiver address for adblock notification E-Mails |
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
export LC_ALL=C
|
||||
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
set -o pipefail
|
||||
adb_ver="4.0.5"
|
||||
adb_ver="4.0.6"
|
||||
adb_enabled=0
|
||||
adb_debug=0
|
||||
adb_forcedns=0
|
||||
|
@ -20,6 +20,7 @@ adb_dnsfilereset=0
|
|||
adb_dnsflush=0
|
||||
adb_dnstimeout=20
|
||||
adb_safesearch=0
|
||||
adb_safesearchlist=""
|
||||
adb_safesearchmod=0
|
||||
adb_report=0
|
||||
adb_trigger=""
|
||||
|
@ -30,6 +31,7 @@ adb_mailcnt=0
|
|||
adb_jail=0
|
||||
adb_dns=""
|
||||
adb_dnsprefix="adb_list"
|
||||
adb_locallist="blacklist whitelist"
|
||||
adb_tmpbase="/tmp"
|
||||
adb_backupdir="/tmp"
|
||||
adb_reportdir="/tmp"
|
||||
|
@ -157,7 +159,13 @@ f_conf()
|
|||
{
|
||||
local option="${1}"
|
||||
local value="${2}"
|
||||
if [ "${option}" = "adb_sources" ]
|
||||
then
|
||||
eval "${option}=\"$(printf "%s" "${adb_sources}") ${value}\""
|
||||
elif [ "${option}" = "adb_safesearchlist" ]
|
||||
then
|
||||
eval "${option}=\"$(printf "%s" "${adb_safesearchlist}") ${value}\""
|
||||
fi
|
||||
}
|
||||
}
|
||||
config_load adblock
|
||||
|
@ -921,7 +929,7 @@ f_tld()
|
|||
#
|
||||
f_switch()
|
||||
{
|
||||
local status list entry done="false" mode="${1}"
|
||||
local status entry done="false" mode="${1}"
|
||||
|
||||
json_load_file "${adb_rtfile}" >/dev/null 2>&1
|
||||
json_select "data" >/dev/null 2>&1
|
||||
|
@ -1175,8 +1183,7 @@ f_main()
|
|||
|
||||
# white- and blacklist preparation
|
||||
#
|
||||
list="blacklist whitelist"
|
||||
for entry in ${list}
|
||||
for entry in ${adb_locallist}
|
||||
do
|
||||
( f_list "${entry}" "${entry}" )&
|
||||
done
|
||||
|
@ -1185,8 +1192,11 @@ f_main()
|
|||
#
|
||||
if [ "${adb_safesearch}" -eq 1 ] && [ "${adb_dnssafesearch}" != "0" ]
|
||||
then
|
||||
list="google bing duckduckgo pixabay yandex youtube"
|
||||
for entry in ${list}
|
||||
if [ -z "${adb_safesearchlist}" ]
|
||||
then
|
||||
adb_safesearchlist="google bing duckduckgo pixabay yandex youtube"
|
||||
fi
|
||||
for entry in ${adb_safesearchlist}
|
||||
do
|
||||
( f_list safesearch "${entry}" )&
|
||||
done
|
||||
|
|
|
@ -20,6 +20,13 @@
|
|||
"focus": "compilation",
|
||||
"descurl": "https://gitlab.com/andryou/block/-/blob/master/readme.md"
|
||||
},
|
||||
"anti_ad": {
|
||||
"url": "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-domains.txt",
|
||||
"rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
|
||||
"size": "L",
|
||||
"focus": "compilation",
|
||||
"descurl": "https://github.com/privacy-protection-tools/anti-AD/blob/master/README.md"
|
||||
},
|
||||
"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)}",
|
||||
|
|
Loading…
Reference in a new issue