Browse Source

Merge pull request #11680 from dibdot/adblock

adblock: release 4.0.0
lilik-openwrt-22.03
Dirk Brenken 5 years ago
committed by GitHub
parent
commit
de38f8b4d7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 1586 additions and 1177 deletions
  1. +6
    -4
      net/adblock/Makefile
  2. +221
    -313
      net/adblock/files/README.md
  3. +9
    -169
      net/adblock/files/adblock.conf
  4. +145
    -30
      net/adblock/files/adblock.init
  5. +19
    -21
      net/adblock/files/adblock.mail
  6. +3
    -6
      net/adblock/files/adblock.monitor
  7. +903
    -634
      net/adblock/files/adblock.sh
  8. +280
    -0
      net/adblock/files/adblock.sources

+ 6
- 4
net/adblock/Makefile View File

@ -1,12 +1,12 @@
#
# Copyright (c) 2015-2019 Dirk Brenken (dev@brenken.org)
# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
PKG_VERSION:=3.8.15
PKG_VERSION:=4.0.0
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
DEPENDS:=+jshn +jsonfilter +coreutils +coreutils-sort @(PACKAGE_aria2||PACKAGE_curl||PACKAGE_wget||PACKAGE_uclient-fetch&&(PACKAGE_libustream-mbedtls||PACKAGE_libustream-openssl||PACKAGE_libustream-wolfssl))
PKGARCH:=all
endef
@ -55,9 +55,11 @@ define Package/adblock/install
$(INSTALL_DIR) $(1)/etc/adblock
$(INSTALL_BIN) ./files/adblock.mail $(1)/etc/adblock
$(INSTALL_BIN) ./files/adblock.service $(1)/etc/adblock
$(INSTALL_BIN) ./files/adblock.monitor $(1)/etc/adblock
$(INSTALL_CONF) ./files/adblock.blacklist $(1)/etc/adblock
$(INSTALL_CONF) ./files/adblock.whitelist $(1)/etc/adblock
$(INSTALL_CONF) ./files/adblock.sources $(1)/etc/adblock
gzip -9 $(1)/etc/adblock/adblock.sources
endef
$(eval $(call BuildPackage,adblock))

+ 221
- 313
net/adblock/files/README.md View File

