2022-04-27 14:21:41 +10:00

42 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 自定义DNS说明
XrayR支持为不同节点设置不同的DNS策略具体方法如下
1. 编写dns.json文件此配置与Xray DNS配置完全相同请查看[https://xtls.github.io/config/dns.html](https://xtls.github.io/config/dns.html) 获取帮助。
2.`config.yml`中配置`DnsConfigPath`为dns.json的路径。
3. 在所需要启用自定义DNS的节点中`EnableDNS`设为true。如设为false或者不填则是使用本机DNS。
4. 如果要启用geoip相关配置请确保`geoip.dat``geosite.dat`处于和`config.yml`同一目录。
## DNS解锁样例配置
```javascript
{
"servers": [
"8.8.8.8",
{
"address": "1.1.2.2", // 购买的 DNS 解锁提供的 IP
"port": 53,
"domains": [
"geosite:netflix"
]
}
]
}
```
## 设置IPV6优先
1. 请先确保主机有ipv6地址如无请考虑使用[warp](https://github.com/P3TERX/warp.sh)获取ipv6。
2. 在所需要设置IPV6优先的节点中`EnableDNS`设为true。
3. 在所需要设置IPV6优先的节点中`SendIP`设为`"::"`
4. 在所需要设置IPV6优先的节点中`DNSType`设为`UseIP`
至此XrayR将会优先使用目标网站的ipv6地址进行访问不会影响默认ipv4站点的访问。~~可以用于解锁Netflix等需求~~
## 设置IPV4优先
1. 在所需要设置IPV4优先的节点中`EnableDNS`设为true。
2. 在所需要设置IPV4优先的节点中`SendIP`设为`"0.0.0.0"`
3. 在所需要设置IPV4优先的节点中`DNSType`设为`UseIP`