{"action":"opened","issue":{"url":"https://api.github.com/repos/2dust/v2rayNG/issues/192","repository_url":"https://api.github.com/repos/2dust/v2rayNG","labels_url":"https://api.github.com/repos/2dust/v2rayNG/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/2dust/v2rayNG/issues/192/comments","events_url":"https://api.github.com/repos/2dust/v2rayNG/issues/192/events","html_url":"https://github.com/2dust/v2rayNG/issues/192","id":392682882,"node_id":"MDU6SXNzdWUzOTI2ODI4ODI=","number":192,"title":"关于v2rayNG对DNS查询的处理方式的一些疑惑","user":{"login":"lianQor","id":46003262,"node_id":"MDQ6VXNlcjQ2MDAzMjYy","avatar_url":"https://avatars3.githubusercontent.com/u/46003262?v=4","gravatar_id":"","url":"https://api.github.com/users/lianQor","html_url":"https://github.com/lianQor","followers_url":"https://api.github.com/users/lianQor/followers","following_url":"https://api.github.com/users/lianQor/following{/other_user}","gists_url":"https://api.github.com/users/lianQor/gists{/gist_id}","starred_url":"https://api.github.com/users/lianQor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lianQor/subscriptions","organizations_url":"https://api.github.com/users/lianQor/orgs","repos_url":"https://api.github.com/users/lianQor/repos","events_url":"https://api.github.com/users/lianQor/events{/privacy}","received_events_url":"https://api.github.com/users/lianQor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-19T16:34:35Z","updated_at":"2018-12-19T16:34:35Z","closed_at":null,"author_association":"NONE","body":"### 预期行为\r\n所有被DNS污染的网站均能被正确解析，如果可能的话不要在本地发生DNS leak。\r\n\r\n### 实际行为\r\n开启v2rayNG后，部分被污染域名仍被解析到内网地址(如127.0.0.1)，不能正常连接。在安卓版Firefox的 about:networking#dnslookuptool 页面进行DNS查询，同时在服务器端观察输出的log，发现并无发送向v2rayNG中设置的DNS服务器的流量。在浏览网页时，在服务器端能看到一些DNS查询流量，在客户端看不到，可能是路由规则“IPIfNonMatch”在域名没有匹配到规则时发起的查询？由以上几点，似乎是先通过本机开启VPN之前的DNS nameserver进行的解析，再匹配的规则？\r\n\r\n### 复现方法\r\n使用的网络为移动LTE，由于各地的ISP对DNS解析的处理不同，可能被解析为内网地址的网址名单也不同，需要具体分析。\r\n\r\n### 日志信息\r\n日志太多了，截取了一些粘贴上来，如果有需要可以都传上来。\r\n<details>\r\n\r\n通过 `adb logcat com.v2ray.ang` 获取日志。请自行删减日志中可能出现的敏感信息。\r\n```\r\n12-19 20:56:06.984 10268 10268 D V2rayConfigUtil: {\"dns\":{\"servers\":[\"1.1.1.1\",\"1.1.1.1\",{\"address\":\"223.5.5.5\",\"domains\":[\"geosite:cn\"],\"port\":53}]},\"inbounds\":[{\"port\":10808,\"protocol\":\"socks\",\"settings\":{\"auth\":\"noauth\",\"udp\":true},\"sniffing\":{\"destOverride\":[\"http\",\"tls\"],\"enabled\":true}}],\"log\":{\"loglevel\":\"warning\"},\"outbounds\":[{\"mux\":{\"enabled\":false},\"protocol\":\"vmess\",\"settings\":{\"vnext\":[{\"address\":\"SERVER_IP\",\"port\":SERVER_PORT,\"users\":[{\"alterId\":64,\"id\":\"UUID\",\"security\":\"aes-128-gcm\"}]}]},\"streamSettings\":{\"network\":\"tcp\",\"security\":\"\"},\"tag\":\"proxy\"},{\"protocol\":\"freedom\",\"settings\":{},\"tag\":\"direct\"},{\"protocol\":\"blackhole\",\"settings\":{\"response\":{\"type\":\"http\"}},\"tag\":\"block\"}],\"routing\":{\"settings\":{\"domainStrategy\":\"IPIfNonMatch\",\"rules\":[{\"ip\":[\"geoip:private\"],\"outboundTag\":\"direct\",\"type\":\"field\"}]},\"strategy\":\"rules\"}}\r\n12-19 20:56:07.155 10304 10329 I GoLog   : loading v2ray config\r\n12-19 20:56:07.720 10304 10331 I GoLog   : file exists\r\n12-19 20:56:07.720 10304 10331 I GoLog   : new v2ray core\r\n12-19 20:56:07.724 10304 10331 I GoLog   : start v2ray core\r\n12-19 20:56:07.725 10304 10331 I GoLog   : run vpn apps\r\n12-19 20:56:07.725 10304 10331 I GoLog   : Preparing DNS, UUID:SERVER_PORT\r\n12-19 20:56:07.726 10304 10323 I GoLog   : 2018/12/19 12:56:07 [Warning] v2ray.com/core: V2Ray 4.10 started\r\n12-19 20:56:07.790 10304 10334 I GoLog   : (*net.UDPAddr)(0x400289b740)(120.209.138.64:SERVER_PORT)\r\n12-19 20:56:07.866  3202  8212 D ConnectivityService: registerNetworkAgent NetworkAgentInfo{ ni{[type: VPN[], state: CONNECTING/CONNECTING, reason: (unspecified), extra: (none), failover: false, available: false, roaming: false]}  network{256}  nethandle{1099528063710}  lp{{InterfaceName: tun0 LinkAddresses: [26.26.26.1/24,]  Routes: [0.0.0.0/0 -> 0.0.0.0 tun0,::/0 unreachable,26.26.26.0/24 -> 0.0.0.0 tun0,] DnsAddresses: [] Domains:  MTU: 0}}  nc{[ Transports: VPN Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED]}  Score{0}  everValidated{false}  lastValidated{false}  created{false} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} clat{null} }\r\n12-19 20:56:07.887  3202  3687 D ConnectivityService: Setting DNS servers for network 256 to []\r\n12-19 20:56:07.891 10304 10323 I GoLog   : unforgivenessCloser() <-v.unforgivnesschan\r\n12-19 20:56:07.892 10304 10323 I GoLog   : /data/user/0/com.v2ray.ang/tun2socks\r\n12-19 20:56:07.892 10304 10323 I GoLog   : [--netif-ipaddr 26.26.26.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:10808 --tunfd 46 --tunmtu 1500 --sock-path /dev/null --loglevel 1 --enable-udprelay]\r\n12-19 20:56:07.969 10304 10323 I GoLog   : EscortRun Waiting....\r\n12-19 20:56:08.885 10304 10328 I GoLog   : 2018/12/19 12:56:08 tcp:127.0.0.1:43004 accepted tcp:52.20.119.250:443 \r\n12-19 20:56:08.887 10304 10329 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:09.086 10304 10321 I GoLog   : 2018/12/19 12:56:09 tcp:127.0.0.1:43010 accepted tcp:54.187.176.55:443 \r\n12-19 20:56:09.448 10304 10329 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:09.448 10304 10321 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:10.478 10304 10332 I GoLog   : 2018/12/19 12:56:10 tcp:127.0.0.1:43018 accepted tcp:91.108.56.166:5222 \r\n12-19 20:56:10.480 10304 10328 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:15.255 10304 10350 I GoLog   : 2018/12/19 12:56:15 tcp:127.0.0.1:43024 accepted tcp:64.233.189.188:5228 \r\n12-19 20:56:15.441 10304 10332 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:16.413 10304 10329 I GoLog   : 2018/12/19 12:56:16 tcp:127.0.0.1:43030 accepted tcp:54.209.210.168:443 \r\n12-19 20:56:16.419 10304 10350 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:16.564  3202 10361 D NetworkMonitor/NetworkAgentInfo [MOBILE (LTE) - 254]: PROBE_DNS connectivitycheck.gstatic.com 4ms OK 203.208.40.87\r\n12-19 20:56:16.564  3202 10360 D NetworkMonitor/NetworkAgentInfo [MOBILE (LTE) - 254]: PROBE_DNS www.google.com 5ms OK 31.13.83.1\r\n12-19 20:56:25.940 10304 10328 I GoLog   : 2018/12/19 12:56:25 tcp:127.0.0.1:43042 accepted tcp:31.13.69.33:443 \r\n12-19 20:56:25.940 10304 10332 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:26.197 10304 10328 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:28.579 10304 10329 I GoLog   : 2018/12/19 12:56:28 tcp:127.0.0.1:43050 accepted tcp:203.208.40.67:443 \r\n12-19 20:56:28.781 10304 10332 I GoLog   : Not Using Prepared: TCP, SERVER_IP:SERVER_PORT\r\n12-19 20:56:30.586  3202 10382 D NetworkMonitor/NetworkAgentInfo [MOBILE (LTE) - 254]: PROBE_DNS connectivitycheck.gstatic.com 2ms OK 203.208.40.87\r\n12-19 20:56:30.618  3202 10381 D NetworkMonitor/NetworkAgentInfo [MOBILE (LTE) - 254]: PROBE_DNS www.google.com 35ms OK 31.13.68.22\r\n12-19 20:56:42.729  3202 10396 D NetworkMonitor/NetworkAgentInfo [MOBILE (LTE) - 254]: PROBE_DNS www.google.com 5ms OK 31.13.68.22\r\n12-19 20:56:42.759  3202 10397 D NetworkMonitor/NetworkAgentInfo [MOBILE (LTE) - 254]: PROBE_DNS connectivitycheck.gstatic.com 35ms OK 203.208.40.87\r\n\r\n```\r\n</details>\r\n\r\n### 环境信息\r\nLineageOS 15.1(Android 8.1), v2rayNG version 0.6.5\r\n### 额外信息（可选）\r\n\r\n"}}
{"actor":{"display_login":"lianQor"}}