@ -4,200 +4,197 @@
A lot of people already use adblocker plugins within their desktop browsers, but what if you are using your (smart) phone, tablet, watch or any other (wlan) gadget!? Getting rid of annoying ads, trackers and other abuse sites (like facebook) is simple: block them with your router. When the DNS server on your router receives DNS requests, you will sort out queries that ask for the resource records of ad servers and return a simple 'NXDOMAIN'. This is nothing but **N**on-e**X**istent Internet or Intranet domain name, if domain name is unable to resolved using the DNS server, a condition called the 'NXDOMAIN' occurred.
## Main Features
* Support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
* [adaway](https://adaway.org)
* Infrequent updates, approx. 400 entries (enabled by default)
* [adguard](https://adguard.com)
* Numerous updates on the same day, approx. 12.000 entries
* [bitcoin](https://github.com/hoshsadiq/adblock-nocoin-list)
* Infrequent updates, approx. 15 entries
* [blacklist]()
* Static local blacklist, located by default in `/etc/adblock/adblock.blacklist`
* [disconnect](https://disconnect.me)
* Numerous updates on the same day, approx. 6.500 entries (enabled by default)
* [dshield](http://dshield.org)
* Daily updates, approx. 4.500 entries
* [hphosts](https://hosts-file.net)
* Monthly updates, approx. 50.000 entries
* [malwaredomains](http://malwaredomains.com)
* Daily updates, approx. 16.000 entries
* [malwaredomainlist](http://www.malwaredomainlist.com)
* Daily updates, approx. 1.500 entries
* [openphish](https://openphish.com)
* Numerous updates on the same day, approx. 1.800 entries
* [reg_cn](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
* Regional blocklist for China, daily updates, approx. 1.600 entries
* [reg_cz](https://raw.githubusercontent.com/qxstyles/turris-hole-czech-block-list/master/turris-hole-czech-block-list)
* Regional blocklist for Czechia, maintained by Turris Omnia Users, infrequent updates, approx. 100 entries
* [reg_de](https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt)
* Regional blocklist for Germany, daily updates, approx. 9.200 entries
* [reg_id](https://easylist-downloads.adblockplus.org/abpindo+easylist.txt)
* Regional blocklist for Indonesia, daily updates, approx. 800 entries
* [reg_nl](https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt)
* Regional blocklist for the Netherlands, weekly updates, approx. 1300 entries
* [reg_pl](http://adblocklist.org)
* Regional blocklist for Poland, daily updates, approx. 50 entries
* [reg_ro](https://easylist-downloads.adblockplus.org/rolist+easylist.txt)
* Regional blocklist for Romania, weekly updates, approx. 600 entries
* [reg_ru](https://code.google.com/p/ruadlist)
* Regional blocklist for Russia, weekly updates, approx. 2.000 entries
* [shallalist](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
* Daily updates, approx. 32.000 entries (a short description of all categories can be found [online](http://www.shallalist.de/categories.html))
* [spam404](http://www.spam404.com)
* Infrequent updates, approx. 5.000 entries
* [sysctl/cameleon](http://sysctl.org/cameleon)
* Weekly updates, approx. 21.000 entries
* [ut_capitole](https://dsi.ut-capitole.fr/blacklists) (categories "cryptojacking" "ddos" "malware" "phishing" "warez" enabled by default)
* Daily updates, approx. 64.000 entries (a short description of all categories can be found [online](https://dsi.ut-capitole.fr/blacklists/index_en.php))
* [whocares](https://someonewhocares.org)
* Weekly updates, approx. 12.000 entries
* [winhelp](http://winhelp2002.mvps.org)
* Infrequent updates, approx. 15.000 entries
* [winspy](https://github.com/crazy-max/WindowsSpyBlocker)
* Infrequent updates, approx. 120 entries
* [yoyo](http://pgl.yoyo.org/adservers)
* Weekly updates, approx. 2.500 entries (enabled by default)
* 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) |
| andryou | | L | compilation | [Link](https://gitlab.com/andryou/block/-/blob/master/readme.md) |
| 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) |
| hphosts | | M | general | [Link](https://hosts-file.net) |
| 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) |
| oisd_nl | | XXL | general | [Link](https://oisd.nl) |
| openphish | | S | phishing | [Link](https://openphish.com) |
| phishing_army | | S | phishing | [Link](https://phishing.army) |
| reg_cn | | M | reg_china | [Link](https://easylist.to) |
| reg_de | | M | reg_germany | [Link](https://easylist.to) |
| reg_es | | M | reg_espania | [Link](https://easylist.to) |
| reg_fi | | S | reg_finland | [Link](https://github.com/finnish-easylist-addition) |
| reg_id | | M | reg_indonesia | [Link](https://easylist.to) |
| reg_nl | | M | reg_netherlands | [Link](https://easylist.to) |
| reg_pl | | S | reg_poland | [Link](http://adblocklist.org) |
| reg_ro | | M | reg_romania | [Link](https://easylist.to) |
| reg_ru | | M | reg_russia | [Link](https://easylist.to) |
| shallalist | | L | general | [Link](https://www.shallalist.de) |
| shallalist_porn | | XXL | general+porn | [Link](https://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) |
| sysctl | | M | general | [Link](http://sysctl.org/cameleon) |
| utcapitole | | L | general | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) |
| utcapitole_porn | | XXL | general+porn | [Link](https://dsi.ut-capitole.fr/blacklists/index_en.php) |
| whocares | | M | general | [Link](https://someonewhocares.org) |
| winhelp | | S | general | [Link](http://winhelp2002.mvps.org) |
| winspy | | S | win_telemetry | [Link](https://github.com/crazy-max/WindowsSpyBlocker) |
| yoyo | x | S | general | [Link](http://pgl.yoyo.org/adservers) |
* List of supported and fully pre-configured adblock sources, already active sources are pre-selected.
<b><em>To avoid OOM errors, please do not select too many lists!</em></b>
List size recommendations as follows:
<b>S</b> (-10k), <b>M</b> (10k-30k) and <b>L</b> (30k-80k) should work for 128 MByte devices,
<b>XL</b> (80k-200k) should work for 256-512 MByte devices,
<b>XXL</b> (200k-) needs more RAM and Multicore support, e.g. x86 or raspberry devices.
* Zero-conf like automatic installation & setup, usually no manual changes needed
* Simple but yet powerful adblock engine: adblock does not use error prone external iptables rulesets, http pixel server instances and things like that
* Support four different DNS backends: `dnsmasq`, `unbound`, `named` (bind) and `kresd`
* Support two different DNS blocking variants: `nxdomain` (default, supported by all backends), `null` (supported only by `dnsmasq`)
* Support six different download utilities: `uclient-fetch`, `wget`, `curl`, `aria2c`, `wget-nossl`, `busybox-wget`
* Fast downloads & list processing as they are handled in parallel running background jobs (see 'Download Queue')
* Provide `http only` mode without installed SSL library for all non-SSL blocklist sources
* Support a wide range of router modes, even AP modes are supported
* Supports five different DNS backend formats: dnsmasq, unbound, named (bind), kresd or raw (e.g. used by dnscrypt-proxy)
* Supports four different SSL-enabled download utilities: uclient-fetch, wget, curl or aria2c
* Supports SafeSearch for google, bing, duckduckgo, yandex, youtube and pixabay
* Fast downloads & list processing as they are handled in parallel running background jobs with multicore support
* Supports a wide range of router modes, even AP modes are supported
* Full IPv4 and IPv6 support
* Provide top level domain compression (`tld compression`), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the DNS backend
* Provide a 'DNS File Reset', where the final DNS blockfile will be purged after DNS backend loading to save storage space
* Blocklist source parsing by fast & flexible regex rulesets
* Overall duplicate removal in central blocklist `adb_list.overall`
* Additional blacklist for manual overrides, located by default in `/etc/adblock/adblock.blacklist` or in LuCI
* Additional whitelist for manual overrides, located by default in `/etc/adblock/adblock.whitelist` or in LuCI
* Provides top level domain compression ('tld compression'), this feature removes thousands of needless host entries from the blocklist and lowers the memory footprint for the DNS backend
* Provides a 'DNS File Reset', where the generated DNS blocklist file will be purged after DNS backend loading to save storage space
* Source parsing by fast & flexible regex rulesets, all rules and source information are placed in an external/compredd JSON file ('/etc/adblock/adblock.sources.gz')
* Overall duplicate removal in generated blocklist file 'adb_list.overall'
* Additional local blacklist for manual overrides, located in '/etc/adblock/adblock.blacklist'
* Additional local whitelist for manual overrides, located in '/etc/adblock/adblock.whitelist'
* Quality checks during blocklist update to ensure a reliable DNS backend service
* Minimal status & error logging to syslog, enable debug logging to receive more output
* procd based init system support (`start/stop/restart/reload/suspend/resume/query/status`)
* procd network interface trigger support or classic time based startup
* Keep the DNS cache intact after adblock processing (currently supported by unbound, named and kresd)
* Suspend & resume adblock actions temporarily without blocklist reloading
* Provide comprehensive runtime information via LuCI or via `status` init command
* Provide a detailed DNS Query Report with DNS related information about client requests, top (blocked) domains and more
* Provide a query function to quickly identify blocked (sub-)domains, e.g. for whitelisting. This function is also able to search in adblock backups and black-/whitelist, to get back the set of blocking lists sources for a certain domain
* Option to force DNS requests to the local resolver
* Procd based init system support ('start', 'stop', 'restart', 'reload', 'enable', 'disable', 'running', 'status', 'suspend', 'resume', 'query', 'report', 'list', 'timer')
* Auto-Startup via procd network interface trigger or via classic time based startup
* Suspend & Resume adblock temporarily without blocklist reloading
* Provides comprehensive runtime information
* Provides a detailed DNS Query Report with DNS related information about client requests, top (blocked) domains and more
* Provides a powerful query function to quickly find blocked (sub-)domains, e.g. for whitelisting
* Provides an easily configurable blocklist update scheduler called 'Refresh Timer'
* Includes an option to generate an additional, restrictive 'adb_list.jail' to block access to all domains except those listed in the whitelist file. You can use this restrictive blocklist manually e.g. for guest wifi or kidsafe configurations
* Includes an option to force DNS requests to the local resolver
* Automatic blocklist backup & restore, these backups will be used in case of download errors and during startup
* Send notification emails in case of a processing error or if the overall domain count is &le; 0
* Send notification E-Mails in case of a processing error or if the overall domain count is &le; 0
* Add new adblock sources on your own, see example below
* Strong LuCI support for all options
* Strong LuCI support, all relevant options are exposed to the web frontend
## Installation & Usage
### Prerequisites
* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07) and with the latest snapshot
## Prerequisites
* [OpenWrt](https://openwrt.org), tested with the stable release series (19.07.x) and with the latest rolling snapshot releases. On turris devices it has been successfully tested with TurrisOS 5.1.x
<b>Please note:</b> Older OpenWrt releases like 18.06.x or 17.01.x are _not_ supported!
<b>Please note:</b> Devices with less than 128 MByte RAM are _not_ supported!
* A usual setup with an enabled DNS backend at minimum - dump AP modes without a working DNS backend are _not_ supported
* A download utility:
* To support all blocklist sources and in order to run the default configuration of `adblock`, a full version (with SSL support) of `wget`, `uclient-fetch` with one of the `libustream-*` SSL libraries, `aria2c` or `curl` is required
* The package used by default is probably `uclient-fetch` so in order to make `adblock` work with its default configuration it is needed to install one of the `libustream-*` SSL libraries. Example: `opkg install libustream-openssl`
* For limited devices with real memory constraints, adblock provides also a `http only` option and supports `wget-nossl` and `uclient-fetch` (without `libustream-ssl`) as well
* For more configuration options see examples below
* Email notification (optional): For email notification support you need the additional `msmtp` package
* DNS Query Report (optional): For this detailed report you need the additional package `tcpdump` or `tcpdump-mini`
### Installation of the core package
* Install `adblock` (`opkg install adblock`)
* A download utility with SSL support: 'wget', 'uclient-fetch' with one of the 'libustream-*' ssl libraries, 'aria2c' or 'curl' is required
* Optional E-Mail notification support: for E-Mail notifications you need to install the additional 'msmtp' package
* Optional DNS Query Report support: for DNS reporting you need to install the additional package 'tcpdump-mini' or 'tcpdump'
### LuCI adblock companion package
* It is strongly recommended to use the LuCI frontend to easily configure all powerful aspects of adblock
* Install `luci-app-adblock` (`opkg install luci-app-adblock`)
* The application is located in LuCI under the `Services` menu
### Configuration and controlling
* At minimum configure the appropriate DNS backend (`dnsmasq` by default), the download utility and enable the adblock service in `/etc/config/adblock`
* Control the adblock service manually with `/etc/init.d/adblock` `start/stop/restart/reload/suspend/resume/status` or use the LuCI frontend
## Installation & Usage
* Update your local opkg repository (_opkg update_)
* Install 'adblock' (_opkg install adblock_). The adblock service is enabled by default
* Install the LuCI companion package 'luci-app-adblock' (_opkg install luci-app-adblock_)
* It's strongly recommended to use the LuCI frontend to easily configure all aspects of adblock, the application is located in LuCI under the 'Services' menu
* Update from a former adblock version is easy. During the update a backup is made of the old configuration '/etc/config/adblock-backup' and replaced by the new config - that's all
#### Tweaks
* **Runtime information:** The adblock status is available via `/etc/init.d/adblock status` (see example below)
* **Debug logging:** For script debugging please set the config option `adb\_debug` to `1` and check the runtime output with `logread -e "adblock"`
* **Storage expansion:** To process and store all blocklist sources at once it might be helpful to enlarge your temp directory with a swap partition => see [OpenWrt Wiki](https://openwrt.org/docs/guide-user/storage/fstab) for further details
* **coreutils sort:** To speedup adblock processing in particular with many enabled blocklist sources it is recommended to install the additional package `coreutils-sort`
* **Add white- / blacklist entries:** Add domain black- or whitelist entries to always-deny or -allow certain (sub) domains, by default both lists are empty and located in `/etc/adblock`. Please add one domain per line - ip addresses, wildcards & regex are _not_ allowed (see example below). You need to refresh your blocklists after changes to these static lists.
* **Download queue size:** For further download & list processing performance improvements you can raise the `adb\_maxqueue` value, e.g. `8` or `16` should be safe
* **Scheduled list updates:** For a scheduled call of the adblock service add an appropriate crontab entry (see example below)
* **Change startup behaviour:** By default the startup will be triggered by the `wan` procd interface trigger. Choose `none` to disable automatic startups, `timed` to use a classic timeout (default 30 sec.) or select another trigger interface
* **Suspend & resume adblocking:** To quickly switch the adblock service `on` or `off`, simply use `/etc/init.d/adblock [suspend|resume]`
* **Domain query:** To query the active blocklist for a certain domain, please use the LuCI frontend or run _/etc/init.d/adblock query `<DOMAIN>`_ (see example below)
* **Add new list sources:** You can add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
## Adblock CLI Options
* All important adblock functions are accessible via CLI as well.
Please note: The 'status' command in 19.07.x and TurrisOS is only available via 'status_service'
<pre><code>
/etc/init.d/adblock
Syntax: /etc/init.d/adblock [command]
#### Further adblock config options
* Usually the pre-configured adblock setup works quite well and no manual overrides are needed
* The following options apply to the `global` config section:
* `adb_enabled` => Main switch to enable/disable adblock service (default: `0`, disabled)
* `adb_dns` => Select the DNS backend for your environment: `dnsmasq`, `unbound`, `named` or `kresd` (default: `dnsmasq`)
* `adb_dnsvariant` => Select the blocking variant: `nxdomain` (default, supported by all backends), `null (IPv4)` and `null (IPv4/IPv6)` both options are only supported by `dnsmasq`
* `adb_fetchutil` => Name of the used download utility: `uclient-fetch`, `wget`, `curl`, `aria2c`, `wget-nossl` or `busybox` (default: `uclient-fetch`)
* `adb_fetchparm` => Special config options for the download utility (default: not set)
* `adb_trigger` => Set the startup trigger to a certain interface, to `timed` or to `none` (default: `wan`)
* The following options apply to the `extra` config section:
* `adb_debug` => Enable/disable adblock debug output (default: `0`, disabled)
* `adb_nice` => Set the nice level of the adblock process and all sub-processes (int/default: `0`, standard priority)
* `adb_forcedns` => Force DNS requests to local resolver (bool/default: `0`, disabled)
* `adb_maxqueue` => Size of the download queue to handle downloads & list processing in parallel (int/default: `8`)
* `adb_dnsfilereset` => The final DNS blockfile will be purged after DNS backend loading to save storage space (bool/default: `false`, disabled)
* `adb_report` => Enable the background tcpdump gathering process to provide a detailed DNS Query Report (bool/default: `0`, disabled)
* `adb_repdir` => Target directory for DNS related report files generated by tcpdump (default: `/tmp`)
* `adb_backupdir` => Target directory for adblock backups (default: `/tmp`)
* `adb_mail` => Send notification emails in case of a processing errors or if the overall domain count is &le; 0 (bool/default: `0`, disabled)
* `adb_mreceiver` => Receiver address for adblock notification emails (default: not set)
* The following options could be added via "Additional Field" in LuCI and apply to the `extra` config section as well:
* `adb_dnsdir` => Target directory for the generated blocklist `adb_list.overall` (default: not set, use DNS backend default)
* `adb_dnsinstance` => set the relevant adblock enabled dnsmasq instance (int/default: '0', first dnsmasq instance)
* `adb_blacklist` => Full path to the static blacklist file (default: `/etc/adblock/adblock.blacklist`)
* `adb_whitelist` => Full path to the static whitelist file (default: `/etc/adblock/adblock.whitelist`)
* `adb_triggerdelay` => Additional trigger delay in seconds before adblock processing begins (int/default: `2`)
* `adb_maxtld` => Disable the tld compression, if the number of blocked domains is greater than this value (int/default: `100000`)
* `adb_portlist` => Space separated list of fw ports which should be redirected locally (default: `53 853 5353`)
* `adb_dnsinotify` => Disable adblock triggered restarts and the 'DNS File Reset' for DNS backends with autoload features (bool/default: `false`, disabled)
* `adb_dnsflush` => Flush DNS cache after adblock processing, i.e. enable the old restart behavior (bool/default: `0`, disabled)
* `adb_repiface` => Reporting interface used by tcpdump, set to `any` for multiple interfaces (default: `br-lan`)
* `adb_replisten` => Space separated list of reporting port(s) used by tcpdump (default: `53`)
* `adb_repchunkcnt` => Report chunk count used by tcpdump (default: `5`)
* `adb_repchunksize` => Report chunk size used by tcpdump in MB (int/default: `1`)
* `adb_msender` => Sender address for adblock notification emails (default: `no-reply@adblock`)
* `adb_mtopic` => Topic for adblock notification emails (default: `adblock notification`)
* `adb_mprofile` => Email profile used in `msmtp` for adblock notification emails (default: `adb_notify`)
* `adb_mcnt` => Raise the minimum domain count email notification trigger (int/default: `0`)
Available commands:
start Start the service
stop Stop the service
restart Restart the service
reload Reload configuration files (or restart if service does not implement reload)
enable Enable service autostart
disable Disable service autostart
running Check if service is running
status Service status
suspend Suspend adblock processing
resume Resume adblock processing
query &lt;domain&gt; Query active blocklists and backups for a specific domain
report [&lt;search&gt;] Print DNS statistics with an optional search parameter
list [[&lt;add&gt;|&lt;remove&gt;] [source(s)]] List available adblock sources or add/remove them from config
timer &lt;action&gt; &lt;hour&gt; [&lt;minute&gt;] [&lt;weekday&gt;] Set a cron based update interval
</code></pre>
#### Examples
**Change default DNS backend to `unbound`:**
## Adblock Config Options
* Usually the auto pre-configured adblock setup works quite well and no manual overrides are needed
Adblock deposits the final blocklist `adb_list.overall` in `/var/lib/unbound` where unbound can find them in its jail, no further configuration needed.
To preserve the DNS cache after adblock processing you need to install `unbound-control`.
| Option | Default | Description/Valid Values |
| :---------------- | :------------------------ | :--------------------------------------------------------------------------------------------- |
| adb_enabled | 1, enabled | set to 0 to disable the adblock service |
| adb_dns | -, auto-detected | 'dnsmasq', 'unbound', 'named', 'kresd' or 'raw' |
| adb_dnsdir | -, auto-detected | path for the generated blocklist file 'adb_list.overall' |
| adb_fetchutil | -, auto-detected | 'uclient-fetch', 'wget', 'curl' or 'aria2c' |
| adb_fetchparm | -, auto-detected | special config options for the selected download utility |
| adb_trigger | -, not set | trigger network interface or 'not set' to use a time-based startup |
| adb_triggerdelay | 2 | additional trigger delay in seconds before adblock processing begins |
| adb_debug | 0, disabled | set to 1 to enable the debug output |
| adb_nice | 0, standard prio. | valid nice level range 0-19 of the adblock processes |
| adb_forcedns | 0, disabled | set to 1 to force DNS requests to the local resolver |
| adb_maxqueue | 4 | size of the download queue to handle downloads & list processing in parallel |
| adb_dnsfilereset | 0, disabled | set to 1 to purge the final DNS blocklist file after DNS backend loading |
| adb_dnsflush | 0, disabled | set to 1 to flush the DNS Cache before & after adblock processing |
| adb_dnsinotify | -, not set | set to 1 to prevent adblock triggered restarts for DNS backends with autoload functions |
| adb_dnsallow | -, not set | set to 1 to disable selective DNS whitelisting (RPZ pass through) |
| adb_dnstimeout | 10 | timeout in seconds to wait for a successful DNS backend restart |
| adb_lookupdomain | example.com | external domain to check for a successful DNS backend restart or 'false' to disable this check |
| adb_portlist | 53 853 5353 | space separated list of firewall ports which should be redirected locally |
| adb_report | 0, disabled | set to 1 to enable the background tcpdump gathering process for reporting |
| adb_reportdir | /tmp | path for DNS related report files |
| adb_repiface | -, auto-detected | name of the reporting interface or 'any' used by tcpdump |
| adb_replisten | 53 | space separated list of reporting port(s) used by tcpdump |
| adb_repchunkcnt | 5 | report chunk count used by tcpdump |
| adb_repchunksize | 1 | report chunk size used by tcpdump in MB |
| adb_backup | 1, enabled | set to 0 to disable the backup function |
| 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_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 |
| adb_mailsender | no-reply@adblock | sender address for adblock notification E-Mails |
| adb_mailtopic | adblock&nbsp;notification | topic for adblock notification E-Mails |
| adb_mailprofile | adb_notify | mail profile used in 'msmtp' for adblock notification E-Mails |
| adb_mailcnt | 0 | minimum domain count to trigger E-Mail notifications |
| adb_jail | 0 | set to 1 to enable the additional, restrictive 'adb_list.jail' creation |
| adb_jaildir | /tmp | path for the generated jail list |
**Change default DNS backend to `named` (bind):**
## Examples
**Change the DNS backend to 'unbound':**
No further configuration is needed, adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/unbound' by default.
Adblock deposits the final blocklist `adb_list.overall` in `/var/lib/bind`.
To preserve the DNS cache after adblock processing you need to install & configure `bind-rdnc`.
To use the blocklist please modify `/etc/bind/named.conf`:
* In the `options` namespace add:
```
**Change the DNS backend to 'named' (bind):**
Adblock deposits the final blocklist 'adb_list.overall' in '/var/lib/bind'.
To preserve the DNS cache after adblock processing you need to install & configure 'bind-rdnc'.
To use the blocklist please modify '/etc/bind/named.conf':
<pre><code>
in the 'options' namespace add:
response-policy { zone "rpz"; };
```
* And at the end of the file add:
```
and at the end of the file add:
zone "rpz" {
type master;
file "/var/lib/bind/adb_list.overall";
allow-query { none; };
allow-transfer { none; };
};
```
**Change default DNS backend to `kresd`:**
</code></pre>
The knot-resolver (kresd) is only available on Turris Omnia devices.
Adblock deposits the final blocklist `adb_list.overall` in `/etc/kresd`, no further configuration needed.
**Enable email notification via msmtp:**
**Change the DNS backend to 'kresd':**
Adblock deposits the final blocklist 'adb_list.overall' in '/etc/kresd', no further configuration needed.
Please note: The knot-resolver (kresd) is only available on Turris devices and does not support the SafeSearch functionality yet.
To use the email notification you have to install & configure the package `msmtp`.
Modify the file `/etc/msmtprc`:
```
**Enable E-Mail notification via 'msmtp':**
To use the email notification you have to install & configure the package 'msmtp'.
Modify the file '/etc/msmtprc':
<pre><code>
[...]
defaults
auth on
@ -212,157 +209,68 @@ port 587
from dev.adblock@gmail.com
user dev.adblock
password xxx
```
Finally enable email support and add a valid email address in LuCI.
**Receive adblock runtime information:**
</code></pre>
Finally enable E-Mail support and add a valid E-Mail receiver address in LuCI.
```
/etc/init.d/adblock status
**Service status output:**
In LuCI you'll see the realtime status in the 'Runtime' section on the overview page.
To get the status in the CLI, just call _/etc/init.d/adblock status_ or _/etc/init.d/adblock status\_service_ (in 19.07 and TurrisOS):
<pre><code>
/etc/init.d/adblock status_service
::: adblock runtime information
+ adblock_status : enabled
+ adblock_version : 3.8.0
+ overall_domains : 48359
+ fetch_utility : /bin/uclient-fetch (libustream-ssl)
+ dns_backend : dnsmasq, /tmp
+ dns_variant : null (IPv4/IPv6), true
+ backup_dir : /mnt/data/adblock
+ last_rundate : 15.08.2019 08:43:16
+ system_release : GL.iNet GL-AR750S, OpenWrt SNAPSHOT r10720-ccb4b96b8a
```
**Receive adblock DNS Query Report information:**
```
/etc/init.d/adblock report
:::
::: Adblock DNS-Query Report
:::
+ Start ::: 2018-12-19, 16:29:40
+ End ::: 2018-12-19, 16:45:08
+ Total ::: 42
+ Blocked ::: 17 (40.48 %)
:::
::: Top 10 Clients
+ 32 ::: 101.167.1.103
+ 10 ::: abc1:abc1:abc0:0:abc1:abcb:abc5:abc3
:::
::: Top 10 Domains
+ 7 ::: dns.msftncsi.com
+ 4 ::: forum.openwrt.org
+ 2 ::: outlook.office365.com
+ 1 ::: www.google.com
+ 1 ::: www.deepl.com
+ 1 ::: safebrowsing.googleapis.com
+ 1 ::: play.googleapis.com
+ 1 ::: odc.officeapps.live.com
+ 1 ::: login.microsoftonline.com
+ 1 ::: test-my.sharepoint.com
:::
::: Top 10 Blocked Domains
+ 4 ::: nexus.officeapps.live.com
+ 4 ::: mobile.pipe.aria.microsoft.com
+ 3 ::: watson.telemetry.microsoft.com
+ 2 ::: v10.events.data.microsoft.com
+ 2 ::: settings-win.data.microsoft.com
+ 2 ::: nexusrules.officeapps.live.com
[...]
```
**Cronjob for regular block list updates (`/etc/crontabs/root`):**
The following command as a cron job updates each individual block list from their source so that they hold the most current domains to block:
```
0 06 * * * /etc/init.d/adblock reload
```
**Blacklist entry (`/etc/adblock/adblock.blacklist`):**
+ adblock_version : 4.0.0
+ blocked_domains : 52420
+ active_sources : adaway adguard andryou bitcoin disconnect winspy yoyo
+ dns_backend : kresd, /etc/kresd
+ run_utils : /usr/bin/curl, /bin/awk
+ run_ifaces : trigger: trm_wwan, report: br-lan
+ run_directories : base: /tmp, backup: /tmp, report: /tmp, jail: /tmp
+ run_flags : backup: 1, reset: 0, flush: 0, force: 1, search: 0, report: 1, mail: 0, jail: 0
+ last_run : start, 0m 17s, 496/198/218, 27.03.2020 08:55:14
+ system : CZ.NIC Turris Mox Board, TurrisOS 5.1.0 81264ebb51991aa2d17489852854e3b5ec3f514d
</code></pre>
The 'last\_run' line includes the used start type, the duration of the last run, the memory footprint after DNS backend loading (total/free/available) and the date/time of the last run.
```
ads.example.com
This entry blocks the following (sub)domains:
http://ads.example.com/foo.gif
http://server1.ads.example.com/foo.gif
https://ads.example.com:8000/
This entry does not block:
http://ads.example.com.ua/foo.gif
http://example.com/
```
**Whitelist entry (`/etc/adblock/adblock.whitelist`):**
```
here.com
This entry removes the following (sub)domains from the blocklist:
maps.here.com
here.com
This entry does not remove:
where.com
www.adwhere.com
```
**Query the active blocklist, the backups and black-/whitelist for a certain (sub-)domain, e.g. for whitelisting:**
The query function checks against the submitted (sub-)domain and recurses automatically to the upper top level domain. For every (sub-)domain it returns the first ten relevant results.
```
/etc/init.d/adblock query google.com
:::
::: results for domain 'google.com' in active blocklist
**Edit, add new adblock sources:**
The adblock blocklist sources are stored in an external, compressed JSON file '/etc/adblock/adblock.sources.gz'.
This file is directly parsed in LuCI and accessible via CLI, just call _/etc/init.d/adblock list_:
<pre><code>
/etc/init.d/adblock list
::: Available adblock sources
:::
+ adservice.google.com
+ adservice.google.com.au
+ adservice.google.com.vn
+ adservices.google.com
+ analytics.google.com
+ googleadapis.l.google.com
+ pagead.l.google.com
+ partnerad.l.google.com
+ ssl-google-analytics.l.google.com
+ video-stats.video.google.com
+ [...]
:::
::: results for domain 'google.com' in backups and black-/whitelist
:::
+ adb_list.adguard.gz partnerad.l.google.com
+ adb_list.adguard.gz googleadapis.l.google.com
+ adb_list.adguard.gz ssl-google-analytics.l.google.com
+ adb_list.adguard.gz [...]
+ adb_list.disconnect.gz pagead.l.google.com
+ adb_list.disconnect.gz partnerad.l.google.com
+ adb_list.disconnect.gz video-stats.video.google.com
+ adb_list.disconnect.gz [...]
+ adb_list.whocares.gz video-stats.video.google.com
+ adb_list.whocares.gz adservice.google.com
+ adb_list.whocares.gz adservice.google.com.au
+ adb_list.whocares.gz [...]
+ adb_list.yoyo.gz adservice.google.com
+ adb_list.yoyo.gz analytics.google.com
+ adb_list.yoyo.gz pagead.l.google.com
+ adb_list.yoyo.gz [...]
```
**Add a new blocklist source:**
1. The easy way ...
Example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt
Adblock already supports an easylist source, called 'reg_ru'. To add the additional local easylist as a new source, copy the existing config source section and change only the source name, the url and the description - that's all!
```
config source 'reg_ro'
option enabled '0'
option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
```
Name Enabled Size Focus Info URL
------------------------------------------------------------------
+ adaway x S mobile https://adaway.org
+ adguard x L general https://adguard.com
+ andryou x L compilation https://gitlab.com/andryou/block/-/blob/master/readme.md
+ bitcoin x S mining https://github.com/hoshsadiq/adblock-nocoin-list
+ disconnect x S general https://disconnect.me
+ dshield XL general https://www.dshield.org
[...]
+ winhelp S general http://winhelp2002.mvps.org
+ winspy x S win_telemetry https://github.com/crazy-max/WindowsSpyBlocker
+ yoyo x S general https://pgl.yoyo.org
</code></pre>
2. A bit harder ...
To add a really new source with different domain/host format you have to write a suitable awk one-liner on your own, so basic awk skills are needed. As a starting point check the already existing awk rulesets `adb_src_rset` in the config file, probably you need only small changes for your individual list. Download the desired list and test your new awk string locally. The output result should be a sequential list with one domain/host per line - nothing more. If your awk one-liner works quite well, add a new source section to the adblock config file and test the new source.
To add new or edit existing sources extract the compressed JSON file _gunzip /etc/adblock/adblock.sources.gz_.
A valid JSON source object contains the following required information, e.g.:
<pre><code>
[...]
"adaway": {
"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"focus": "mobile",
"descurl": "https://github.com/AdAway/adaway.github.io"
},
[...]
</code></pre>
Add an unique object name, make the required changes to 'url', 'rule', 'size' and 'descurl' and finally compress the changed JSON file _gzip /etc/adblock/adblock.sources.gz_ to use the new source object in adblock.
## Support
Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by email <dev@brenken.org>
Please join the adblock discussion in this [forum thread](https://forum.openwrt.org/t/adblock-support-thread/507) or contact me by mail <dev@brenken.org>
Have fun!
Dirk
Dirk

+ 9
- 169
net/adblock/files/adblock.conf View File

@ -1,175 +1,15 @@
config adblock 'global'
option adb_basever '3.8'
option adb_enabled '0'
option adb_dns 'dnsmasq'
option adb_dnsvariant 'nxdomain'
option adb_fetchutil 'uclient-fetch'
option adb_trigger 'wan'
config adblock 'extra'
option adb_enabled '1'
option adb_debug '0'
option adb_forcedns '0'
option adb_safesearch '0'
option adb_dnsfilereset '0'
option adb_mail '0'
option adb_report '0'
option adb_backup '1'
option adb_maxqueue '4'
config source 'adaway'
option adb_src 'https://adaway.org/hosts.txt'
option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on mobile ads, infrequent updates, approx. 400 entries'
option enabled '1'
config source 'adguard'
option adb_src 'https://filters.adtidy.org/windows/filters/15.txt'
option adb_src_rset 'BEGIN{FS=\"[/|^|\r]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+[\/\^\r]+$/{print tolower(\$3)}'
option adb_src_desc 'combined adguard dns filter list, frequent updates, approx. 17.000 entries'
option enabled '0'
config source 'bitcoin'
option adb_src 'https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt'
option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on malicious bitcoin mining sites, infrequent updates, approx. 80 entries'
option enabled '0'
config source 'disconnect'
option adb_src 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'mozilla driven blocklist, numerous updates on the same day, approx. 4.700 entries'
option enabled '1'
config source 'dshield'
option adb_src 'https://www.dshield.org/feeds/suspiciousdomains_Low.txt'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, daily updates, approx. 3.500 entries'
option enabled '0'
config source 'hphosts'
option adb_src 'https://hosts-file.net/ad_servers.txt'
option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|\$)+/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, monthly updates, approx. 19.200 entries'
option enabled '0'
config source 'malware'
option adb_src 'https://mirror.espoch.edu.ec/malwaredomains/justdomains'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'broad blocklist, daily updates, approx. 18.300 entries'
option enabled '0'
config source 'malwarelist'
option adb_src 'http://www.malwaredomainlist.com/hostslist/hosts.txt'
option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on malware, daily updates, approx. 1.200 entries'
option enabled '0'
config source 'notracking'
option adb_src 'https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'notrack domains, daily updates, approx. 60.000 entries'
option enabled '0'
config source 'openphish'
option adb_src 'https://openphish.com/feed.txt'
option adb_src_rset 'BEGIN{FS=\"/\"}/^http[s]?:\/\/([[:alnum:]_-]+\.)+[[:alpha:]]+(\/|$)/{print tolower(\$3)}'
option adb_src_desc 'focus on phishing, numerous updates on the same day, approx. 2.400 entries'
option enabled '0'
config source 'reg_cn'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on chinese ads plus generic easylist additions, daily updates, approx. 11.700 entries'
option enabled '0'
config source 'reg_de'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on german ads plus generic easylist additions, daily updates, approx. 9.200 entries'
option enabled '0'
config source 'reg_id'
option adb_src 'https://easylist-downloads.adblockplus.org/abpindo+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on indonesian ads plus generic easylist additions, weekly updates, approx. 9.600 entries'
option enabled '0'
config source 'reg_nl'
option adb_src 'https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on dutch ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
option enabled '0'
config source 'reg_pl'
option adb_src 'http://adblocklist.org/adblock-pxf-polish.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on polish ads, daily updates, approx. 90 entries'
option enabled '0'
config source 'reg_ro'
option adb_src 'https://easylist-downloads.adblockplus.org/rolist+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on romanian ads plus generic easylist additions, weekly updates, approx. 9.400 entries'
option enabled '0'
config source 'reg_ru'
option adb_src 'https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt'
option adb_src_rset 'BEGIN{FS=\"[|^]\"}/^\|\|([[:alnum:]_-]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}'
option adb_src_desc 'focus on russian ads plus generic easylist additions, weekly updates, approx. 14.500 entries'
option enabled '0'
config source 'shalla'
option adb_src 'http://www.shallalist.de/Downloads/shallalist.tar.gz'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check http://www.shallalist.de/categories.html for more categories'
list adb_src_cat 'adv'
list adb_src_cat 'costtraps'
list adb_src_cat 'spyware'
list adb_src_cat 'tracker'
list adb_src_cat 'warez'
option enabled '0'
config source 'spam404'
option adb_src 'https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)+/{print tolower(\$1)}'
option adb_src_desc 'generic blocklist, infrequent updates, approx. 6.000 entries'
option enabled '0'
config source 'sysctl'
option adb_src 'http://sysctl.org/cameleon/hosts'
option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, weekly updates, approx. 16.500 entries'
option enabled '0'
config source 'ut_capitole'
option adb_src 'https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'huge blocklist archive subdivided in different categories, daily updates. Check https://dsi.ut-capitole.fr/blacklists/index_en.php for more categories'
list adb_src_cat 'publicite'
list adb_src_cat 'cryptojacking'
list adb_src_cat 'ddos'
list adb_src_cat 'malware'
list adb_src_cat 'phishing'
list adb_src_cat 'warez'
option enabled '0'
config source 'whocares'
option adb_src 'https://someonewhocares.org/hosts/hosts'
option adb_src_rset '/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, weekly updates, approx. 10.000 entries'
option enabled '0'
config source 'winspy'
option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt'
option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 300 entries'
option enabled '0'
config source 'winhelp'
option adb_src 'http://winhelp2002.mvps.org/hosts.txt'
option adb_src_rset '/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}'
option adb_src_desc 'broad blocklist, infrequent updates, approx. 13.000 entries'
option enabled '0'
config source 'yoyo'
option adb_src 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext'
option adb_src_rset '/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'focus on ad related domains, weekly updates, approx. 2.400 entries'
option enabled '1'
list adb_sources 'adaway'
list adb_sources 'adguard'
list adb_sources 'disconnect'
list adb_sources 'yoyo'

+ 145
- 30
net/adblock/files/adblock.init View File

@ -1,14 +1,17 @@
#!/bin/sh /etc/rc.common
#
# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
START=30
USE_PROCD=1
EXTRA_COMMANDS="suspend resume query report"
EXTRA_COMMANDS="suspend resume query report list timer status_service"
EXTRA_HELP=" suspend Suspend adblock processing
resume Resume adblock processing
query <DOMAIN> Query active blocklists for specific domains
report <SEARCH> Print dns query statistics with an optional search parameter"
query <domain> Query active blocklists and backups for a specific domain
report [<search>] Print DNS statistics with an optional search parameter
list [[<add>|<remove>] [source(s)]] List available adblock sources or add/remove them from config
timer <action> <hour> [<minute>] [<weekday>] Set a cron based update interval"
adb_init="/etc/init.d/adblock"
adb_script="/usr/bin/adblock.sh"
@ -16,7 +19,8 @@ adb_pidfile="/var/run/adblock.pid"
if [ -s "${adb_pidfile}" ] && { [ "${action}" = "start" ] || [ "${action}" = "stop" ] || \
[ "${action}" = "restart" ] || [ "${action}" = "reload" ] || [ "${action}" = "report" ] || \
[ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ]; }
[ "${action}" = "suspend" ] || [ "${action}" = "resume" ] || [ "${action}" = "query" ] || \
{ [ "${action}" = "list" ] && [ -n "${1}" ]; }; }
then
exit 0
fi
@ -33,7 +37,7 @@ start_service()
then
if [ "${action}" = "boot" ]
then
if [ "$(uci_get adblock global adb_trigger)" != "timed" ]
if [ -n "$(uci_get adblock global adb_trigger)" ]
then
return 0
fi
@ -41,7 +45,7 @@ start_service()
procd_open_instance "adblock"
procd_set_param command "${adb_script}" "${@}"
procd_set_param pidfile "${adb_pidfile}"
procd_set_param nice "$(uci_get adblock extra adb_nice "0")"
procd_set_param nice "$(uci_get adblock global adb_nice "0")"
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
@ -80,14 +84,101 @@ query()
report()
{
rc_procd "${adb_script}" report "${1:-"+"}" "${2:-"50"}" "${3:-"false"}" "${4:-"true"}"
rc_procd "${adb_script}" report "${1:-"+"}" "${2:-"50"}" "${3:-"true"}" "${4:-"cli"}"
}
list()
{
local src_archive src_file src_enabled enabled name action="${1}"
if [ "${action}" = "add" ] || [ "${action}" = "remove" ]
then
shift
for name in "${@}"
do
if [ "${action}" = "add" ]
then
if [ -z "$(uci_get adblock global adb_sources | grep -Fo "${name}")" ]
then
uci_add_list adblock global adb_sources "${name}"
printf "%s\\n" "::: adblock source '${name}' added to config"
fi
else
if [ -n "$(uci_get adblock global adb_sources | grep -Fo "${name}")" ]
then
uci_remove_list adblock global adb_sources "${name}"
printf "%s\\n" "::: adblock source '${name}' removed from config"
fi
fi
done
if [ -n "$(uci -q changes adblock)" ]
then
uci_commit adblock
fi
else
src_archive="$(uci_get adblock global adb_srcarc "/etc/adblock/adblock.sources.gz")"
src_file="$(uci_get adblock global adb_srcfile "/tmp/adb_sources.json")"
src_enabled="$(uci -q show adblock.global.adb_sources)"
if [ -r "${src_archive}" ]
then
zcat "${src_archive}" > "${src_file}"
else
printf "%s\\n" "::: adblock source archive '${src_archive}' not found"
fi
if [ -r "${src_file}" ]
then
src_enabled="${src_enabled#*=}"
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" " ------------------------------------------------------------------"
json_load_file "${src_file}"
json_get_keys keylist
for key in ${keylist}
do
json_select "${key}"
json_get_var size "size"
json_get_var focus "focus"
json_get_var descurl "descurl"
json_get_var url "url"
json_get_var rule "rule"
if [ -n "${url}" ] && [ -n "${rule}" ]
then
if [ -n "$(printf "%s" "${src_enabled}" | grep -Fo "${key}")" ]
then
enabled="x"
else
enabled=" "
fi
src_enabled="${src_enabled/${key}}"
printf " + %-21s%-10s%-7s%-20s%s\\n" "${key}" "${enabled}" "${size}" "${focus}" "${descurl}"
else
src_enabled="${src_enabled} ${key}"
fi
json_select ..
done
if [ -n "${src_enabled// }" ]
then
printf "%s\\n" " ----------------------------------------------"
printf "%s\\n" " Sources without valid configuration"
printf "%s\\n" " ----------------------------------------------"
for key in ${src_enabled}
do
printf " - %s\\n" "${key}"
done
fi
else
printf "%s\\n" "::: adblock source file '${src_file}' not found"
fi
fi
}
status_service()
{
local key keylist value
local rtfile="$(uci_get adblock extra adb_rtfile "/tmp/adb_runtime.json")"
local key keylist value rtfile
rtfile="$(uci_get adblock global adb_rtfile "/tmp/adb_runtime.json")"
if [ -s "${rtfile}" ]
then
printf "%s\\n" "::: adblock runtime information"
@ -97,38 +188,62 @@ status_service()
for key in ${keylist}
do
json_get_var value "${key}"
printf " + %-15s : %s\\n" "${key}" "${value}"
if [ "${key}" = "active_sources" ]
then
printf " + %-15s : " "${key}"
json_select "${key}"
index=1
while json_get_type status "${index}" && [ "${status}" = "object" ]
do
json_get_values source "${index}"
printf "%s " "${source}"
index=$((index+1))
done
printf "\\n"
json_select ".."
else
printf " + %-15s : %s\\n" "${key}" "${value}"
fi
done
else
printf "%s\\n" "::: no adblock runtime information available"
fi
}
service_triggers()
timer()
{
local trigger trigger_list="$(uci_get adblock global adb_trigger)"
local delay="$(uci_get adblock extra adb_triggerdelay "2")"
local type="$(uci_get adblock extra adb_starttype "start")"
local action="${1}" hour="${2}" minute="${3:-0}" weekday="${4:-"*"}"
PROCD_RELOAD_DELAY=$((delay*1000))
if [ -z "${trigger_list}" ] && [ -r "/lib/functions/network.sh" ]
hour="${hour//[[:alpha:]]/}"
minute="${minute//[[:alpha:]]/}"
if [ -n "${action}" ] && [ -n "${hour}" ] && [ -n "${minute}" ] && [ -n "${weekday}" ] && \
[ "${hour}" -ge 0 ] && [ "${hour}" -le 23 ] && \
[ "${minute}" -ge 0 ] && [ "${minute}" -le 59 ]
then
. "/lib/functions/network.sh"
network_find_wan trigger_list
if [ -r "/etc/crontabs/root" ]
then
search="${adb_init//\//\\/}"
search="${search//./\\.}"
sed -i "/${search}/d" "/etc/crontabs/root"
fi
printf "%02d %02d %s\\n" "${minute}" "${hour}" "* * ${weekday} ${adb_init} ${action}" >> "/etc/crontabs/root"
/etc/init.d/cron restart
else
printf "%s\\n" "::: the refresh timer could not been updated"
fi
}
if [ -n "${trigger_list}" ]
service_triggers()
{
local trigger delay type
PROCD_RELOAD_DELAY=$((delay*1000))
trigger="$(uci_get adblock global adb_trigger)"
delay="$(uci_get adblock global adb_triggerdelay "2")"
type="$(uci_get adblock global adb_starttype "start")"
if [ -n "${trigger}" ]
then
for trigger in ${trigger_list}
do
if [ "${trigger}" != "none" ] && [ "${trigger}" != "timed" ]
then
procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" "${type}"
fi
done
else
procd_add_raw_trigger "interface.*.up" ${PROCD_RELOAD_DELAY} "${adb_init}" "${type}"
procd_add_interface_trigger "interface.*.up" "${trigger}" "${adb_init}" "${type}"
fi
procd_add_reload_trigger "adblock"
}

+ 19
- 21
net/adblock/files/adblock.mail View File

@ -1,11 +1,9 @@
#!/bin/sh
# send mail script for adblock notifications
# written by Dirk Brenken (dev@brenken.org)
# Please note: you have to manually install and configure the package 'msmtp' before using this script
# Copyright (c) 2015-2020 Dirk Brenken (dev@brenken.org)
# This is free software, licensed under the GNU General Public License v3.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Please note: you have to manually install and configure the package 'msmtp' before using this script
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
@ -13,11 +11,11 @@ PATH="/usr/sbin:/usr/bin:/sbin:/bin"
if [ -r "/lib/functions.sh" ]
then
. "/lib/functions.sh"
adb_debug="$(uci_get adblock extra adb_debug "0")"
adb_msender="$(uci_get adblock extra adb_msender "no-reply@adblock")"
adb_mreceiver="$(uci_get adblock extra adb_mreceiver)"
adb_mtopic="$(uci_get adblock extra adb_mtopic "adblock notification")"
adb_mprofile="$(uci_get adblock extra adb_mprofile "adb_notify")"
adb_debug="$(uci_get adblock global adb_debug "0")"
adb_mailsender="$(uci_get adblock global adb_mailsender "no-reply@adblock")"
adb_mailreceiver="$(uci_get adblock global adb_mailreceiver)"
adb_mailtopic="$(uci_get adblock global adb_mailtopic "adblock notification")"
adb_mailprofile="$(uci_get adblock global adb_mailprofile "adb_notify")"
fi
adb_ver="${1}"
adb_mail="$(command -v msmtp)"
@ -37,9 +35,9 @@ f_log()
fi
}
if [ -z "${adb_mreceiver}" ]
if [ -z "${adb_mailreceiver}" ]
then
f_log "err" "please set the mail receiver with the 'adb_mreceiver' option"
f_log "err" "please set the mail receiver with the 'adb_mailreceiver' option"
exit ${adb_rc}
fi
@ -48,7 +46,7 @@ then
debug="--debug"
fi
adb_mhead="From: ${adb_msender}\\nTo: ${adb_mreceiver}\\nSubject: ${adb_mtopic}\\nReply-to: ${adb_msender}\\nMime-Version: 1.0\\nContent-Type: text/html\\nContent-Disposition: inline\\n\\n"
adb_mailhead="From: ${adb_mailsender}\\nTo: ${adb_mailreceiver}\\nSubject: ${adb_mailtopic}\\nReply-to: ${adb_mailsender}\\nMime-Version: 1.0\\nContent-Type: text/html\\nContent-Disposition: inline\\n\\n"
# info preparation
#
@ -64,19 +62,19 @@ fi
# mail body
#
adb_mtext="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
adb_mtext="${adb_mtext}\\n<strong>++\\n++ System Information ++\\n++</strong>\\n${sys_info}"
adb_mtext="${adb_mtext}\\n\\n<strong>++\\n++ Adblock Information ++\\n++</strong>\\n${adb_info}"
adb_mtext="${adb_mtext}\\n\\n<strong>++\\n++ Logfile Information ++\\n++</strong>\\n${log_info}"
adb_mtext="${adb_mtext}</pre></body></html>"
adb_mailtext="<html><body><pre style='display:block;font-family:monospace;font-size:1rem;padding:20;background-color:#f3eee5;white-space:pre'>"
adb_mailtext="${adb_mailtext}\\n<strong>++\\n++ System Information ++\\n++</strong>\\n${sys_info}"
adb_mailtext="${adb_mailtext}\\n\\n<strong>++\\n++ Adblock Information ++\\n++</strong>\\n${adb_info}"
adb_mailtext="${adb_mailtext}\\n\\n<strong>++\\n++ Logfile Information ++\\n++</strong>\\n${log_info}"
adb_mailtext="${adb_mailtext}</pre></body></html>"
# send mail
#
if [ -x "${adb_mail}" ] && [ -n "${adb_mreceiver}" ]
if [ -x "${adb_mail}" ]
then
printf "%b" "${adb_mhead}${adb_mtext}" 2>/dev/null | "${adb_mail}" ${debug} -a "${adb_mprofile}" "${adb_mreceiver}" >/dev/null 2>&1
printf "%b" "${adb_mailhead}${adb_mailtext}" 2>/dev/null | "${adb_mail}" ${debug} -a "${adb_mailprofile}" "${adb_mailreceiver}" >/dev/null 2>&1
adb_rc=${?}
f_log "info" "mail sent to '${adb_mreceiver}' with rc '${adb_rc}'"
f_log "info" "mail sent to '${adb_mailreceiver}' with rc '${adb_rc}'"
else
f_log "err" "msmtp mail daemon not found"
fi


net/adblock/files/adblock.service → net/adblock/files/adblock.monitor View File


+ 903
- 634
net/adblock/files/adblock.sh
File diff suppressed because it is too large
View File


+ 280
- 0
net/adblock/files/adblock.sources View File

@ -0,0 +1,280 @@
{
"adaway": {
"url": "https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"focus": "mobile",
"descurl": "https://github.com/AdAway/adaway.github.io"
},
"adguard": {
"url": "https://filters.adtidy.org/windows/filters/15.txt",
"rule": "BEGIN{FS=\"[\/|^|\\r]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+[\\/\\^\\r]+$/{print tolower($3)}",
"size": "L",
"focus": "general",
"descurl": "https://adguard.com"
},
"andryou": {
"url": "https://gitlab.com/andryou/block/raw/master/kouhai-compressed-domains",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "L",
"focus": "compilation",
"descurl": "https://gitlab.com/andryou/block/-/blob/master/readme.md"
},
"bitcoin": {
"url": "https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"focus": "mining",
"descurl": "https://github.com/hoshsadiq/adblock-nocoin-list"
},
"disconnect": {
"url": "https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "S",
"focus": "general",
"descurl": "https://disconnect.me"
},
"dshield": {
"url": "https://www.dshield.org/feeds/suspiciousdomains_Low.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "general",
"descurl": "https://www.dshield.org"
},
"energized_blugo": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/bluGo/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "compilation",
"descurl": "https://github.com/EnergizedProtection/block"
},
"energized_blu": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/blu/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "compilation",
"descurl": "https://github.com/EnergizedProtection/block"
},
"energized_porn": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/porn/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "compilation+porn",
"descurl": "https://github.com/EnergizedProtection/block"
},
"energized_unified": {
"url": "https://raw.githubusercontent.com/EnergizedProtection/block/master/unified/formats/domains.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "compilation",
"descurl": "https://github.com/EnergizedProtection/block"
},
"hphosts": {
"url": "https://hosts-file.net/ad_servers.txt",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "M",
"focus": "general",
"descurl": "https://hosts-file.net"
},
"malwaredomains": {
"url": "http://mirror.espoch.edu.ec/malwaredomains/justdomains",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "M",
"focus": "malware",
"descurl": "https://www.malwaredomains.com"
},
"malwarelist": {
"url": "https://www.malwaredomainlist.com/hostslist/hosts.txt",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"focus": "malware",
"descurl": "https://www.malwaredomainlist.com"
},
"notracking": {
"url": "https://raw.githubusercontent.com/notracking/hosts-blocklists/master/dnscrypt-proxy/dnscrypt-proxy.blacklist.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XL",
"focus": "tracking",
"descurl": "https://github.com/notracking/hosts-blocklists"
},
"oisd_nl": {
"url": "https://dbl.oisd.nl",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "XXL",
"focus": "general",
"descurl": "https://oisd.nl"
},
"openphish": {
"url": "https://openphish.com/feed.txt",
"rule": "BEGIN{FS=\"\/\"}/^http[s]?:\\/\\/([[:alnum:]_-]+\\.)+[[:alpha:]]+(\\/|$)/{print tolower($3)}",
"size": "S",
"focus": "phishing",
"descurl": "https://openphish.com"
},
"phishing_army": {
"url": "https://phishing.army/download/phishing_army_blocklist_extended.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "S",
"focus": "phishing",
"descurl": "https://phishing.army"
},
"reg_cn": {
"url": "https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_china",
"descurl": "https://easylist.to"
},
"reg_de": {
"url": "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_germany",
"descurl": "https://easylist.to"
},
"reg_es": {
"url": "https://easylist-downloads.adblockplus.org/easylistspanish+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_spain",
"descurl": "https://easylist.to"
},
"reg_fi": {
"url": "https://raw.githubusercontent.com/finnish-easylist-addition/finnish-easylist-addition/master/Finland_adb.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"focus": "reg_finland",
"descurl": "https://github.com/finnish-easylist-addition"
},
"reg_id": {
"url": "https://easylist-downloads.adblockplus.org/abpindo+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_indonesia",
"descurl": "https://easylist.to"
},
"reg_nl": {
"url": "https://easylist-downloads.adblockplus.org/easylistdutch+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_netherlands",
"descurl": "https://easylist.to"
},
"reg_pl": {
"url": "http://adblocklist.org/adblock-pxf-polish.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "S",
"focus": "reg_poland",
"descurl": "http://adblocklist.org"
},
"reg_ro": {
"url": "https://easylist-downloads.adblockplus.org/rolist+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_romania",
"descurl": "https://easylist.to"
},
"reg_ru": {
"url": "https://easylist-downloads.adblockplus.org/ruadlist+easylist.txt",
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",
"size": "M",
"focus": "reg_russia",
"descurl": "https://easylist.to"
},
"shallalist": {
"url": "https://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"
},
"shallalist_porn": {
"url": "https://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"
},
"smarttv": {
"url": "https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "S",
"focus": "smarttv",
"descurl": "https://github.com/Perflyst/PiHoleBlocklist"
},
"spam404": {
"url": "https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "S",
"focus": "general",
"descurl": "https://github.com/Dawsey21"
},
"stevenblack": {
"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",
"focus": "compilation",
"descurl": "https://github.com/StevenBlack/hosts"
},
"sysctl": {
"url": "http://sysctl.org/cameleon/hosts",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "M",
"focus": "general",
"descurl": "http://sysctl.org/cameleon"
},
"utcapitole": {
"url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"categories": [
"publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez"
],
"size": "L",
"focus": "general",
"descurl": "https://dsi.ut-capitole.fr/blacklists/index_en.php"
},
"utcapitole_porn": {
"url": "https://dsi.ut-capitole.fr/blacklists/download/blacklists.tar.gz",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"categories": [
"adult", "publicite", "bitcoin", "cryptojacking", "ddos", "malware", "phishing", "warez"
],
"size": "XXL",
"focus": "general+porn",
"descurl": "https://dsi.ut-capitole.fr/blacklists/index_en.php"
},
"whocares": {
"url": "https://someonewhocares.org/hosts/hosts",
"rule": "/^127\\.0\\.0\\.1[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "M",
"focus": "general",
"descurl": "https://someonewhocares.org"
},
"winhelp": {
"url": "http://winhelp2002.mvps.org/hosts.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"focus": "general",
"descurl": "http://winhelp2002.mvps.org"
},
"winspy": {
"url": "https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt",
"rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
"size": "S",
"focus": "win_telemetry",
"descurl": "https://github.com/crazy-max/WindowsSpyBlocker"
},
"yoyo": {
"url": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext",
"rule": "/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
"size": "S",
"focus": "general",
"descurl": "https://pgl.yoyo.org"
}
}

Loading…
Cancel
Save