Skip to content

Commit 5acaebb

Browse files
committed
update V5 DNS document
1 parent 06bcf6c commit 5acaebb

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

docs/en_US/v5/config/dns.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
# DNS
22
service.dns
33

4-
The DNS server is the built-in host name resolution component.
4+
V2Ray has a built-in DNS server, which has two main purposes: matching routing rules according to the IP resolved from a domain, and traditional DNS function—resolving the target address to connect.
5+
6+
:::tip
7+
Due to the complexity of DNS protocol, V2Ray only supports basic IP query function (A and AAAA records). In order to have a complete DNS experience, you may want to use an dedicated DNS serverware, such as [CoreDNS](https://coredns.io), together with V2Ray's builtin DNS features.
8+
:::
9+
10+
:::warning
11+
For `outbound`s with `freedom` protocol, the default value of `domainStrategy` is `AsIs`, therefore the DNS settings will not be applied to this outbound by default. If necessary, it should be configured as`UseIP`.
12+
:::
13+
14+
## DNS processing flow
15+
16+
When a domain name list assigned by a DNS server matches the domain name currently being queried, V2Ray will use this DNS server first, otherwise, it will query from top to bottom, and only return the IP list which matches expectIPs. The processing flow diagram of the DNS server is as follows:
17+
18+
![](/dns_flowchart_en.png)
519

620
> `nameServer`: [ [NameServerObject](#NameServerObject) ]
721
@@ -31,20 +45,52 @@ Disable the fallback query step.
3145

3246
> `address`: string
3347
48+
The network address or URL of Domain Name Service Service Server.
49+
50+
Following Types are supported:
51+
52+
* Standard DNS: An address like `1.0.0.1:53` specifies an UDP DNS Server. This the most common type of DNS Server.
53+
* DNS over TCP: An address like `tcp://host:port` specifies an TCP DNS Server. Currently DNS over TCP in V2Ray have performance implications.
54+
* DNS over Local TCP: An address like `tcp+local://host:port` specifies a TCP DNS Server send over local network. The communication with remote DNS server will be send from client's network environment directly without dispatch over routing component.
55+
* DNS over HTTPS: An address like `https://host:port/dns-query` specifies an DNS over HTTPS Server.
56+
* DNS over Local HTTPS: An address like `https+local://host:port/dns-query` specifies an DNS over HTTPS Server over local network. The communication with remote DNS server will be send from client's network environment directly without dispatch over routing component.
57+
* DNS over Local QUIC: An address like `quic+local://host:port/` specifies an DNS over QUIC Server over local network. The communication with remote DNS server will be send from client's network environment directly without dispatch over routing component.
58+
3459
> `clientIp`: string
3560
36-
> `skipFallback`: true|false
61+
The client IP address indication send to the DNS Server. The server may return a localised result based on this address.
62+
63+
> `skipFallback`: true | false
64+
65+
Prevent fallback to this DNS Server.
3766

3867
> `prioritizedDomain`: [ [PrioritizedDomainObject](#PrioritizedDomainObject) ]
3968
69+
The domains that should be send to this server. If the domain being queried match one of the specification, then the query will be send to this server first.
70+
4071
> `geoip`: [ [GeoIPObject](geo.md#GeoIPObject) ]
4172
73+
The IP address expected from this server. If the result is not from the given IP address range, it will be discarded.
74+
4275
## StaticHostsObject
4376

4477
> `type`: `Full` | `Subdomain` | `Keyword` | `Regex`
4578
79+
Static Hosts supports different types of matching method.
80+
81+
* Full: Requires an exact match. When this domain name completely matches the target domain name, the rule takes effect. For example, "v2ray.com" matches "v2ray.com" but not "www.v2ray.com".
82+
* Subdomain: Matches a domain and all its subdomain. This rule takes effect when the domain name is the target domain name or its subdomain name. For example, "v2ray.com" matches "www.v2ray.com", "v2ray.com", but not "xv2ray.com".
83+
* Keyword: Matches any domain with a keyword. When this string matches any part of the target domain name, the rule takes effect. For example, "sina.com" can match "sina.com", "sina.com.cn" and "www.sina.com" but not "sina.cn".
84+
* Regex: Matches domain based on Regular Expression. When this regular expression matches the target domain name, the rule takes effect. For example, "\\\\.goo.*\\\\.com$" matches "www.google.com" and "fonts.googleapis.com" but not "google.com".
85+
4686
> `domain`: string
4787
88+
The domain matching specification. Its interpretation is based on the `type` of the rule.
89+
4890
> `ip`: string
4991
92+
The static host IP address. If configured, this IP address will be used as the domain name resolution result for matching domains.
93+
5094
> `proxiedDomain`: string
95+
96+
The replacement domain. If configured, this domain name's resolution result will be used as the domain name resolution result for mathcing domains.

0 commit comments

Comments
 (0)