Commit Graph
273 Commits
Author SHA1 Message Date
Dirk Brenken a637759c3a adblock: update 4.5.8-3
* optimized the default download parameters for curl/wget
* minor cornercase fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-09-27 22:10:12 +02:00
Dirk Brenken c65b4d5ab8 adblock: update 4.5.8-2
- refine the reload trigger call logic

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-09-10 20:32:44 +02:00
Dirk Brenken 3da7b018de 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>
2026-09-09 21:37:11 +02:00
Dirk Brenken ff5519f750 adblock: replace the CARTO basemap with local outlines
CARTO now requires an API key for the raster basemaps at basemaps.cartocdn.com and watermarks every unauthenticated tile request, so the GeoIP map currently renders "API KEY REQUIRED" across the whole viewport.
Therefore in luci-app-banip the basemap is now drawn from country outlines that ship with the package: Natural Earth 1:110m, public domain, all attributes stripped, simplified to 36 kB (~10 kB in the apk).

readme changes in the base package only

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-08-27 14:00:04 +02:00
Dirk Brenken 9f8feb10a3 adblock: fix cpu core calculation
- only cap the cpu core count by available memory if it was auto-detected,
  a manually set 'adb_cores' is now authoritative and no longer lowered
- readme update: clarify that the auto-cap does not apply to a manually
  set core count

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-08-10 19:15:29 +02:00
Dirk Brenken ec4ca5c917 adblock: report the last run timestamp as ISO 8601
The runtime status reported the last run as DD/MM/YYYY, which reads as a
different date entirely for anyone used to month first ordering.

Use YYYY-MM-DD instead. The DNS report already derives its timestamps from
tcpdump -tttt and is ISO 8601, so both views now agree, and the format is
unambiguous regardless of the reader's locale.

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-08-05 18:27:10 +02:00
Dirk Brenken 7c3749d969 adblock: release 4.5.7-1
* add new 'adb_repfilter' option to pass an additional, user
  defined tcpdump filter expression which is logically ANDed
  to the internal port filter. This allows to exclude redundant
  traffic upfront, e.g. DNS requests originating from the router
  itself which are routed via a VPN client interface and which
  are picked up again when 'adb_repiface' is set to 'any';
  see the readme for details/examples.

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-08-02 20:32:12 +02:00
Dirk Brenken 0bcf4cab80 adblock: keep the GeoIP map usable without a local uplink
The map array anchor and the f_fetch call were placed inside the uplink branch, so a WAN
interface without a resolvable address left adb_map.jsn empty. That skipped the blocked domain
lookup as well and dropped the entire map, not just the local marker.

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-07-26 21:53:09 +02:00
Dirk Brenken 4f4b404b8e adblock: update 4.5.6-4
- fixed/restored the "google" branch of f_list "safesearch" ,
  reported in the forum

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-07-14 18:38:15 +02:00
Dirk Brenken f78b2f8eab adblock: update 4.5.6-3
- feeds: fixed the games_tracking feed URL
- f_etag: added housekeeping of the etag file
- f_etag: added 'last-modified' header as fallback for change detection
- small fixes & optimizations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-07-03 21:28:36 +02:00
Dirk Brenken c2a00f2db0 adblock: update 4.5.6-2
- add f_mem() helper to read MemAvailable from /proc/meminfo,
  replacing three duplicated inline reads in f_load, f_dns and f_jsnup
- cap the auto-detected CPU core count by available memory in f_load:
  adb_cores is limited to MemAvailable / 48 (MiB per job), floored to at least 1 core;
  this bounds the number of feeds processed in parallel on constrained devices,
  a user-set adb_cores is still honored as a ceiling (the cap only ever lowers it).
- derive the GNU sort buffer size from available memory
- readme update:
  - added a "low memory systems" recommendation to use
    the zram-swap package (compressed swap) with a swappiness hint,
    plus a sizing rule of thumb — this works for all DNS backends OOTB
  - significantly expanded the custom-feeds section (all JSON fields, rule parameters, etc.)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-06-22 21:06:07 +02:00
