adblock: release 4.5.8-1

-the trigger calls start refresh, start_service() skips the run
  while adblock_status in the runtime file is anything but error
- a missing or unreadable runtime file still starts a run,
  which covers the boot case, and a failed run is retried on the next interface event
- manual start, boot, restart and reload are unaffected;
  a suspended or stopped adblock is no longer restarted by an interface event
- wan6 in adb_trigger is supported now
- updatted the README and moved to the package root
- LuCI: reworked the feed editor, get rid of custom css

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken committed 2026-09-09 21:37:11 +02:00
1 parent 11396c3434
commit 3da7b018de
3 files changed
+19 -9

No files matched your search

+3 -3
View File
@@ -6,8 +6,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
PKG_VERSION:=4.5.7
PKG_RELEASE:=4
PKG_VERSION:=4.5.8
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0-or-later
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
@@ -24,7 +24,7 @@ endef
define Package/adblock/description
adblock blocks ad/abuse domains via dnsmasq, unbound, named, smartdns or kresd.
adblock consumes a minimum of memory, is very fast and supports many domain blocklist sites plus local block- and allowlist overrides.
Please see https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md for further information.
Please see https://github.com/openwrt/packages/blob/master/net/adblock/README.md for further information.
endef
@@ -27,7 +27,7 @@ When the DNS server on your router receives DNS requests, you will sort out quer
## Quick Start
For a typical setup these few steps are enough to get adblock up and running — see the sections below for details:
1. Install the LuCI companion package: `apk update && apk add luci-app-adblock` (this pulls in the `adblock` backend as a dependency).
2. Enable the adblock system service under `System → Startup`, then open LuCI under `Services → Adblock`, tick `Enabled` and (recommended) set a `Startup Trigger Interface` to your WAN interface (avoid IPv6/wan6).
2. Enable the adblock system service under `System → Startup`, then open LuCI under `Services → Adblock`, tick `Enabled` and (recommended) set a `Startup Trigger Interface` to your WAN interface(s).
3. Keep the small, pre-selected default feed selection to start with (e.g. `adguard`, `adguard_tracking` and `certpl`, ≈280K domains).
4. Start and verify the service:
@@ -141,7 +141,7 @@ Support of the following fully pre-configured domain blocklist feeds (free for p
* Install the LuCI companion package `luci-app-adblock` which also installs the main `adblock` package as a dependency
* Enable the adblock system service (System -> Startup) and enable adblock itself (adblock -> General Settings)
* 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
* It's also recommended to configure a `Startup Trigger Interface` to depend on your WAN ifup events during boot or restart of your router. Avoid IPv6 (wan6) interfaces here, as IPv6/netifd is chatty and would trigger frequent unnecessary adblock restarts
* It's also recommended to configure a `Startup Trigger Interface` to depend on your WAN interface events during boot or restart of your router. Listing IPv6 interfaces (wan6) is fine as well: a trigger only starts a run if the last one did not succeed, so the chatty netifd update events no longer cause repeated downloads
<a id="adblock-cli-interface"></a>
## Adblock CLI interface
@@ -185,7 +185,7 @@ The `report` sub-command accepts an output mode: `cli` (default, human-readable
| adb_fetchparm | -, auto-detected | manually override the config options for the selected download utility |
| adb_fetchretry | 5 | number of download attempts in case of an error (not supported by uclient-fetch) |
| adb_fetchinsecure | 0, disabled | don't check SSL server certificates during download |
| adb_trigger | -, not set | logical reload trigger interface(s), e.g. `wan` (avoid IPv6 interfaces) |
| adb_trigger | -, not set | logical reload trigger interface(s), e.g. `wan` and `wan6` |
| adb_triggerdelay | 5 | additional trigger delay in seconds before adblock processing begins |
| adb_debug | 0, disabled | set to 1 to enable the debug output |
| adb_nicelimit | 0, standard prio. | valid nice level range 0-19 of the adblock processes |
+13 -3
View File
@@ -17,6 +17,7 @@ adb_init="/etc/init.d/adblock"
adb_script="/usr/bin/adblock.sh"
adb_rundir="/var/run/adblock"
adb_pidfile="/var/run/adblock/adblock.pid"
adb_rtfile="/var/run/adblock/adblock.runtime.json"
if [ -z "${IPKG_INSTROOT}" ]; then
@@ -54,12 +55,21 @@ boot() {
}
start_service() {
local status
if "${adb_init}" enabled; then
if [ "${action}" = "boot" ]; then
[ -n "$(uci_get adblock global adb_trigger)" ] && return 0
fi
if [ "${1}" = "refresh" ]; then
json_init
json_load_file "${adb_rtfile}" >/dev/null 2>&1
json_get_var status "adblock_status"
[ -n "${status}" ] && [ "${status}" != "error" ] && return 0
fi
procd_open_instance "adblock"
procd_set_param command "${adb_script}" "${@:-"${action}"}"
procd_set_param command "${adb_script}" "${action}"
procd_set_param pidfile "${adb_pidfile}"
procd_set_param nice "$(uci_get adblock global adb_nicelimit "0")"
procd_set_param stdout 0
@@ -105,7 +115,7 @@ status_service() {
local key keylist type value values
json_init
json_load_file "/var/run/adblock/adblock.runtime.json" >/dev/null 2>&1
json_load_file "${adb_rtfile}" >/dev/null 2>&1
json_get_keys keylist
if [ -n "${keylist}" ]; then
printf '%s\n' "::: adblock runtime information"
@@ -133,6 +143,6 @@ service_triggers() {
PROCD_RELOAD_DELAY="$((delay * 1000))"
for iface in ${trigger}; do
procd_add_interface_trigger "interface.*.up" "${iface}" "${adb_init}" start
procd_add_interface_trigger "interface.*" "${iface}" "${adb_init}" start refresh
done
}