mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-04-06 06:43:35 +03:00
Update queryStrategy parameter explanation
This commit is contained in:
parent
1548bc0262
commit
8cd2517694
1 changed files with 63 additions and 0 deletions
|
@ -56,6 +56,22 @@ Xray 内置的 DNS 模块,主要有两大用途:
|
|||
"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",
|
||||
|
@ -132,6 +148,53 @@ Xray 内置的 DNS 模块,主要有两大用途:
|
|||
|
||||
`UseIPv4` 只查询 A 记录;`UseIPv6` 只查询 AAAA 记录。默认值为 `UseIP`,即查询 A 和 AAAA 记录。
|
||||
|
||||
Xray-core v1.8.6 新增功能:`queryStrategy` 可以在每一项 `DNS` 服务器中分别设置。
|
||||
|
||||
```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 的域名使用 "UseIPv4"
|
||||
},
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": [
|
||||
"geosite:openai"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv6" // geosite:openai 的域名使用 "UseIPv6"
|
||||
}
|
||||
],
|
||||
"queryStrategy": "UseIP" // 全局使用 "UseIP"
|
||||
}
|
||||
```
|
||||
|
||||
**注意:**<br>
|
||||
当子项中的 `"queryStrategy"` 值与全局 `"queryStrategy"` 值冲突时,会造成子项中的网站打不开。
|
||||
|
||||
```jsonc
|
||||
"dns": {
|
||||
"servers": [
|
||||
"https://1.1.1.1/dns-query",
|
||||
{
|
||||
"address": "https://1.1.1.1/dns-query",
|
||||
"domains": [
|
||||
"geosite:netflix"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"queryStrategy": "UseIPv6" // "UseIPv6" 与 "UseIPv4" 冲突
|
||||
}
|
||||
],
|
||||
"queryStrategy": "UseIPv4" // 建议将 "UseIPv4" 改为 "UseIP"
|
||||
}
|
||||
```
|
||||
|
||||
> `disableCache`: true | false
|
||||
|
||||
`true` 禁用 DNS 缓存,默认为 `false`,即不禁用。
|
||||
|
|
Loading…
Add table
Reference in a new issue