Explain plugin execution flow, priorities, and common plugin types:
query plugins (manipulate DNS queries/responses)exec plugins (side-effecting tasks)flow plugins (control flow)This sequence shows a typical plugin chain where hosts provides immediate answers, cache handles cached responses, and forward sends queries to upstream resolvers when needed.
Client
|
v
[Listener]
|
v
[Request Handler]
|
v
+--------------------------+
| Plugin: hosts | => If match -> Respond (short-circuit)
+--------------------------+
|
v
+--------------------------+
| Plugin: cache | => If cached -> Respond
+--------------------------+
|
v
+--------------------------+
| Plugin: forward | => Query upstream and return response
+--------------------------+
|
v
Response -> Client
This pipeline is intentionally simple: listeners hand requests to a single handler which executes an ordered set of plugins. Plugins may short-circuit the pipeline by producing a response (e.g., hosts or cache) or let the request continue to upstreams.
Short pages or subsections for major plugins with purpose & example config:
forward — forward queries to upstreamscache — hierarchical cache with TTL handling and LazyCachehosts — static hosts mappingacl — allow/deny by client IPgeoip — IP-based country tagging (GeoIP)geosite — domain category tagging (GeoSite)cron — scheduled background jobs (HTTP, command, invoke-plugin)dataset.* — domain/ip sets
domain_set — domain matching dataset (full/domain/regexp/keyword)ip_set — extract A/AAAA addresses and materialize ipset entriessequence — Sequence plugin — rule-based executor to compose plugins into chainsexecutable.* — exec-style plugins (downloader, ipset, nftset)
arbitrary — return predefined DNS records for matching queriesblackhole — return configured A/AAAA answers (sinkhole aliases)collector — simple in-process query counter; optional Prometheus collector when built with metrics featuredebug_print — log queries/responses for debuggingdownloader — download remote files and atomically update local filesdrop_resp — clear any existing response in the execution contextdual_selector — filter answers by IPv4/IPv6 preferenceecs — prepare EDNS0 Client Subnet options (ECS)edns0opt — add arbitrary EDNS0 options for upstream queriesfallback — try child plugins in order with automatic failoveripset (exec) — materialize A/AAAA answers into ipset entriesmark — set lightweight metadata marks on the requestnftset — materialize A/AAAA answers into nftables setsquery_summary — build and store a concise request summaryrate_limit — per-client rate limitingredirect — rewrite query names (supports wildcards)reverse_lookup — cache A/AAAA -> name mappings and answer PTRros_addrlist — RouterOS address list helper and notifiersleep — pause execution for a durationttl — fix or clamp TTL values on responsesplugins:
- tag: cache
type: cache
config:
min_ttl: 30
How priorities and plugin lists affect execution.
TODO: Link each built-in plugin to deeper docs pages.