Skip to content

DNS Configuration

Settings controlling how domain names are resolved.

mode

type: string

Description

Specifies the default resolution mode for domains that do not match any specific rule. (default: "udp")

Allowed Values

  • udp: Standard DNS over UDP.
  • https: DNS over HTTPS (DoH).
  • system: Use the system's default resolver.

Usage

Command-Line Flag

$ spoofdpi --dns-mode "https"

TOML Config

[dns]
mode = "https"


addr

type: <ip:port>

Description

Upstream DNS server address for standard UDP queries. (default: 8.8.8.8:53)

This is used when dns-mode is set to udp.

Usage

Command-Line Flag

$ spoofdpi --dns-addr "1.1.1.1:53"

TOML Config

[dns]
addr = "1.1.1.1:53"


https-url

type: string

Description

Endpoint URL for DNS over HTTPS (DoH) queries. (default: "https://dns.google/dns-query")

This is used when dns-mode is set to https.

Usage

Command-Line Flag

$ spoofdpi --dns-https-url "https://1.1.1.1/dns-query"

TOML Config

[dns]
https-url = "https://1.1.1.1/dns-query"


qtype

type: string

Description

Filters DNS queries by record type (A for IPv4, AAAA for IPv6). (default: "ipv4")

Available values are "ipv4", "ipv6", and "all".

If your Internet Service Provider (ISP) doesn't support IPv6, it is recommended to set this option to "ipv4" for stability.

Usage

Command-Line Flag

$ spoofdpi --dns-qtype "all"

TOML Config

[dns]
qtype = "all"


cache

type: boolean

Description

If set, DNS records will be cached to improve performance and reduce latency. (default: false)

Usage

Command-Line Flag

$ spoofdpi --dns-cache

TOML Config

[dns]
cache = true