Dirk Brenken 8802f0cfa8 adblock: readme update
* just a readme update without version bump

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-06-13 16:54:53 +02:00
Dirk Brenken 3a53d9cc02 adblock: fix default values for ext. DNS resolver
- This fixes a breaking LuCI change (https://github.com/openwrt/luci/commit/974b5864e05ef30f38149389f15583c08bdd4eda)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-06-04 19:13:34 +02:00
Dirk Brenken 8ad36639f3 adblock: release 4.5.6-1
- f_etag: strip CR in ETag header extraction (gsub(/[\r"]/,…)) — fixes empty-but-present etag
- f_etag: add feed_rm mode to drop a feed's etag entries; roll back the optimistically stored etag on failed downloads
- f_list/f_main: make restore-failure feed pruning subshell-safe via per-feed marker files
- f_jsnup: remove bogus trailing commas from the active_feeds array elements
- f_fetch: validate adb_fetchretry
- f_conf: ignore empty UCI option values so they don't override sane defaults
- f_report: add jclean() to strip control/quote/backslash from untrusted client/iface/domain fields
- LuCI: fix some cornercase issues
- update readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-06-04 17:44:42 +02:00
Dirk Brenken 5e7db72445 adblock: update 4.5.5-6
- f_search: refactored backup and local block-/allowlist scan to run in parallel
- f_search: raise the search timeout in backups to max. 90 seconds
- f_load: skip f_fetch for search action, no remote download is needed for local lookups
- f_dns: skip destructive paths (file wipe, f_dnsup) for search and report actions
- LuCI: adapt search backend changes in the frontend
- LuCI: minor frontend fixes & improvements

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-05-26 17:17:25 +02:00
Dirk Brenken 4d4e34eb13 adblock: update 4.5.5-5
- f_etag performance optimization: single-pass awk consolidating count+match
- f_report: minor performance optimization
- LuCI: prevent possible report refresh timeouts

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-05-20 22:51:35 +02:00
Dirk Brenken 06363cd798 adblock: update 4.5.5-4
- gated f_load behind a ubus socket check at the end of adblock.sh
   to harden against pre-ubus invocations
- added a 'adb_bver' fallback in f_log for invocation paths without prior f_load execution
- minor code improvements and fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-05-16 22:49:56 +02:00
Dirk Brenken 3af9ba9afa adblock: update 4.5.5-3
- added 4 missing hagezi categories
- added 2 missing ipfire dbl categories
- fixed 2 stevenblack categories
- minor code improvements and fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-05-11 21:21:54 +02:00
Dirk Brenken 01fd465bf4 adblock: update 4.5.5-2
- optimized pidfile handling in the init file
- multiple allowlist tweaks
- various small cornercase fixes & improvements
- LuCI: expose new UCI options 'adb_fetchcmd' and 'adb_fetchretry'
- readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-05-03 20:02:19 +02:00
Dirk Brenken 157bd82ac0 adblock: release 4.5.5-1
* added an separate adblock rundir (/var/run/adblock)
* refine the cpu/core detection
* behaviour change: allowlist domains now also removes subdomains from the blocklist
* flock/serialize the etag writing in the f_etag function
* code clean-up/linting

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-04-17 09:57:55 +02:00
Dirk Brenken 0255308cbe adblock: update 4.5.4-3
* fixed a problem/regression with the display of results in f_search and f_report

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-04-11 10:48:53 +02:00
Dirk Brenken 4af33e05a9 adblock: update 4.5.4-2
* refine the DNS reporting filter (stricter),
  to filter out false positives

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-04-10 08:01:05 +02:00
Dirk Brenken 5116abcafa adblock: release 4.5.4-1
* fixed a parsing issue in the DNS reporting,
  see https://github.com/openwrt/packages/pull/29063 for details
* optimized the CGI/Adblock Remote Allow
* optimized the TLD function
* optimized the mail include
* removed needless forks
* various code-cleanups & small fixes
* updated the readme
* LuCI: small fixes & optimizations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-04-09 23:13:53 +02:00
Dirk Brenken 00e9d73468 adblock: update 4.5.3-4
* harden adblock backend: removed  all needless eval calls
* more fixes & optimizations
* LuCI: Allow dns instance selection for smartdns (not only for dnsmasq)
* LuCI: more fixes & optimizations
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-27 10:20:30 +01:00
Dirk Brenken 2947457420 adblock: update 4.5.3-3
* renamed f_query to f_search (Query => Search)
* add better input validation to the  f_search function,
   to compensate for the very limited Wildcard ACL mechanisms in LuCI, see
   https://github.com/openwrt/luci/issues/8435 for reference
* LuCI: add a proper poll mechanism to mitigate Reporting timeouts
  on "Search" and "Refresh", even with big  pcap files
* LuCI: Refine some ACLs
* LuCI: more fixes & optimizations
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-22 19:55:08 +01:00
Dirk Brenken 27c44bf735 adblock: release 4.5.3-1
* refine the domain validator regarding prefix handling, esp.
  relevant for ABP-syntax
* adapted the adguard feed to make use of the new prefix handling
* LuCI: various fixes & optimizations

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-15 19:17:34 +01:00
Dirk Brenken 2657120d5f adblock: update 4.5.2‑4
* optimized the awk for the Top10 statistics in the DNS Report,
  removed the faulty caching (reported in the forum)
* minor improvement in the f_switch function
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-12 20:39:20 +01:00
Dirk Brenken 5a495b2240 adblock: update 4.5.2‑3
* the suspend/resume function now uses the external
   DNS bridge when this function is used
* refine the f_nftadd function
* more file debug logging
* LuCI: add unfiltered DNS-Server to the DNS bridge selection
* LuCI: minor fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-08 18:54:23 +01:00
Dirk Brenken 57ec85084c adblock: update 4.5.2‑2
* fixed the debug errorfile handling
* fixed a typo in the nftadd function
* minor cornercase improvements
* LuCI: minor cleanups & fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-05 21:04:07 +01:00
Dirk Brenken d4a62496f9 adblock: release 4.5.2‑1
* added a new firewall feature: the DNS‑Bridge.
  This temporary DNS bridge ensures that an external fallback DNS server
  is automatically used during local DNS restarts, providing Zero‑Downtime DNS resolution.
* The debug mode now captures internal error output in a dedicated log file,
  located by default in the adblock base directory as /tmp/adb_error.log.
* LuCI: exposed the previously missing adb_cores option (auto‑detected by default).
* LuCI: added support for the new DNS‑Bridge options (Zero‑Downtime during DNS restarts).

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-03-01 06:53:25 +01:00
Dirk Brenken 19f9f78614 adblock: update 4.5.1-4
* fix/stabilize the f_list "merge" function

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-02-23 17:07:55 +01:00
Dirk Brenken cadf02496c adblock: update 4.5.1-3
* added IPFire DBL: a comprehensive, community-maintained domain blocklist
   divided in 12 categories
* LuCI: eslint fixes
* LuCI: added IPFire feed/category selection

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-02-20 20:22:49 +01:00
Dirk Brenken 2921e52cd8 adblock: update 4.5.1-2
* make sure to only return exactly one MAC address in the cgi

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-02-08 12:55:25 +01:00
Dirk Brenken b39494cf3f adblock: release 4.5.1
* Remote DNS Allow: this additional firewall feature lets selected client devices
   temporarily bypass local DNS blocking and use an external, unfiltered DNS resolver.
* LuCI: new Firewall options for remote Access
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-02-08 10:28:17 +01:00
Dirk Brenken 025c0c58b3 adblock: update 4.5.0-5
* add 'blocklist-referral' to the hagezi selection
* add minor report/map tweaks

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-02-05 16:13:56 +01:00
Dirk Brenken 808b3e368b adblock: update 4.5.0-4
* add interface information to the dns report
* support multiple tcpdump interfaces ('any') in the dns report properly

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-01-28 20:12:59 +01:00
Dirk Brenken 9df8a2b58c adblock: update 4.5.0-3
* fixed a potential deadlock during startup, when dns reporting is disabled

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-01-25 15:57:35 +01:00
Dirk Brenken 81891964ed adblock: update 4.5.0-2
* rework DNS reporting: more reliable, more information (request type), better performance
* fixed minor issues
* readme update
* LuCI: added new DNS page (incl. Allowed/Blocked canvas)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-01-24 14:35:07 +01:00
Dirk Brenken 389baa9d00 adblock: release 4.5.0-1
* added firewall rules based on nftables in a separate isolated nftables table (inet adblock)
  and chains (prerouting), with MAC addresses stored in an nftables set.
  Implemented the following firewall‑integrated features:
  * external DNS Routing (unfiltered): routes DNS queries from selected devices or interfaces
    to an external unfiltered DNS resolver
  * external DNS Routing (filtered): routes DNS queries from selected devices or interfaces
    to an external filtered DNS resolver
  * force DNS: blocks or redirects all external DNS traffic from selected interfaces
    to ensure that clients use the local resolver
* removed the optional generation of an additional jail list (only supported bydnsmasq),
  use the new, resolver independent ext. DNS routing instead
* removed the pz-client-ip feature (only supported by bind),
  use the new, resolver independent ext. DNS routing instead
* removed the obsolete, hardcoded fw4 rules for DNS enforcement
  existing rules will be removed via uci-defaults script after adblock update
* changed the Jail mode to a simple allowlist-only mode
* fixed minor issues in the mail template
* readme update
* LuCI: added a new config tab "Firewall Settings"
* LuCI: fixed minor usability issues

Signed-off-by: Dirk Brenken <dev@brenken.org>
2026-01-18 23:36:26 +01:00
Dirk Brenken afce31650c adblock: update 4.4.5-2
* fixed f_uci function
* fixed f_switch function, reported in the turris forum

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-12-15 22:58:34 +01:00
Dirk Brenken b085131830 adblock: release 4.4.5-1
* hardened the uci config parsing
* added a fast, flexible & secure domain validator function, it eliminates > 99 % of garbage inputs
  - Please note: the "rule" in the feed file now only includes parameters for the domain validator,
    see readme for details. Please nuke a custom feed file from former versions - they are no longer
    compatible
* readme update
* LuCI: fixed a minor issue in the logread template
* LuCI: adapted the rule select options in the custom feed editor to use the new domain validator

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-12-14 07:08:17 +01:00
Dirk Brenken cd5f13e922 adblock: update 4.4.4-3
* fixed a typo in the allowlist/blocklist regex
* limit the f_switch function to only the suspend/resume actions

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-12-04 22:20:23 +01:00
Dirk Brenken 681ac94a12 adblock: update 4.4.4-2
* fix domain regex
* fix typo in f_query function
* remove backups during stop action or in disabled state

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-11-24 21:42:43 +01:00
Dirk Brenken 2ec48cb029 adblock: release 4.4.4-1
* major feed cleanup, removed the following default feeds:
   - adaway, unmaintained for more than 2 years
   - easylist/easyprivacy, not effective for DNS-based ad blocking plus too many false positives
   - energized_*,  broken
   - lightswitch05, abandoned
   - notracking, abandoned
   - openphish, not effective for DNS-based ad blocking plus too many false positives
   - reg_*, not effective for DNS-based ad blocking plus too many false positives
   - winhelp, unmaintained for more than 2 years
* update the utcapitole categories
* automatically migrate the hagezi categories via uci-defaults script to the new format
* the adblock status now includes the backend- and frontend version information
* small performance improvements
* LuCI: no longer call the logread binary, use rpc / the ubus log object instead
* LuCI: various code cleanups
* LuCI: various small usability improvements
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-11-21 19:04:31 +01:00
Dirk Brenken 65c403a54b adblock: release 4.4.3-1
* support TLDs in feeds and local block-/allowlist, e.g. to block all 'de' domains with a single entry
* add active feed domains (of the feed download URLs) automatically to the local allowlist, to prevent download erros
* update the feed categories of 1hosts
* update and change the feed categories of hagezi: new categories are 'abusetlds',  'social', 'urlshortener' and
  'nrd' (newly registered domains). The latter one required download URL changes.
  Please note: if you use hagezi than remove and re-add the categories in LuCI feed selection after the updae
* Add an external adblock test (https://adblock.turtlecute.org/) on the DNS reporting tab, itprovides a simple
  way to check whether your current adblock setup is working as expected
* readme update

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-11-16 19:19:57 +01:00
Dirk Brenken f7505326d2 adblock: update 4.4.2-3
* minor reporting improvements in LuCI
* readme update
* cosmetics

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-06-14 20:58:21 +02:00
Dirk Brenken 7825affaf9 adblock: update 4.4.2-2
* sanitize the json reporting output

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-05-31 23:07:03 +02:00
Dirk Brenken 58d0992886 adblock: update 4.4.2-1
* added a new "divested" feed, see https://divested.dev/pages/dnsbl
* added a new nsfw category of the hagezi feed
* added the missing custom feed file handling in the backend
* added a geoIP map with all blocked domains (plus the homeIP) in a
  modal popup window on the Reporting tab in LuCI
* fixed the fetchcmd autodetection
* small code fixes and improvements
* update the readme, added a new "Best practise" section
* update different LuCI components (separate commit)

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-05-30 18:38:44 +02:00
Dirk Brenken 52b51e30f4 adblock: update 4.4.1-2
* init improvements
* jail mode fixes and improvements
* small code cleanups
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-05-03 14:39:07 +02:00
Dirk Brenken 519c7fcf96 adblock: update 4.4.1-1
* add an uci-defaults script for housekeeping and option migration from former versions
* update the readme

Signed-off-by: Dirk Brenken <dev@brenken.org>
2025-04-19 20:01:23 +02:00