github.com/sagernet/sing-box@v1.2.7/docs/configuration/dns/server.md (about) 1 ### Structure 2 3 ```json 4 { 5 "dns": { 6 "servers": [ 7 { 8 "tag": "google", 9 "address": "tls://dns.google", 10 "address_resolver": "local", 11 "address_strategy": "prefer_ipv4", 12 "strategy": "ipv4_only", 13 "detour": "direct" 14 } 15 ] 16 } 17 } 18 19 ``` 20 21 ### Fields 22 23 #### tag 24 25 The tag of the dns server. 26 27 #### address 28 29 ==Required== 30 31 The address of the dns server. 32 33 | Protocol | Format | 34 |----------|-------------------------------| 35 | `System` | `local` | 36 | `TCP` | `tcp://1.0.0.1` | 37 | `UDP` | `8.8.8.8` `udp://8.8.4.4` | 38 | `TLS` | `tls://dns.google` | 39 | `HTTPS` | `https://1.1.1.1/dns-query` | 40 | `QUIC` | `quic://dns.adguard.com` | 41 | `HTTP3` | `h3://8.8.8.8/dns-query` | 42 | `RCode` | `rcode://refused` | 43 | `DHCP` | `dhcp://auto` or `dhcp://en0` | 44 45 !!! warning "" 46 47 To ensure that system DNS is in effect, rather than Go's built-in default resolver, enable CGO at compile time. 48 49 !!! warning "" 50 51 QUIC and HTTP3 transport is not included by default, see [Installation](/#installation). 52 53 !!! info "" 54 55 the RCode transport is often used to block queries. Use with rules and the `disable_cache` rule option. 56 57 !!! warning "" 58 59 DHCP transport is not included by default, see [Installation](/#installation). 60 61 | RCode | Description | 62 |-------------------|-----------------------| 63 | `success` | `No error` | 64 | `format_error` | `Format error` | 65 | `server_failure` | `Server failure` | 66 | `name_error` | `Non-existent domain` | 67 | `not_implemented` | `Not implemented` | 68 | `refused` | `Query refused` | 69 70 #### address_resolver 71 72 ==Required if address contains domain== 73 74 Tag of a another server to resolve the domain name in the address. 75 76 #### address_strategy 77 78 The domain strategy for resolving the domain name in the address. 79 80 One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`. 81 82 `dns.strategy` will be used if empty. 83 84 #### strategy 85 86 Default domain strategy for resolving the domain names. 87 88 One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`. 89 90 Take no effect if override by other settings. 91 92 #### detour 93 94 Tag of an outbound for connecting to the dns server. 95 96 Default outbound will be used if empty.