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.

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

Executor plugins​

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

Policy orchestration​

PluginPurposeIncluded in
sequenceOrchestrates matchers and executors into a pipeline. The most common entry executor.minimal
fallbackRuns a primary executor first and falls back to a secondary executor when the primary is too slow or fails.minimal
load_balanceDistribute requests across executors using round-robin, random, or weighted-random selection.minimal

Request handling​

PluginPurposeIncluded in
forwardSends DNS queries to upstreams.minimal
cacheTTL-aware response caching with negative cache and persistence support.minimal
hostsReturns local static A / AAAA answers using host-style entries.minimal
arbitraryInjects arbitrary DNS records from zone-style rule strings.standard
responseBuilds complete DNS responses from zone-record templates, including sections, RCODE, and response flags.standard
redirectRewrites a query name toward another target and restores the visible CNAME on the way back.minimal
client_ip_from_ecsReplaces the request-local client IP with the ECS address for subsequent matchers and recorders.standard
edns_filterFilters request EDNS options, optionally restoring the entire request on scope exit.minimal
ecs_handlerHandles EDNS Client Subnet: keep, rewrite, or auto-fill from source IP.minimal
forward_edns0optForwards selected EDNS0 options from the request into the final response.minimal

Response rewriting​

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

Observability and debugging​

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

Side effects and system integration​

PluginPurposeIncluded in
http_requestSends callbacks to external http/https services — webhooks, audit, alerts, external integrations.standard
learn_domainLearns pipeline request domains into dynamic_domain_set for dynamic allow or block lists.standard
scriptRuns an external command and injects a stable subset of DnsContext as arguments or environment variables.standard
ipsetWrites response IPs into Linux ipset via the embedded netlink backend (no ipset binary required).full
nftsetWrites response IPs into nftables sets via the embedded netlink backend (no nft binary required).full
ros_address_listProjects response IPs into a RouterOS address-list consumed by firewall, mangle, or policy-routing rules.full
ros_routeProjects response IPs as per-IP static routes in a RouterOS routing table with the configured gateway and distance.full

Maintenance and scheduling​

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

Matcher plugins​

See Matcher Plugins for full field reference.

Request dimensions​

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

Response dimensions​

PluginPurposeIncluded in
resp_ipMatches A and AAAA addresses in response answers.minimal
cnameMatches CNAME targets in the response.minimal
rcodeMatches the current response code.minimal
has_respMatches when a response already exists in the context.minimal
has_cnameChecks whether the response Answer section contains a CNAME record.minimal
has_wanted_ansMatches when the response already contains answers of the wanted qtype.minimal

Context and expressions​

PluginPurposeIncluded in
markMatches marks already written into the DNS context.minimal
envMatches process environment variables.minimal
timeMatches by timezone, time window, weekday, and day of month.minimal
randomMatches probabilistically for rollout or sampling.minimal
rate_limiterToken-bucket rate limiting by client IP.minimal
string_expGeneral-purpose string expression matcher for cases where dedicated matchers are too rigid.minimal

Composition and constants​

PluginPurposeIncluded in
any_matchComposes multiple matcher expressions; returns true when any one matches.minimal
_trueAlways true.minimal
_falseAlways false.minimal

Provider plugins​

See Provider Plugins for full field reference.

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