Skip to main content

Plugin Overview

All OxiDNS capabilities ship as plugins, organized into four layers by responsibility:

  • server: network ingress; listens for traffic and hands it to the policy entrypoint.
  • executor: performs actions such as forwarding, caching, rewriting, observability, and system integrations.
  • matcher: evaluates branch conditions for sequence.
  • provider: supplies reusable domain / IP datasets consumed by matchers and executors.

Complex policies are usually built by composing several plugin types:

server -> sequence
-> matcher decides
-> executor acts
-> provider supplies datasets
-> upstream or side effect

The full built-in plugin catalog is listed below. Click any plugin name to jump to its field reference.

Server plugins

See Server Plugins for full field reference.

PluginPurpose
udp_serverListens for DNS over UDP and forwards requests to entry.
tcp_serverListens for DNS over TCP. With cert and key configured it also serves as a DoT listener.
http_serverProvides DNS over HTTPS (DoH) over HTTP/1.1, HTTP/2, and optional HTTP/3.
quic_serverProvides DNS over QUIC (DoQ).

Executor plugins

See Executor Plugins for full field reference. Grouped as: policy orchestration → request handling → response rewriting → observability → side-effect integrations → maintenance.

Policy orchestration

PluginPurpose
sequenceOrchestrates matchers and executors into a pipeline. The most common entry executor.
fallbackRuns a primary executor first and falls back to a secondary executor when the primary is too slow or fails.

Request handling

PluginPurpose
forwardSends DNS queries to upstreams.
cacheTTL-aware response caching with negative cache and persistence support.
hostsReturns local static A / AAAA answers using host-style entries.
arbitraryInjects arbitrary DNS records from zone-style rule strings.
redirectRewrites a query name toward another target and restores the visible CNAME on the way back.
ecs_handlerHandles EDNS Client Subnet: keep, rewrite, or auto-fill from source IP.
forward_edns0optForwards selected EDNS0 options from the request into the final response.

Response rewriting

PluginPurpose
ttlRewrites response TTL values (fixed value or min/max clamp).
prefer_ipv4 / prefer_ipv6Dual-stack selector: learns presence of the preferred family and suppresses the other.
black_holeGenerates full-qtype interception responses using nxdomain, nodata, null, custom, or refused mode.
drop_respDrops the current response from the context.
reverse_lookupMaintains a reverse IP → name cache and optionally answers PTR requests.

Observability and debugging

PluginPurpose
query_summaryEmits a concise query summary after downstream execution.
query_recorderPersists requests, responses, and sequence path events to SQLite, with history, stats, and SSE stream APIs.
metrics_collectorCollects lightweight request count and latency metrics and exports them in Prometheus format.
debug_printPrints request and response objects for debugging.
sleepAsync delay for testing and policy experiments.

Side effects and system integration

PluginPurpose
http_requestSends callbacks to external http/https services — webhooks, audit, alerts, external integrations.
learn_domainLearns pipeline request domains into dynamic_domain_set for dynamic allow or block lists.
scriptRuns an external command and injects a stable subset of DnsContext as arguments or environment variables.
ipsetWrites response IPs into Linux ipset via the embedded netlink backend (no ipset binary required).
nftsetWrites response IPs into nftables sets via the embedded netlink backend (no nft binary required).
ros_address_listSyncs response IPs to MikroTik RouterOS address-list with dynamic, persistent, and shutdown cleanup support.

Maintenance and scheduling

PluginPurpose
upgradeTriggers the OxiDNS upgrade flow from inside the executor pipeline.
downloadDownloads one or more http/https files locally and atomically replaces targets after fully written.
reload_providerRebuilds selected provider snapshots by tag without triggering a full application reload.
reloadTriggers the same application-level full reload as POST /reload.
cronSchedules executors in the background via cron expression or fixed interval.

Matcher plugins

See Matcher Plugins for full field reference.

Request dimensions

PluginPurpose
qnameMatches the query name in the request.
questionMatches request questions using provider contains_question semantics.
qtypeMatches request qtypes.
qclassMatches request qclasses.
client_ipMatches the client source IP.
ptr_ipDecodes the IP from a PTR query name and matches it.

Response dimensions

PluginPurpose
resp_ipMatches A and AAAA addresses in response answers.
cnameMatches CNAME targets in the response.
rcodeMatches the current response code.
has_respMatches when a response already exists in the context.
has_wanted_ansMatches when the response already contains answers of the wanted qtype.

Context and expressions

PluginPurpose
markMatches marks already written into the DNS context.
envMatches process environment variables.
randomMatches probabilistically for rollout or sampling.
rate_limiterToken-bucket rate limiting by client IP.
string_expGeneral-purpose string expression matcher for cases where dedicated matchers are too rigid.

Composition and constants

PluginPurpose
any_matchComposes multiple matcher expressions; returns true when any one matches.
_trueAlways true.
_falseAlways false.

Provider plugins

See Provider Plugins for full field reference.

PluginPurpose
domain_setHigh-performance domain rule set, referenced by qname, cname, and similar plugins.
dynamic_domain_setWritable local domain rule file with hot-snapshot matching, API management, and learned appends.
geositeLoads one or more codes from the v2ray-rules-dat geosite.dat into a reusable domain rule set.
adguard_ruleProvides a reusable subset of AdGuard Home DNS rule evaluation as a provider.
ip_setIP / CIDR rule set, referenced by client_ip, resp_ip, ptr_ip, and similar matchers.
geoipLoads one or more codes from the v2ray-rules-dat geoip.dat into a reusable IP / CIDR set.