<feed xmlns='http://www.w3.org/2005/Atom'>
<title>luci/applications/luci-app-adblock-fast/htdocs, branch master</title>
<subtitle>Lua Configuration Interface (mirror)</subtitle>
<id>https://git.openwrt.org/project/luci/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/luci/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/'/>
<updated>2026-07-19T00:27:03Z</updated>
<entry>
<title>luci-app-adblock-fast: update to 1.2.4-4</title>
<updated>2026-07-19T00:27:03Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-07-17T18:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=092aee785628f93f59895fbec97bb0b9c761aa21'/>
<id>urn:sha1:092aee785628f93f59895fbec97bb0b9c761aa21</id>
<content type='text'>
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.4
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.4

Description:
Update to PKG_RELEASE 4

  - Bump PKG_RELEASE from 2 to 4.
  - Add PKG_CPE_ID.

htdocs/luci-static/resources/adblock-fast/status.js:
  - Add escapeInfo function to HTML-escape untrusted scalar values.
  - Apply escapeInfo to error and warning messages.

root/usr/share/rpcd/acl.d/luci-app-adblock-fast.json:
  - Remove file access rules for /dev/shm/adblock-fast files.
  - Remove getCronEntry from ubus read access.
  - Remove unbound from uci read access.
  - Remove dhcp, smartdns, and unbound from uci write access.
  - Adjust ubus luci.adblock-fast write access for stop/start.

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.4-2</title>
<updated>2026-06-15T18:35:46Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-06-15T01:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=f67461fd0255bf992b2b559c22ec288067f2f9da'/>
<id>urn:sha1:f67461fd0255bf992b2b559c22ec288067f2f9da</id>
<content type='text'>
Maintainer: me
Compile tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.4
Run tested: x86_64, Dell EMC Edge620, OpenWrt 25.12.4

Description:
Update to 1.2.4-2

  - Update PKG_VERSION to 1.2.4 and PKG_RELEASE to 2.

README.md:
  - Update documentation URL from melmac.ca to mossdef.org.

htdocs/luci-static/resources/adblock-fast/status.js:
  - Update `pkg.LuciCompat` to 17.
  - Add `pkg.ChromeExtensionId` for the companion browser extension.
  - Update documentation URLs from melmac.ca to mossdef.org.
  - Add new warning messages for throttled parallel downloads and download
    timeouts.
  - Update `errorDetectingFileType` message to include the filename.
  - Update `syncCron` RPC: it now accepts schedule parameters (e.g.,
    `auto_update_enabled`, `auto_update_mode`) as distinct arguments instead
    of relying on UCI. The cron line is assembled and validated server-side.
  - Remove `setCronEntry` RPC, replaced by the extended `syncCron`.
  - Wrap `_syncCron` with a `syncCron` helper function that translates the
    schedule object into discrete arguments for the RPC call.

htdocs/luci-static/resources/view/adblock-fast/overview.js:
  - Add `maybeNagChromeExtension` to detect the AdBlock-Fast Controller
    Chrome extension and nag if missing.
  - Remove `generateCronEntry` helper function: the cron line is now
    assembled server-side.
  - Mark auto_update_* form fields as virtual: they are displayed from parsed
    cron data and submitted via `syncCron`, but never written to UCI.
  - Add new advanced options for download: `download_connect_timeout`,
    `download_max_time`, and `download_allow_insecure`.
  - Update `parallel_downloads` to be a range (1-16) instead of a boolean
    flag, with a default of 8. The label now indicates automatic reduction
    with low memory.
  - Modify `handleSave` and `handleSaveApply` to collect schedule data and
    pass it to `adb.syncCron` as discrete fields, bypassing UCI writes for
    scheduling. This ensures the crontab is the single source of truth for
    the schedule.

root/etc/uci-defaults/40_luci-adblock-fast:
  - Add logic to remove stale `auto_update_*` UCI keys from older versions,
    as the cron schedule is no longer mirrored in UCI.

root/usr/share/rpcd/acl.d/luci-app-adblock-fast.json:
  - Remove `setCronEntry` from ACL, as it has been replaced by `syncCron`.

