For users whose nodes connect successfully but who aren't sure which resolver handles domain lookups. First, record the recursive resolvers used by the same app with and without the proxy, then review how traffic is routed on desktop and Android. When testing, distinguish the browser's encrypted DNS, direct LAN traffic, and node address lookups.
How to identify a DNS leak
Your proxy exit and DNS exit are separate paths to check. A browser may ask the system resolver for an IP address, then send the connection through the proxy. The site will show the proxy's exit IP, while DNS queries may still be handled by your router or ISP's recursive resolver. This is a leak only if your rules require proxied domains to use a designated remote resolver. Local domains intentionally routed directly are a separate case.
Bottom line: check the query path, not just the port
No outbound traffic on port 53 means only that no traditional DNS traffic was detected; it doesn't prove DNS queries went through the tunnel. A browser may connect directly to a DoH service over port 443. Conversely, a connection on port 443 alone doesn't prove it's DoH.
Compare results to identify the DNS egress
- Record a direct-connection baseline. On a test network where direct access is allowed, open a DNS leak test site in the browser you use and note the site's exit IP, the recursive resolver IP and its organization, and the browser's current Secure DNS setting. The test reveals your exit information to the testing service. Use a test domain generated by the site; don't submit internal domains.
- Retest with the proxy enabled. Keep the network, browser, and node unchanged. Run one test with only the system proxy enabled, then turn it off and run another with only TUN enabled. Start a fresh test each time so the site generates a new query name; refreshing old results may use cached data. If Secure DNS is enabled, compare results with it on and off as a separate test.
- Understand what the results show. A test site usually reports the recursive resolvers that queried its authoritative DNS server, not the full path between your device and those resolvers. Multiple IPs may belong to the same DNS service, and a different geographic location doesn't by itself indicate a leak. If both direct and proxied tests use the same public DNS service, identical results don't prove they used the same route.
- Use logs to fill in the gaps. Check client logs for DNS, outbound connection, and timeout entries around the test time. If you can monitor your device's physical network adapter, check for connections to unexpected resolvers during the test. The command
nslookupshows only the lookup path used by that command; it can't replace testing in a browser or a specific Android app.
v2rayN: Remote DNS, domain routing, and TUN
On desktop, first check the active core and existing routing configuration. The Chinese menu names below are common in the v2rayN desktop app; fields may vary by release, core, and configuration mode. The remote DNS address, the outbound route for DNS queries, and whether app traffic is intercepted are separate settings. Changing one doesn't replace the others.
Note your current settings
In the main window, go to Settings → Parameter Settings to check the core and local listener settings. Then open Settings → Routing Settings and note the active profile and rule order. If you're using a custom core configuration, check the configuration actually loaded; don't assume the app's general options override it.
Set up remote DNS
Go to Settings → DNS Settings and enter the full DoH URL, including its path, in the configuration for the active core. If the configuration has separate remote and direct resolvers, send queries that should use the proxy to the remote resolver, and check that connections to it use the proxy outbound. An HTTPS URL encrypts the connection but doesn't guarantee that it goes through the proxy.
Check the domain routing strategy
In Settings → Routing Settings, review the domain rules and routing strategy. For Xray routing,
AsIsdoesn't resolve domains just to check IP rules;IPIfNonMatchcan resolve a domain and then check IP rules if no domain rule matches. If you only need to route by domain, tryAsIsfor comparison. If your routing depends on IP rules, don't change the current strategy without testing. This setting can't prevent an app from resolving domains on its own.Route traffic through TUN and retest
Turn on Enable TUN in the main window and grant any permissions required by your platform. If your version has a TUN DNS interception option, make sure it captures traditional DNS from the target apps, and check IPv4, IPv6, and network adapter exclusions. Test TUN on its own first, then restore your usual proxy setup. Also verify that LAN devices remain accessible.
v2rayNG: Android VPN and per-app routing
- Set up remote DNS. In v2rayNG, open ☰ → Settings and find Remote DNS. Enter a resolver in a format supported by your version. If your version accepts DoH URLs, enter the full address provided by the service. If there's also a Direct DNS field, reserve it for queries you intentionally want to send directly; the two fields aren't interchangeable fallback addresses.
- Make sure the app is routed through the VPN. Return to the main screen, select an available node, tap Connect, and approve Android's VPN permission prompt. Android uses its system VPN interface to create a virtual network, so there's no need to look for a desktop-style TUN toggle. If per-app proxying is enabled, check whether the browser is included or excluded, then retest in that same app.
- Distinguish the three DNS settings. The client's remote DNS, Android's Private DNS, and the browser's Secure DNS each serve a different purpose. Note the original settings and change only one at a time on a trusted network. If the browser sends its own DoH queries, the test site may report the resolver selected by the browser even when the queries pass through the VPN. That's different from traffic bypassing the VPN.
- Test network changes and disconnects. Retest on both Wi-Fi and mobile data, paying attention to what happens while reconnecting. If all internet access must go through the VPN, check whether Always-on VPN and Block connections without VPN are available in Android's VPN settings. After enabling them, also test per-app exclusions and LAN access so policy-related blocking isn't mistaken for a DNS issue.
Core logs and common questions
lookup example.com: no such host
Cause: This log means the lookup didn't return a usable result; use the domain shown in the actual log. Fix: First determine whether the name in the log belongs to the node, the resolver, or the destination. Then check its spelling and DNS resolution path.
context deadline exceeded
Cause: The operation exceeded its time limit. Treat it as a DNS timeout only if it appears in logs related to DNS queries. Fix: Keep the node unchanged, restore the previous working DNS settings for comparison, and check the new resolver's outbound route and bootstrap DNS.
Why does the test still show my ISP's DNS after my exit IP changes?
Compare results from the same browser with the system proxy and TUN. If the resolver from your direct-connection baseline appears only with the system proxy, check whether the app resolves domains through the system before handing connections to the proxy. Then verify that TUN covers the app and both IP address families.
Can't access internal company domains after enabling TUN?
Check whether the issue affects only domain suffixes that require internal DNS. If your core supports choosing resolvers by domain, send only approved internal suffixes to the internal resolver and keep direct routes to internal services. After making changes, test one internal domain and one external domain. Don't restore intranet access by disabling interception globally.
The test lists multiple resolver IPs. Do I need to replace them all?
Don't judge by the number of addresses. Compare their organizations, the browser's Secure DNS settings, and results from repeated tests. Investigate the route only for unexpected resolvers. If the IPs change but all belong to the expected service, use logs to confirm that connections take the intended outbound route.