Projects STRLCPY sing-box Files
🤬
96 lines | ISO-8859-1 | 2 KB

Structure

{
  "dns": {
    "servers": [
      {
        "tag": "google",
        "address": "tls://dns.google",
        "address_resolver": "local",
        "address_strategy": "prefer_ipv4",
        "strategy": "ipv4_only",
        "detour": "direct"
      }
    ]
  }
}

Fields

tag

The tag of the dns server.

address

==Required==

The address of the dns server.

ProtocolFormat
Systemlocal
TCPtcp://1.0.0.1
UDP8.8.8.8 udp://8.8.4.4
TLStls://dns.google
HTTPShttps://1.1.1.1/dns-query
QUICquic://dns.adguard.com
HTTP3h3://8.8.8.8/dns-query
RCodercode://refused
DHCPdhcp://auto or dhcp://en0

!!! warning ""

To ensure that system DNS is in effect, rather than Go's built-in default resolver, enable CGO at compile time.

!!! warning ""

QUIC and HTTP3 transport is not included by default, see [Installation](/#installation).

!!! info ""

the RCode transport is often used to block queries. Use with rules and the `disable_cache` rule option.

!!! warning ""

DHCP transport is not included by default, see [Installation](/#installation).
RCodeDescription
successNo error
format_errorFormat error
server_failureServer failure
name_errorNon-existent domain
not_implementedNot implemented
refusedQuery refused

address_resolver

==Required if address contains domain==

Tag of a another server to resolve the domain name in the address.

address_strategy

The domain strategy for resolving the domain name in the address.

One of prefer_ipv4 prefer_ipv6 ipv4_only ipv6_only.

dns.strategy will be used if empty.

strategy

Default domain strategy for resolving the domain names.

One of prefer_ipv4 prefer_ipv6 ipv4_only ipv6_only.

Take no effect if override by other settings.

detour

Tag of an outbound for connecting to the dns server.

Default outbound will be used if empty.

Please wait...
Page is in error, reload to recover