Xray-docs-next/docs/en/config/outbounds/dns.md

37 lines
1.3 KiB
Markdown
Raw Normal View History

2021-05-26 11:05:53 +00:00
# DNS
DNS is an outbound protocol used for intercepting and forwarding DNS queries.
2021-05-26 11:05:53 +00:00
This outbound protocol can only handle DNS traffic, including queries based on UDP and TCP protocols. Other types of traffic will result in an error.
2021-05-26 11:05:53 +00:00
When handling DNS queries, this outbound protocol will forward IP queries (A and AAAA) to the built-in [DNS server](../dns.md). Other types of query traffic will be forwarded to their original destination addresses.
2021-05-26 11:05:53 +00:00
## OutboundConfigurationObject
```json
{
"network": "tcp",
"address": "1.1.1.1",
2023-07-03 07:50:32 +00:00
"port": 53,
"nonIPQuery": "drop"
2021-05-26 11:05:53 +00:00
}
```
> `network`: "tcp" | "udp"
Modifies the transport layer protocol for DNS traffic. The possible values are `"tcp"` and `"udp"`. When not specified, the original transport method will be retained.
2021-05-26 11:05:53 +00:00
> `address`: address
Modifies the DNS server address. When not specified, the original address specified in the source will be retained.
2021-05-26 11:05:53 +00:00
> `port`: number
Modifies the DNS server port. When not specified, the original port specified in the source will be retained.
2021-05-26 11:05:53 +00:00
2023-07-03 07:50:32 +00:00
> `nonIPQuery`: string
Control non IP queries (neither A or AAAA), `"drop"` this request or `"skip"` processing in DNS modulethe request will be forwarded to target. By default is `"drop"`.
## DNS Configuration Example <Badge text="WIP" type="warning"/>