-
I am very confused about how to do dns routing when use v2ray as a dns server. Will dns server use dns object? Please check the following partial config: "dns": {
"servers": [
"1.1.1.1",
{
"address": "114.114.114.114",
"port": 53,
"domains": ["geosite:cn"]
},
"localhost"
]
},
......
"inbounds": [
{
"port": 53,
"tag": "dns-in",
"protocol": "dokodemo-door",
"settings": {
"address": "1.1.1.1",
"port": 53,
"network": "tcp,udp"
}
}
],
......
"outbounds": [
{
"protocol": "dns",
"tag": "dns-out"
}
],
......
"routing": {
"rules": [
{
"type": "field",
"inboundTag": ["dns-in"],
"outboundTag": "dns-out"
}
]
......
You can see this config, when I use v2ray as a DNS server (port 53, dokodemo-door, dns-in tag), it seems it always use The DNS server and "dns" object is very confusing to me. Because I am using v2ray in linux router with iptables rules, I am trying to figure out how to do dns routing based on domain names. For socks protocol, it's very easy. But for router setup, it's very confused. Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think I can answer my own question now. By testing and reading v2ray dns protocol doc and v2ray dns object doc, I can confirm that dns server does use dns object. This is because the outbound protocol dns will use dns object to resolve (A and AAAA) records. |
Beta Was this translation helpful? Give feedback.
I think I can answer my own question now.
By testing and reading v2ray dns protocol doc and v2ray dns object doc, I can confirm that dns server does use dns object.
This is because the outbound protocol dns will use dns object to resolve (A and AAAA) records.