Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions docs/en/config/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ If the domain name to be queried:
"skipFallback": false,
"clientIP": "1.2.3.4"
},
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"geosite:netflix"
],
"skipFallback": true,
"queryStrategy": "UseIPv4"
},
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"geosite:openai"
],
"skipFallback": true,
"queryStrategy": "UseIPv6"
},
"localhost"
],
"clientIp": "1.2.3.4",
Expand Down Expand Up @@ -135,6 +151,55 @@ You can specify `clientIp` for all DNS servers in [DnsObject](#dnsobject), or sp

`UseIPv4` only queries A records; `UseIPv6` only queries AAAA records. The default value is `UseIP`, which queries both A and AAAA records.

Xray-core v1.8.6 New feature: `queryStrategy` can be set separately for each `DNS` server.

```jsonc
"dns": {
"servers": [
"https://1.1.1.1/dns-query",
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"geosite:netflix"
],
"skipFallback": true,
"queryStrategy": "UseIPv4" // geosite:netflix's domain name uses "UseIPv4"
},
{
"address": "https://1.1.1.1/dns-query",
"domains": [
"geosite:openai"
],
"skipFallback": true,
"queryStrategy": "UseIPv6" // The domain name geosite:openai uses "UseIPv6".
}
],
"queryStrategy": "UseIP" // Global use of "UseIP"
}
```

**NOTE:**<br>
When the `"queryStrategy"` value in the child item conflicts with the global `"queryStrategy"` value, the query for the child item will respond null.

```jsonc
"dns": {
"servers": [
"https://1.1.1.1/dns-query",
{
"address": "https://8.8.8.8/dns-query",
"domains": [
"geosite:netflix"
],
"skipFallback": true,
"queryStrategy": "UseIPv6" // "UseIPv6" conflicts with "UseIPv4".
}
],
"queryStrategy": "UseIPv4"
}
```

Subterm geosite:netflix query gets null response due to conflicting `"queryStrategy"` values. geosite:netflix domain is queried by global DNS `https://1.1.1.1/dns-query` and gets A record.

> `disableCache`: true | false

`true` disables DNS caching, default is `false` which means caching is not disabled.
Expand Down