Skip to content

adblock-fast: trigger restart when dnsmasq_instance or smartdns_instance changes - #23

Merged
stangri merged 2 commits into
mainfrom
copilot/adblock-fast-support-multiple-instances
Sep 10, 2026
Merged

stangri merged 2 commits into
mainfrom
copilot/adblock-fast-support-multiple-instances

Conversation

Copilot AI commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

When dns='dnsmasq.conf' (or any dnsmasq/smartdns mode), changing dnsmasq_instance or smartdns_instance while the service was running would silently do nothing — adb_config_cache found no matching entry in reload or restart triggers and fell through to skip.

Changes

  • files/lib/adblock-fast/adblock-fast.uc — add dnsmasq_instance and smartdns_instance to pkg.triggers.restart:

    -    restart: 'compressed_cache compressed_cache_dir force_dns led force_dns_port',
    +    restart: 'compressed_cache compressed_cache_dir dnsmasq_instance force_dns led force_dns_port smartdns_instance',

    A restart action re-runs resolver('update_config'), which iterates all configured instances and sets addnmount/serversfile/confdir symlinks for each, then restarts the resolver. reload (which triggers a full re-download) is intentionally not used since instance list changes don't require re-fetching blocklists.

  • tests/run_tests.sh — expose pkg.triggers via _test_internals.pkg_triggers() for use in tests.

  • tests/02_config/03_dnsmasq_conf_instance_triggers — new test asserting dnsmasq_instance and smartdns_instance are in restart triggers and absent from reload triggers.

… smartdns_instance to restart triggers

Co-authored-by: stangri <4768176+stangri@users.noreply.github.com>
Copilot AI changed the title [WIP] Support multiple instances on adblock-fast configuration adblock-fast: trigger restart when dnsmasq_instance or smartdns_instance changes Aug 10, 2026
Copilot AI requested a review from stangri August 10, 2026 19:09
@stangri
stangri requested a review from egc112 August 10, 2026 19:22
@stangri
stangri marked this pull request as ready for review August 10, 2026 19:24
@stangri

stangri commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

@egc I'd appreciate your eyes on this!

@egc112

egc112 commented Aug 11, 2026

Copy link
Copy Markdown

I am not sure if I can be of much assistance as I am not very familiar with the adblock-fast source code and have my hands full with another project 😉
But this looks good to me solving an inconsistency introduced with an earlier enhancement

@stangri
stangri merged commit 7fb0d75 into main Sep 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[adblock-fast] wish: support multiple instance on adblock-fast.config.dns='dnsmasq.conf'

3 participants