mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
simple-adblock: bugfix: proper error reporting on failed downloads; lists update script
Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
@@ -19,63 +19,70 @@ A simple DNSMASQ/Unbound-based AdBlocking service for OpenWrt/LEDE Project.
|
||||
- Blocks ads inside browsers with [DNS-over-HTTPS proxy](https://en.wikipedia.org/wiki/DNS_over_HTTPS) built-in, like [Mozilla Firefox](https://support.mozilla.org/en-US/kb/firefox-dns-over-https#w_about-dns-over-https) or [Google Chrome/Chromium](https://blog.chromium.org/2019/09/experimenting-with-same-provider-dns.html) -- with the ```dnsmasq.ipset``` option.
|
||||
- Proudly made in Canada, using locally-sourced electrons.
|
||||
|
||||
If you want a more robust AdBlocking, supporting free memory detection and complex block lists, supporting IDN, check out [net/adblock](https://github.com/openwrt/packages/tree/master/net/adblock/files).
|
||||
If you want a more robust AdBlocking, supporting free memory detection and complex block lists, supporting IDN, check out ```net/adblock``` on [GitHub](https://github.com/openwrt/packages/tree/master/net/adblock/files)/[jsDelivr](https://cdn.jsdelivr.net/gh/openwrt/packages@master/net/adblock/files/README.md).
|
||||
|
||||
## Screenshots (luci-app-simple-adblock)
|
||||
|
||||
Service Status
|
||||
|
||||

|
||||

|
||||
|
||||
Configuration - Basic Configuration
|
||||
|
||||

|
||||

|
||||
|
||||
Configuration - Advanced Configuration
|
||||
|
||||

|
||||

|
||||
|
||||
Whitelist and Blocklist Management
|
||||
|
||||

|
||||

|
||||
|
||||
## Requirements
|
||||
|
||||
This service requires the following packages to be installed on your router: ```dnsmasq``` or ```dnsmasq-full``` or ```unbound``` and either ```ca-certificates```, ```wget``` and ```libopenssl``` (for OpenWrt 15.05.1) or ```uclient-fetch``` and ```libustream-mbedtls``` (for LEDE Project and OpenWrt 18.06.xx or newer). Additionally installation of ```coreutils-sort``` is highly recommended as it speeds up blocklist processing.
|
||||
|
||||
To satisfy the requirements for connect to your router via ssh and run the following commands:
|
||||
|
||||
### How to use DNSMASQ ipset
|
||||
|
||||
The ```dnsmasq.ipset``` option requires you to install ```ipset``` and ```dnsmasq-full``` instead of the ```dnsmasq```. To do that, connect to your router via ssh and run the following command:
|
||||
To download the hosts/domains files this service requires one of the following packages to be installed on your device: ```wget``` or ```uclient-fetch``` or ```curl```. If you want to download lists over HTTPS (recommended), you also need to install support for HTTPS/SSL downloads on your device. For most devices starting with OpenWrt 15.05.1 and up the following commands will install the minimal requirements:
|
||||
|
||||
```sh
|
||||
opkg update; opkg remove dnsmasq; opkg install dnsmasq-full ipset;
|
||||
opkg update; if ubus -S call system board | grep -q '15.05'; then
|
||||
opkg install ca-certificates wget libopenssl; else
|
||||
opkg install uclient-fetch libustream-mbedtls ca-bundle ca-certificates; fi
|
||||
```
|
||||
|
||||
### OpenWrt 15.05.1 Requirements
|
||||
### Requirements for file:// Scheme
|
||||
|
||||
If you want to include some local files as the blocklists or whitelists, you need to install ```curl```:
|
||||
|
||||
```sh
|
||||
opkg update; opkg install ca-certificates wget libopenssl coreutils-sort dnsmasq
|
||||
opkg update; opkg install curl;
|
||||
```
|
||||
|
||||
### LEDE Project 17.01.x and OpenWrt 18.xx (or newer) Requirements
|
||||
### Requirements for DNS Resolver
|
||||
|
||||
In order to actually block the ads, this service requires one of the following DNS resolvers to be installed on your router: ```dnsmasq``` or ```dnsmasq-full``` or ```unbound```. The ```dnsmasq``` package is usually included in the default OpenWrt installation.
|
||||
|
||||
If you want to use the [```dnsmasq.ipset``` option](#dns-resolution-option) you need to install ```ipset``` and ```dnsmasq-full``` instead of the ```dnsmasq```. To do that, connect to your router via ssh and run the following command:
|
||||
|
||||
```sh
|
||||
opkg update; opkg install uclient-fetch libustream-mbedtls coreutils-sort dnsmasq
|
||||
opkg update; cd /tmp/; opkg download dnsmasq-full; opkg install ipset;
|
||||
opkg remove dnsmasq; opkg install /tmp/dnsmasq-full*; rm -f /tmp/dnsmasq-full*;
|
||||
```
|
||||
|
||||
### IPv6 Support
|
||||
### Requirements for IPv6 Support
|
||||
|
||||
For IPv6 support additionally install ```ip6tables-mod-nat``` and ```kmod-ipt-nat6``` packages from Web UI or run the following in the command line:
|
||||
|
||||
```sh
|
||||
opkg update; opkg install ip6tables-mod-nat kmod-ipt-nat6
|
||||
opkg update; opkg install ip6tables-mod-nat kmod-ipt-nat6;
|
||||
```
|
||||
|
||||
### Speed Up Blocklist Processing
|
||||
### Requirements for Faster Blocklist Processing
|
||||
|
||||
The ```coreutils-sort``` is an optional, but recommended package as it speeds up sorting and removing duplicates from the merged list dramatically. If opkg complains that it can't install ```coreutils-sort``` because /usr/bin/sort is already provided by busybox, you can run ```opkg --force-overwrite install coreutils-sort```.
|
||||
The ```coreutils-sort``` is an optional, but recommended package as it speeds up sorting and removing duplicates from the merged list dramatically. If opkg complains that it can't install ```coreutils-sort``` because /usr/bin/sort is already provided by busybox, you can run the following command:
|
||||
|
||||
```sh
|
||||
opkg --force-overwrite install coreutils-sort
|
||||
```
|
||||
|
||||
## Unmet Dependencies
|
||||
|
||||
@@ -89,11 +96,11 @@ Install ```simple-adblock``` and ```luci-app-simple-adblock``` packages from Web
|
||||
opkg update; opkg install simple-adblock luci-app-simple-adblock
|
||||
```
|
||||
|
||||
If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to [add a custom repo to your router](https://github.com/stangri/openwrt_packages/blob/master/README.md#on-your-router) first.
|
||||
If ```simple-adblock``` and ```luci-app-simple-adblock``` packages are not found in the official feed/repo for your version of OpenWrt/LEDE Project, you will need to add a custom repo to your router following instructions on [GitHub](https://github.com/stangri/openwrt_packages/blob/master/README.md#on-your-router)/[jsDelivr](https://cdn.jsdelivr.net/gh/stangri/openwrt_packages@master/README.md#on-your-router) first.
|
||||
|
||||
## Default Settings
|
||||
|
||||
Default configuration has service disabled (use Web UI to enable/start service or run ```uci set simple-adblock.config.enabled=1; uci commit simple-adblock;```) and selected ad/malware lists suitable for routers with 64Mb RAM.
|
||||
Default configuration has the service disabled (use Web UI to enable/start service or run ```uci set simple-adblock.config.enabled=1; uci commit simple-adblock;```) and selected ad/malware lists suitable for routers with 64Mb RAM.
|
||||
|
||||
If your router has less then 64Mb RAM, edit the configuration file, located at ```/etc/config/simple-adblock```. The configuration file has lists in ascending order starting with smallest ones and each list has a preceding comment indicating its size, comment out or delete the lists you don't want or your router can't handle.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user