root/usr/share/rpcd/ucode/luci.adblock-fast:
  - Update `rpcdCompat` to 17.
  - Remove explicit `setCronEntry` call from the example section.
  - Update `syncCron` example: it now includes schedule parameters, replacing
    `setCronEntry`.
  - Add `cron_field` helper function to coerce schedule fields to bounded
    integers, providing security against injection into crontabs.
  - Add `CRON_MODES` constant to allowlist accepted scheduling modes.
  - Update `cron_write` to accept `schedule` object with discrete fields.
    It now parses existing cron lines to preserve the schedule on state-only
    changes and validates all fields through `cron_field`/`CRON_MODES`.
  - Rename `get_cron_status` to `cron_read`, reflecting its read-only nature.
  - Update `cron_read` to parse the crontab line and return the schedule as
    strings, eliminating reliance on UCI for schedule configuration. The UI
    now parses this entry for display.
  - Refactor cron management functions (`update_cron`, `get_cron_status`)
    for improved security, robustness, and to remove UCI as a source of
    truth for cron schedule.

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.2-r18</title>
<updated>2026-04-26T16:04:01Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-04-24T17:30:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=cb0e171fd464bb677ff7bd6de833447075ae8311'/>
<id>urn:sha1:cb0e171fd464bb677ff7bd6de833447075ae8311</id>
<content type='text'>
* reformat Chrome Extension helper message for i18n
* remove use of base64 in uci-defaults script (thanks @sppmaster)
* fix setRpcdToken export

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.2-r14</title>
<updated>2026-03-25T21:10:11Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-03-21T01:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=3df99c61e38d80b484e952ffefe69f7ace31c64a'/>
<id>urn:sha1:3df99c61e38d80b484e952ffefe69f7ace31c64a</id>
<content type='text'>
* fix: ensure API account setup runs late in uci-defaults to allow for
  custom values to be set in other scripts
* add: DNS Query Logging tab/functionality

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.2-r12</title>
<updated>2026-03-19T18:44:37Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-03-19T02:33:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=dcc3b1d5e821c5dd5f4e32f36ccd8f0a0d9132fe'/>
<id>urn:sha1:dcc3b1d5e821c5dd5f4e32f36ccd8f0a0d9132fe</id>
<content type='text'>
status.js:
* add: declare setRpcdToken call

overview.js:
* add: option to set a custom RPCD Token

Uci-defaults:
* add: new script to add adblock_fast_api

Acl.d:
* add: new manifest for adblock_fast_api access
* add: setRpcdToken call

RPCD:
* add: setRpcdToken sets password for adblock_fast_api user

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.2-r10</title>
<updated>2026-03-08T17:29:48Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-03-07T19:19:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=806905c88f64850a0deb698f738ab40be10e03b2'/>
<id>urn:sha1:806905c88f64850a0deb698f738ab40be10e03b2</id>
<content type='text'>
* feat: hide service config options when service is disabled
* bugfix: avoid Chrome warnings/errors for labels

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.2-r8</title>
<updated>2026-03-04T20:22:35Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-03-03T18:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=a505caba18c37747c035b5620de2430712d9c6c7'/>
<id>urn:sha1:a505caba18c37747c035b5620de2430712d9c6c7</id>
<content type='text'>
* implement Pause button/countdown in WebUI
* expose pause_timeout setting in WebUI
* remove outdated (uci-reliant) cron code

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.2-r6</title>
<updated>2026-02-27T01:00:29Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-02-24T21:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=0d3cab72c6fe90c3996959f468bf4536c50cd048'/>
<id>urn:sha1:0d3cab72c6fe90c3996959f468bf4536c50cd048</id>
<content type='text'>
Update luci-app-adblock-fast from 1.2.1-r3 to 1.2.2-r6.
This rewrites the rpcd backend from a 519-line shell
script to a 452-line native ucode module, adds two new
RPC methods for cron management, reorganizes the web UI
with a dedicated scheduling tab and a collapsible service
details section, moves schedule persistence from UCI to
crontab, and adds the AGPL-3.0-or-later LICENSE file.

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;

---

- **8 files changed**, +1,765 / -851 lines (net +914)
- **1 commit**: `a18c61a` —
  `luci-app-adblock-fast: update to 1.2.2-r6`

---

- `+rpcd-mod-ucode` — Native ucode rpcd module loader

- `+jsonfilter` — No longer needed; ucode handles
  JSON natively

- Version bumped from `1.2.1-r3` to `1.2.2-r6`
- URL updated from `github.com/stangri/...` to
  `github.com/mossdef-org/...`

---

The rpcd script moves from:
```
/usr/libexec/rpcd/luci.adblock-fast   (519 lines, shell)
```
to:
```
/usr/share/rpcd/ucode/luci.adblock-fast (452 lines, ucode)
```

| Aspect          | Old (Shell)             | New (ucode)        |
|-----------------|-------------------------|--------------------|
| Language        | POSIX `/bin/sh`         | ucode bytecode     |
| JSON handling   | `json_init/add/dump`    | Native objects     |
| UCI access      | `config_load/get` subpr | `cursor()` API     |
| ubus access     | `jsonfilter` pipelines  | `connect()` API    |
| Business logic  | Duplicated in script    | Imports shared lib |
| Method decl     | `case` switch block     | Declarative schema |
| Performance     | Fork/exec per operation | In-process calls   |

The new script imports the shared business logic module
directly:

```javascript
import adb from '/lib/adblock-fast/adblock-fast.uc';
```

Query methods (`getInitStatus`, `getPlatformSupport`,
`getFileUrlFilesizes`, etc.) now delegate to the shared
`adb` library rather than re-implementing the logic.

**Retained (7 methods, same interface):**

| Method                | Type   | Purpose            |
|-----------------------|--------|--------------------|
| `getFileUrlFilesizes` | Query  | URL sizes from cfg |
| `getInitList`         | Query  | Enabled/running    |
| `getInitStatus`       | Query  | Full service state |
| `getPlatformSupport`  | Query  | Resolver/tool info |
| `setInitAction`       | Action | Start/stop/enable  |
| `getCronStatus`       | Query  | Cron diagnostics   |
| `syncCron`            | Action | Update cron sched  |

**Added (2 new methods):**

| Method         | Type   | Purpose              |
|----------------|--------|----------------------|
| `getCronEntry` | Query  | Get raw cron line    |
| `setCronEntry` | Action | Set/replace cron line|

The cron subsystem now tracks three entry states:
- **`active`** — Enabled and scheduled
- **`suspended`** — Disabled but recoverable
- **`disabled`** — Fully off

`getCronStatus` returns new diagnostic fields:
- `cron_line_multi` — Multiple entries detected
- `cron_line_parse_ok` — Expression validity
- `cron_line_state` — One of: `active`,
  `suspended`, `disabled`, `multi`,
  `unsupported`, `missing`
- `entry` — Raw matched cron line

Bumped from **11** to **13**, reflecting the new
methods and enhanced `getCronStatus` response shape.

Two new methods added to the rpcd ACL file
(`luci-app-adblock-fast.json`):
- `getCronEntry` (read section)
- `setCronEntry` (write section)

---

**LuciCompat** bumped from `11` to `13`.

**Data fetching refactored:**
- Removed separate `getServiceInfo()` ubus call
- `initStatus` response now provides all data
  (package compat, errors, warnings) in one call
- `ubus` object built from `initData` properties
  instead of separate service instance query

**New "Service Details" section:**
- Blocking stats, DNS backend info, compressed
  cache status, force-DNS ports, and donation
  link moved from inline status text to a
  separate collapsible `detailsDiv`
- Main status area now shows only the essential
  state label and cache info when stopped

**Cron warning logic rewritten:**
- Warnings only displayed when service is both
  enabled and running
- New `warningCronEntryMismatch` warning for
  suspended or unparseable cron entries
- Suggests "Resync Cron" action when
  `cronSyncNeeded` is detected
- Pre-existing checks for missing/disabled cron
  daemon preserved but now gated behind
  `showCronWarnings` flag

**Cron sync flow rewritten:**
1. Fetches current entry via `getCronEntry()`
2. Strips comment markers and suspended/disabled
   tags from the entry
3. Writes cleaned entry via `setCronEntry()`
4. Reloads page only on success

**New exports:** `getCronEntry`, `setCronEntry`

**New helper: `parseCronEntry(cronEntry)`**
- Parses raw cron line into form field values
- Detects schedule mode from cron pattern:
  - `every_n_hours` — `*/N * * * *`
  - `every_n_days` — `M H */N * *`
  - `monthly` — `M H D * *`
  - `weekly` — `M H * * D`
  - `daily` — `M H * * *` (default)
- Returns config object with: `auto_update_enabled`,
  `auto_update_mode`, `auto_update_hour`,
  `auto_update_minute`, `auto_update_weekday`,
  `auto_update_monthday`, `auto_update_every_ndays`,
  `auto_update_every_nhours`
- Falls back to defaults for unparseable entries

**New helper: `generateCronEntry(config)`**
- Inverse of `parseCronEntry`
- Converts form config object back to cron syntax
- Returns empty string when auto-update disabled
- Output format:
  `M H DOM * DOW /etc/init.d/adblock-fast dl`
  `# adblock-fast-auto`

**Data loading consolidated:**
- Removed separate `getFileUrlFilesizes()` and
  `getPlatformSupport()` calls
- Now fetches `getInitStatus()` + `getCronStatus()`
- Sizes and platform data extracted from the
  unified `initStatus` response

**New "List Updates Schedule" tab:**
- All scheduling options moved from `tab_advanced`
  to dedicated `tab_schedule`
- Options: `auto_update_enabled`,
  `auto_update_mode`, `auto_update_every_ndays`,
  `auto_update_every_nhours`, `auto_update_weekday`,
  `auto_update_monthday`, `auto_update_hour`,
  `auto_update_minute`
- Each option's `cfgvalue()` overridden to read
  from parsed cron config instead of UCI
- `config_update_enabled` remains on `tab_advanced`

**Schedule persistence moved to crontab:**
- Old: scheduling fields saved to UCI config, then
  `syncCron` called after `uci-applied` event to
  generate cron entry from config
- New: `handleSave()` collects form values, calls
  `generateCronEntry()`, writes directly via
  `setCronEntry()`, then removes scheduling fields
  from UCI before saving remaining config
- Result: schedule lives in crontab, survives
  config resets

**`handleSaveApply` simplified:**
- Old: chained `handleSave` → listener for
  `uci-applied` → `syncCron` → page reload
- New: `handleSave()` → `ui.changes.apply()`
- Cron already updated during save, no separate
  sync step needed

**Instance handling fix:**
- `dnsmasq_instance` and `smartdns_instance` write
  overrides now wrap values in arrays
- Ensures instances stored as UCI lists, not
  scalar strings

---

**2 new strings added:**
- `"List Updates Schedule"` — New tab header
- `"Service Details"` — New status section header

**0 strings removed, 0 strings reworded.**

All other changes are source line number updates
from the JavaScript refactoring. Existing
translations remain valid; translators only need
to handle the 2 new entries.

---

Adds the full AGPL-3.0-or-later license text
(661 lines), matching the `PKG_LICENSE` field
already declared in the Makefile.

---

- `rpcdCompat` bumped from `11` to `13`
- `LuciCompat` bumped from `11` to `13`
- Requires `rpcd-mod-ucode` (replaces `jsonfilter`)
- Requires companion `adblock-fast` package &gt;=1.2.2
  (for the shared `/lib/adblock-fast/adblock-fast.uc`
  library imported by the rpcd ucode module)
- All existing RPC methods preserved; 2 new ones
  added
- All existing UI functionality preserved;
  scheduling options reorganized into dedicated tab

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.1-r3</title>
<updated>2026-01-29T18:36:48Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-01-28T00:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=a8e71430d231d73adb0678db07c6a0c4175fac75'/>
<id>urn:sha1:a8e71430d231d73adb0678db07c6a0c4175fac75</id>
<content type='text'>
* bugfix: check if name passed to setInitAction of rpcd script matches the
  package name
* feature: add cron job support to WebUI (thanks @Aethersailor)
* add support for dnsmasq_sanity_check and dnsmasq_validity_check to UI

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
<entry>
<title>luci-app-adblock-fast: update to 1.2.0-26</title>
<updated>2026-01-04T19:29:43Z</updated>
<author>
<name>Stan Grishin</name>
</author>
<published>2026-01-04T19:29:18Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=63113daa5abfb44ce7ea58f106083d00443f14df'/>
<id>urn:sha1:63113daa5abfb44ce7ea58f106083d00443f14df</id>
<content type='text'>
* sync Compat with principal package
* better modal popup UE on long operations (thanks @Aethersailor)

Signed-off-by: Stan Grishin &lt;stangri@melmac.ca&gt;
</content>
</entry>
</feed>
