Skip to content

[Bug]: DNS problem in TUN mode 7.14.1 #7798

Description

@aliajboy

操作系统和版本

windows 11, windows 10, ubuntu 24.04

预期情况

Connect!

实际情况

proxy mode is working fine but when I enable TUN mode all dns reject or EOF. here is the error log

复现方法

just run new 7.14.1 app, update everything, add config and try to connect with tun mode. no matter what I set dns settings. but I found that if I enable system host, it will connect without error but actually it isn't connected at all and no ip change or routing happens. another thing is disabling Auto Route in Tun Mode settings that make it connect without error but again no ip change and routing happens.
I am thinking that developers of v2rayn app doesn't test tun mode on their computer and just release a new version.

日志信息

[VLESS] Main(hide***ae:20577)
v2rayN - V7.14.1 - X64 | C:\v2rayN-windows-64\ | C:\v2rayN-windows-64\v2rayN.exe | Microsoft Windows NT 10.0.26100.0
Starting service (2025-08-18 20:17:27)...
Xray 25.8.3 (Xray, Penetrates Everything.) bd86732 (go1.24.5 windows/amd64)
A unified platform for anti-censorship.
2025/08/18 20:17:27.884497 [Info] infra/conf/serial: Reading config: &{Name:config.json Format:json}
[VLESS] Main(hide***ae:20577)
2025/08/18 20:17:29.107875 from DNS accepted https://cloudflare-dns.com/dns-query [xray.system.9ed7acb7-4026-4de1-a62d-cfdd93ade25c -> proxy]
2025/08/18 20:17:33.108029 [Error] app/dns: failed to retrieve response for www.google.com. > Post "https://cloudflare-dns.com/dns-query": context deadline exceeded
2025/08/18 20:17:33.108029 [Error] app/dns: failed to retrieve response for www.google.com. > Post "https://cloudflare-dns.com/dns-query": context deadline exceeded
2025/08/18 20:17:33.108614 from DNS accepted https://cloudflare-dns.com/dns-query [xray.system.9ed7acb7-4026-4de1-a62d-cfdd93ade25c -> proxy]
2025/08/18 20:17:33.108614 from DNS accepted https://cloudflare-dns.com/dns-query [xray.system.9ed7acb7-4026-4de1-a62d-cfdd93ade25c -> proxy]
+0330 2025-08-18 20:17:34 ERROR [3070415954 5.31s] dns: exchange failed for geo.prod.do.dsp.mp.microsoft.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:34 ERROR [1856899802 5.31s] dns: exchange failed for client.wns.windows.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:34 ERROR [769351650 5.31s] dns: exchange failed for geo.prod.do.dsp.mp.microsoft.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:34 ERROR [3068299471 5.32s] dns: exchange failed for client.wns.windows.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:34.148046 from tcp:127.0.0.1:7739 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:34.148046 from tcp:127.0.0.1:7738 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:34.148046 from tcp:127.0.0.1:7740 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:34.155768 from tcp:127.0.0.1:7747 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:34 ERROR [4095734612 5.30s] dns: exchange failed for hide.safeenatalsharq.ae. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:34 ERROR [514368265 5.30s] dns: exchange failed for hide.safeenatalsharq.ae. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:34.418351 from tcp:127.0.0.1:7756 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:34.418884 from tcp:127.0.0.1:7757 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:35 ERROR [49438500 5.30s] dns: exchange failed for geo.prod.do.dsp.mp.microsoft.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:35 ERROR [682133005 5.30s] dns: exchange failed for geo.prod.do.dsp.mp.microsoft.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:35.121818 from tcp:127.0.0.1:7762 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:35.121818 from tcp:127.0.0.1:7763 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:35 ERROR [2605915176 5.30s] dns: exchange failed for client.wns.windows.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:35 ERROR [1351029925 5.30s] dns: exchange failed for client.wns.windows.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:35.136220 from tcp:127.0.0.1:7768 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:35.136220 from tcp:127.0.0.1:7769 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:35 ERROR [2932348556 5.30s] dns: exchange failed for mtalk.google.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:35 ERROR [2895399453 5.30s] dns: exchange failed for mtalk.google.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:35.203759 from tcp:127.0.0.1:7774 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:35.203759 from tcp:127.0.0.1:7775 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:35 ERROR [4208264467 5.30s] dns: exchange failed for hide.safeenatalsharq.ae. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:35 ERROR [3670587490 5.30s] dns: exchange failed for hide.safeenatalsharq.ae. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:35.433514 from tcp:127.0.0.1:7780 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:35.433514 from tcp:127.0.0.1:7781 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:36 ERROR [682133005 6.30s] dns: exchange failed for geo.prod.do.dsp.mp.microsoft.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:36 ERROR [49438500 6.30s] dns: exchange failed for geo.prod.do.dsp.mp.microsoft.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:36.125786 from tcp:127.0.0.1:7791 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:36.126336 from tcp:127.0.0.1:7792 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:36 ERROR [1351029925 6.30s] dns: exchange failed for client.wns.windows.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:36 ERROR [2605915176 6.30s] dns: exchange failed for client.wns.windows.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:36.140226 from tcp:127.0.0.1:7797 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:36.140226 from tcp:127.0.0.1:7798 accepted tcp:10.10.34.36:443 [socks -> direct]
+0330 2025-08-18 20:17:36 ERROR [3644110286 5.30s] dns: exchange failed for mtalk.google.com. IN A: dial tcp 10.10.34.36:443: i/o timeout
+0330 2025-08-18 20:17:36 ERROR [2744541374 5.30s] dns: exchange failed for mtalk.google.com. IN AAAA: dial tcp 10.10.34.36:443: i/o timeout
2025/08/18 20:17:36.204135 from tcp:127.0.0.1:7803 accepted tcp:10.10.34.36:443 [socks -> direct]
2025/08/18 20:17:36.204135 from tcp:127.0.0.1:7804 accepted tcp:10.10.34.36:443 [socks -> direct]

