Closed 5high closed 4 years ago
Not production bug. Moving to discussion.
你的dns-in和dns-out没有用路由连起来
能否给个连起来的例子呢?
我加过这个到路由里,一样没效果,而且还解析很慢
"routing": {
"rules": [
{
"ip": [
"geoip:cn",
"geoip:private"
],
"domain": [
"geosite:cn"
],
"type": "field",
"port": null,
"outboundTag": "direct"
},
{
"type": "field",
"inboundTag": "dns-in",
"outboundTag": "dns-out"
}
],
"domainStrategy": "IPIfNonMatch"
},
如果配置成上面这样的路由查询回出问题
C:\WINDOWS\system32>nslookup www.taobao.cn 172.xxx DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: 172
DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. 非权威应答: DNS request timed out. timeout was 2 seconds. 名称: www.taobao.cn Addresses: 66.198.178.111 66.198.178.121
ip 和 domain 需要拆分成两个 rule
拆分成2个rule确实正常了,但是请看下面总是请求第三次才返回记录,包括解析国内域名。
C:\WINDOWS\system32>nslookup www.sohu.com 172.xx.xx.xx DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: 172.xx.xx.xx
DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. 非权威应答: DNS request timed out. timeout was 2 seconds. 名称: www.sohu.com Addresses: 118.244.253.70 118.244.253.69 118.244.253.68
C:\WINDOWS\system32>nslookup www.facebook.com 172.xx.xx.xx DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: 172.xx.xx.xx
DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. 非权威应答: 名称: www.facebook.com Addresses: 200:2:f3b9:bb27:: 31.13.75.17
这是一个已知问题,目前还不清楚为什么Windows的nslookup会有这样的问题,在其它平台上无法重现。
如果我不增加json路由里面的内容,在Windows下面可以正常lookup,只是不能分流,你可以试试看我说的,也许可以帮你定位问题。
大约情况: 如客户是windows, 如用fixed ip就会比较正常. 如客户是windows, 如用DHCP就会出现异常.
具体情况: 在DHCP时 会看见v2ray dns会用我的suffixes加到入要找的domain去找, 如要找 www.baidu.com 时 v2ray会加入suffixes 如(abc.xyz) 去 dns server 找 www.baidu.com.abc.xyz
解决办法: 暂时解决办法 : 转用fixed ip(但也不能解决全部问题) 长远解决办法 : 希望v2ray可帮忙解决
以下是client config(已简略)
{
"dns": {
"servers": [
"1.1.1.1",
{
"address": "114.114.114.114",
"port": 53,
"domains": ["geosite:cn"]
}
]
},
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"inboundTag": "dns-in",
"outboundTag": "dns-out"
},
]
},
"inbounds": [
// dokodemo-door:53
{
"protocol": "dokodemo-door",
"port": 53,
"tag": "dns-in",
"settings": {
"address": "8.8.8.8",
"port": 53,
"network": "udp,tcp"
// "timeout": 0,
// "followredirect": false
}
}
],
"outbounds": [
// dns
{
"tag": "dns-out",
"protocol": "dns"
},
],
}
以下是 fixed ip时的 ipconfig/all, 是没有"DNS Suffix Search List"
C:\Users\Administrator>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : win2016svr
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
以下是windows 用 fixed ip 时 resolve www.baidu.com的debug log
2019/02/20 10:54:58 [Debug] [1793973147] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.101:52361
2019/02/20 10:54:58 [Info] [1793973147] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 10:54:58 [Info] [1793973147] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 10:54:58 [Debug] [2445039850] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.101:52362
2019/02/20 10:54:58 [Info] [2445039850] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 10:54:58 [Info] [2445039850] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 10:54:58 [Info] v2ray.com/core/app/dns: querying domain www.baidu.com at udp:114.114.114.114:53
2019/02/20 10:54:58 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 10:54:58 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 10:54:58 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:114.114.114.114:53
2019/02/20 10:54:58 [Info] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:114.114.114.114:53]
2019/02/20 10:54:58 [Info] v2ray.com/core/proxy/freedom: opening connection to udp:114.114.114.114:53
2019/02/20 10:54:58 [Debug] v2ray.com/core/app/dns: updating IP records for domain:www.baidu.com.
2019/02/20 10:54:58 [Debug] [1479018964] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.101:52363
2019/02/20 10:54:58 [Info] [1479018964] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 10:54:58 [Info] [1479018964] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 10:54:58 [Info] v2ray.com/core/app/dns: querying domain www.baidu.com at udp:114.114.114.114:53
2019/02/20 10:54:58 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 10:54:58 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 10:55:02 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 10:55:02 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 10:55:02 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 10:55:02 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:1.1.1.1:53
2019/02/20 10:55:02 [Info] v2ray.com/core/app/dispatcher: default route for udp:1.1.1.1:53
2019/02/20 10:55:02 [Info] v2ray.com/core/common/mux: dispatching request to udp:1.1.1.1:53
2019/02/20 10:55:02 [Info] v2ray.com/core/transport/internet/websocket: creating connection to tcp:remote.site:443
2019/02/20 10:55:03 [Info] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:v1.mux.cool:9527 via tcp:remote.site:443
2019/02/20 10:55:06 [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2019/02/20 10:55:06 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > io: read/write on closed pipe
2019/02/20 10:55:06 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 10:55:06 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 10:55:06 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 10:55:06 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:114.114.114.114:53
2019/02/20 10:55:06 [Info] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:114.114.114.114:53]
2019/02/20 10:55:06 [Info] v2ray.com/core/proxy/freedom: opening connection to udp:114.114.114.114:53
2019/02/20 10:55:10 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > EOF
2019/02/20 10:55:10 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 10:55:10 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain www.baidu.com > context deadline exceeded
以下是 DHCP时的 ipconfig/all, 是有"DNS Suffix Search List"
C:\Users\Administrator>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : win2016svr
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : abc.xyz
以下是windows 用 DHCP 时 resolve www.baidu.com的debug log
2019/02/20 11:01:10 [Debug] [2247702867] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:53337
2019/02/20 11:01:10 [Info] [2247702867] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:10 [Info] [2247702867] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:10 [Debug] v2ray.com/core/app/dns: querying DNS for: win10.ipv6.microsoft.com.
2019/02/20 11:01:10 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:10 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:1.1.1.1:53
2019/02/20 11:01:10 [Info] v2ray.com/core/app/dispatcher: default route for udp:1.1.1.1:53
2019/02/20 11:01:10 [Info] v2ray.com/core/common/mux: dispatching request to udp:1.1.1.1:53
2019/02/20 11:01:10 [Info] v2ray.com/core/transport/internet/websocket: creating connection to tcp:remote.site:443
2019/02/20 11:01:10 [Debug] [2653582769] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:49425
2019/02/20 11:01:10 [Info] [2653582769] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:10 [Info] [2653582769] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:10 [Debug] v2ray.com/core/app/dns: querying DNS for: isatap.abc.xyz.
2019/02/20 11:01:10 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:11 [Debug] [1654108169] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:49319
2019/02/20 11:01:11 [Debug] [2168035663] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:58579
2019/02/20 11:01:11 [Info] [1654108169] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:11 [Info] [1654108169] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:11 [Info] [2168035663] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:11 [Info] [2168035663] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:11 [Debug] v2ray.com/core/app/dns: querying DNS for: dns.msftncsi.com.
2019/02/20 11:01:11 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:11 [Info] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:v1.mux.cool:9527 via tcp:remote.site:443
2019/02/20 11:01:11 [Debug] v2ray.com/core/app/dns: updating IP records for domain:win10.ipv6.microsoft.com.
2019/02/20 11:01:11 [Debug] v2ray.com/core/app/dns: updating IP records for domain:dns.msftncsi.com.
2019/02/20 11:01:11 [Debug] [216770968] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:50115
2019/02/20 11:01:11 [Info] [216770968] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:11 [Info] [216770968] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:11 [Debug] v2ray.com/core/app/dns: querying DNS for: isatap.abc.xyz.
2019/02/20 11:01:11 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:13 [Debug] v2ray.com/core/app/dns: querying DNS for: isatap.abc.xyz.
2019/02/20 11:01:13 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:14 [Debug] [3388533591] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:62182
2019/02/20 11:01:14 [Info] [3388533591] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:14 [Info] [3388533591] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:14 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:14 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:14 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain isatap.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:14 [Debug] v2ray.com/core/app/dns: querying DNS for: isatap.abc.xyz.
2019/02/20 11:01:14 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:14 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:114.114.114.114:53
2019/02/20 11:01:14 [Info] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:114.114.114.114:53]
2019/02/20 11:01:14 [Info] v2ray.com/core/proxy/freedom: opening connection to udp:114.114.114.114:53
2019/02/20 11:01:15 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:15 [Debug] [1631145350] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:57018
2019/02/20 11:01:15 [Info] [1631145350] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:15 [Info] [1631145350] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:15 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain isatap.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:15 [Debug] v2ray.com/core/app/dns: querying DNS for: isatap.abc.xyz.
2019/02/20 11:01:15 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:17 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:17 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:17 [Debug] [1654977945] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:57019
2019/02/20 11:01:17 [Info] [1654977945] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:17 [Info] [1654977945] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:17 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.abc.xyz.
2019/02/20 11:01:17 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:17 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain isatap.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:17 [Debug] v2ray.com/core/app/dns: querying DNS for: isatap.abc.xyz.
2019/02/20 11:01:17 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:17 [Debug] [1227373447] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:63316
2019/02/20 11:01:17 [Info] [1227373447] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:17 [Info] [1227373447] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:17 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:17 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:18 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:18 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:18 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:18 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain isatap.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:18 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain isatap.abc.xyz > context deadline exceeded
2019/02/20 11:01:18 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:18 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:19 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:19 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:19 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:19 [Debug] [597222412] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:65085
2019/02/20 11:01:19 [Info] [597222412] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:19 [Info] [597222412] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:19 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.abc.xyz.
2019/02/20 11:01:19 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:19 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain isatap.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:19 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain isatap.abc.xyz > context deadline exceeded
2019/02/20 11:01:20 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:20 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:20 [Debug] [3180275894] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:59624
2019/02/20 11:01:20 [Info] [3180275894] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:20 [Info] [3180275894] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:21 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:21 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:21 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:21 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:21 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.abc.xyz.
2019/02/20 11:01:21 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:21 [Debug] [2385914313] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:59625
2019/02/20 11:01:21 [Info] [2385914313] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:21 [Info] [2385914313] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:21 [Info] v2ray.com/core/app/dns: querying domain www.baidu.com at udp:114.114.114.114:53
2019/02/20 11:01:21 [Debug] [4112337421] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:59626
2019/02/20 11:01:21 [Info] [4112337421] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:21 [Info] [4112337421] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:21 [Info] v2ray.com/core/app/dns: querying domain www.baidu.com at udp:114.114.114.114:53
2019/02/20 11:01:21 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 11:01:21 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:21 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain isatap.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:21 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain isatap.abc.xyz > context deadline exceeded
2019/02/20 11:01:21 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:21 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:21 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:22 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:22 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain wpad.abc.xyz > context deadline exceeded
2019/02/20 11:01:22 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:22 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:22 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:23 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:23 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain wpad.abc.xyz > context deadline exceeded
2019/02/20 11:01:23 [Debug] [2685347368] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:62474
2019/02/20 11:01:23 [Info] [2685347368] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:23 [Info] [2685347368] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:23 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:23 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.abc.xyz.
2019/02/20 11:01:23 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:24 [Debug] [1308190004] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:59395
2019/02/20 11:01:24 [Info] [1308190004] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:24 [Info] [1308190004] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:24 [Debug] v2ray.com/core/app/dns: querying DNS for: sls.update.microsoft.com.
2019/02/20 11:01:24 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:24 [Debug] v2ray.com/core/app/dns: updating IP records for domain:sls.update.microsoft.com.
2019/02/20 11:01:24 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:24 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:24 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:24 [Debug] [584693600] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:50461
2019/02/20 11:01:24 [Info] [584693600] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:24 [Info] [584693600] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:24 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:24 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:25 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:25 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain wpad.abc.xyz > context deadline exceeded
2019/02/20 11:01:25 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:25 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain www.baidu.com.abc.xyz > context deadline exceeded
2019/02/20 11:01:25 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:25 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 11:01:25 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:25 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:25 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain abc.xyz > context deadline exceeded
2019/02/20 11:01:25 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:25 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:26 [Info] [216770968] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/dns: connection ends > read udp [::]:49500: use of closed network connection
2019/02/20 11:01:26 [Info] [1631145350] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/dns: connection ends > read udp [::]:40689: use of closed network connection
2019/02/20 11:01:26 [Info] [216770968] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2019/02/20 11:01:26 [Info] [1631145350] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2019/02/20 11:01:26 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:26 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain abc.xyz > context deadline exceeded
2019/02/20 11:01:27 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:27 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain www.baidu.com.abc.xyz > context deadline exceeded
2019/02/20 11:01:27 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:27 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:28 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:28 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain abc.xyz > context deadline exceeded
2019/02/20 11:01:28 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:28 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:28 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:29 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:29 [Debug] v2ray.com/core/app/dns: querying DNS for: www.baidu.com.
2019/02/20 11:01:29 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:29 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:29 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:29 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:31 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:31 [Debug] v2ray.com/core/app/dns: querying DNS for: abc.xyz.
2019/02/20 11:01:31 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:31 [Debug] [2450543182] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:58607
2019/02/20 11:01:31 [Info] [2450543182] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:31 [Info] [2450543182] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:32 [Debug] [1201634928] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:59444
2019/02/20 11:01:32 [Info] [1201634928] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:32 [Info] [1201634928] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:32 [Debug] v2ray.com/core/app/dns: querying DNS for: fe2.update.microsoft.com.
2019/02/20 11:01:32 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:32 [Debug] v2ray.com/core/app/dns: updating IP records for domain:fe2.update.microsoft.com.
2019/02/20 11:01:32 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:32 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain abc.xyz > context deadline exceeded
2019/02/20 11:01:33 [Debug] [1370491330] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:56247
2019/02/20 11:01:33 [Info] [1370491330] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:33 [Info] [1370491330] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:33 [Debug] v2ray.com/core/app/dns: querying DNS for: client.wns.windows.com.
2019/02/20 11:01:33 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:33 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain www.baidu.com at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:33 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain www.baidu.com > context deadline exceeded
2019/02/20 11:01:33 [Debug] v2ray.com/core/app/dns: updating IP records for domain:client.wns.windows.com.
2019/02/20 11:01:33 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:33 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain abc.xyz > context deadline exceeded
2019/02/20 11:01:35 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:35 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain abc.xyz > context deadline exceeded
2019/02/20 11:01:36 [Debug] [2484438131] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:50075
2019/02/20 11:01:36 [Info] [2484438131] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:36 [Info] [2484438131] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:36 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:36 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:37 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:37 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:38 [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2019/02/20 11:01:38 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > io: read/write on closed pipe
2019/02/20 11:01:39 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:39 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:1.1.1.1:53
2019/02/20 11:01:40 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:40 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:40 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:40 [Info] v2ray.com/core/transport/internet/udp: establishing new connection for udp:114.114.114.114:53
2019/02/20 11:01:40 [Info] v2ray.com/core/app/dispatcher: taking detour [direct] for [udp:114.114.114.114:53]
2019/02/20 11:01:40 [Info] v2ray.com/core/proxy/freedom: opening connection to udp:114.114.114.114:53
2019/02/20 11:01:41 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:41 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:41 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:42 [Info] [2685347368] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/dns: connection ends > read udp [::]:48386: use of closed network connection
2019/02/20 11:01:42 [Info] [2685347368] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2019/02/20 11:01:42 [Info] [3180275894] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/dns: connection ends > read udp [::]:59345: use of closed network connection
2019/02/20 11:01:42 [Info] [3180275894] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2019/02/20 11:01:42 [Info] [1654108169] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/dns: connection ends > read udp [::]:37176: use of closed network connection
2019/02/20 11:01:42 [Info] [1654108169] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/dokodemo: connection ends > v2ray.com/core/proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2019/02/20 11:01:43 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:1.1.1.1:53 > context deadline exceeded
2019/02/20 11:01:43 [Debug] v2ray.com/core/app/dns: querying DNS for: wpad.abc.xyz.
2019/02/20 11:01:43 [Debug] v2ray.com/core/transport/internet/udp: dispatch request to: udp:114.114.114.114:53
2019/02/20 11:01:43 [Debug] [3015682989] v2ray.com/core/proxy/dokodemo: processing connection from: 192.168.198.54:65310
2019/02/20 11:01:43 [Info] [3015682989] v2ray.com/core/app/dispatcher: taking detour [dns-out] for [udp:8.8.8.8:53]
2019/02/20 11:01:43 [Info] [3015682989] v2ray.com/core/proxy/dns: handling DNS traffic to udp:8.8.8.8:53
2019/02/20 11:01:44 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:44 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain wpad.abc.xyz > context deadline exceeded
2019/02/20 11:01:45 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:45 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain wpad.abc.xyz > context deadline exceeded
2019/02/20 11:01:46 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > EOF
2019/02/20 11:01:47 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain wpad.abc.xyz at server udp:114.114.114.114:53 > context deadline exceeded
2019/02/20 11:01:47 [Info] v2ray.com/core/proxy/dns: ip query > v2ray.com/core/app/dns: returning nil for domain wpad.abc.xyz > context deadline exceeded
2019/02/20 11:01:48 [Info] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2019/02/20 11:01:48 [Info] v2ray.com/core/transport/internet/udp: failed to handle UDP input > io: read/write on closed pipe
2019/02/20 11:01:58 [Info] v2ray.com/core/common/mux: failed to read metadata > io: read/write on closed pipe
2019/02/20 11:01:59 [Info] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: connection ends > context canceled
root@ubuntu-vm:/etc/v2ray/log#
@VictoriaRaymond 看起来也是跟 https://github.com/v2ray/v2ray-core/issues/1565 有关。
@5high 的情况,nslookup 会有一个 AAAA 查询,如果查的是没有 AAAA 记录的域名,V2Ray 要等超时,而且没有返回,估计是因为这个而做了几次重复请求,出现了几次超时(不太清楚细节
@kingwilliam 的情况,有时候系统做 DNS 解析时是会先发 AAAA 查询的,但如果也是查到没 AAAA 记录的域名,V2Ray 不返回任何数据(正确处理方法是返回空 answer 加 NOERROR),系统就继续把 DNS search domain 的后缀加上继续做 AAAA 查询,这时 DNS 服务器那么返回的应该是 NXDOMAIN 了,V2Ray 依然没能正确处理,如果有多个 search domain 的话估计会轮番去查然后接着超时。
特别是后者的情况,在 Android 上貌似发生得非常频繁(至少在我的测试机上是这样的),系统经常会先发 AAAA 查询,然后 fall back 到 A 查询,同时支持 IPv4 和 IPv6 的系统估计会更加严重,目前没办法用到 Android 上。
拆分成2个rule确实正常了,但是请看下面总是请求第三次才返回记录,包括解析国内域名。
C:\WINDOWS\system32>nslookup www.sohu.com 172.xx.xx.xx DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: 172.xx.xx.xx
DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. 非权威应答: DNS request timed out. timeout was 2 seconds. 名称: www.sohu.com Addresses: 118.244.253.70 118.244.253.69 118.244.253.68
C:\WINDOWS\system32>nslookup www.facebook.com 172.xx.xx.xx DNS request timed out. timeout was 2 seconds. 服务器: UnKnown Address: 172.xx.xx.xx
DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. 非权威应答: 名称: www.facebook.com Addresses: 200:2:f3b9:bb27:: 31.13.75.17
你好,请问你的IPTABLES 是怎么设置呢?我按照网上资料尝试,始终无法转发UDP
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days
下面配置可以实现用v2ray作为DNS服务器用,但是下面配置无法让taobao等国内cdn加速网址实现自动分流。