-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Please answer all the questions with enough information. All issues not following this template will be closed immediately.
If you are not sure if your question is truely a bug in V2Ray, please discuss it here first.
-
What version of V2Ray are you using (If you deploy different version on server and client, please explicitly point out)?
V2Ray 4.31.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.15.2 darwin/amd64) -
What's your scenario of using V2Ray? E.g., Watching YouTube videos in Chrome via Socks/VMess proxy.
Filtering advertisements, providing encrypted DNS. -
What did you see? (Please describe in detail, such as timeout, fake TLS certificate etc)
When using a domain name to specify server in VMess/VLESS outbound connections, V2Ray resolves the domain via localhost, which ends up spamming DNS with tons of requests. Same behavior can be found in DoH/DoT as well. This could lead to lower performance or security risks. -
What's your expectation?
According to Section 10, RFC 8484, the initial resolution can be made into part of the configuration or resolved via a traditional DNS. So possible solutions include:
- Resolve Outbound/DoH/DoT domain with hosts section. V2Ray can checkout hosts of built-in DNS before trying to reach out localhost.
Example configuration
"outbounds": [{
"protocol": "vless",
"settings": {
"vnext": [{
"address": "example.com",
"port": 443,
"users": [{
"id": "27848739-7e62-4138-9fd3-098a63964b6b",
"encryption": "none"
}]
}]
},
},
"dns": {
"hosts": {
"example.com": "12.34.56.78",
"dns.google": "8.8.8.8"
},
"servers": [
"https+local://dns.google/dns-query"
]
}- A dedicated new option to specify IP address for Outbound/DoH/DoT. This is what Firefox does with the option
network.trr.bootstrapAddress.
Example configuration
"outbounds": [{
"protocol": "vless",
"settings": {
"vnext": [{
"address": "example.com",
"bootstrap": "12.34.56.78",
"port": 443,
"users": [{
"id": "27848739-7e62-4138-9fd3-098a63964b6b",
"encryption": "none"
}]
}]
},
},
"dns": {
"servers": [
{
"address": "https+local://dns.google/dns-query",
"bootstrap": "8.8.8.8"
}
]
}- Use traditional DNS in built-in DNS or specify bootstrap DNS to resolve domain of Outbound/DoH/DoT.
Example configuration
"outbounds": [{
"protocol": "vless",
"settings": {
"vnext": [{
"address": "example.com",
"port": 443,
"users": [{
"id": "27848739-7e62-4138-9fd3-098a63964b6b",
"encryption": "none"
}]
}]
},
},
"dns": {
"servers": [
"https+local://dns.google/dns-query",
"1.1.1.1"
],
"bootstrap": [
"8.8.8.8",
"1.1.1.1"
]
}-
Please attach your configuration file (Mask IP addresses before submit this issue).
Client configuration: -
Please attach error logs, especially the bottom lines if the file is large. Error log file is usually at
/var/log/v2ray/error.logon Linux. -
Please attach access log. Access log is usually at '/var/log/v2ray/access.log' on Linux.
-
Other configurations (such as Nginx) and logs.
-
If V2Ray doesn't run, please attach output from
--test.
The command is usually /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json, but may vary according to your scenario.
- If V2Ray service doesn't run, please attach journal log.
Usual command is journalctl -u v2ray.
Please review your issue before submitting.