here is config.json:

{
  "log": {
    "loglevel": "error"
  },
  "dns": {
    "servers": [
      {
        "address": "https://dns.alidns.com/dns-query",
        "domains": [
          "hide.safeenatalsharq.ae"
        ],
        "skipFallback": true
      },
      {
        "address": "https://dns.alidns.com/dns-query",
        "domains": [
          "geosite:private"
        ],
        "skipFallback": true
      },
      {
        "address": "https://dns.alidns.com/dns-query",
        "domains": [
          "geosite:ir"
        ],
        "skipFallback": true,
        "expectedIPs": [
          "geoip:ir"
        ]
      },
      "https://cloudflare-dns.com/dns-query"
    ]
  },
  "inbounds": [
    {
      "tag": "socks",
      "port": 10808,
      "listen": "127.0.0.1",
      "protocol": "mixed",
      "sniffing": {
        "enabled": false,
        "destOverride": [
          "http",
          "tls",
          "quic",
          "fakedns"
        ],
        "routeOnly": false
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "allowTransparent": false
      }
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "hide.safeenatalsharq.ae",
            "port": 20577,
            "users": [
              {
                "id": "635c65b3-c555-4fda-841d-ec118a842341",
                "email": "t@t.tt",
                "security": "auto",
                "encryption": "none"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": false,
          "serverName": "hide.safeenatalsharq.ae",
          "alpn": [
            "h2"
          ],
          "fingerprint": "chrome"
        }
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom"
    },
    {
      "tag": "block",
      "protocol": "blackhole"
    }
  ],
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api"
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "ip": [
          "8.8.8.8"
        ]
      },
      {
        "type": "field",
        "port": "443",
        "network": "udp",
        "outboundTag": "block"
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "protocol": [
          "bittorrent"
        ]
      },
      {
        "type": "field",
        "outboundTag": "block",
        "domain": [
          "geosite:category-ads-all"
        ]
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "ip": [
          "geoip:private"
        ]
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "geosite:private"
        ]
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "domain": [
          "geosite:ir"
        ]
      },
      {
        "type": "field",
        "outboundTag": "direct",
        "ip": [
          "geoip:ir"
        ]
      },
      {
        "type": "field",
        "port": "0-65535",
        "outboundTag": "proxy"
      }
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions