PuppyIP Resource Center
Network & Connection Troubleshooting 10 min Published 2026-11-17

macOS v2rayN TUN Has No Internet: Diagnose Proxy Loops and System DNS Separately

If explicit SOCKS5 works but system requests fail through TUN, compare the core connection path and DNS path first. Both issues can exist at the same time and need separate verification.

macOS v2rayN TUN troubleshooting scoped DNS proxy loop DoH

Service eligibility and regional restrictions

PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.

Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.

Key Takeaways

  • Use core logs and repeated socket samples to check for a proxy self-loop; one high count alone does not establish the cause.
  • After isolating or fixing a loop, compare the Wi-Fi scoped resolver, system DNS, TUN DNS, and real HTTPS traffic.
  • A system DNS profile’s coverage depends on its installation method, network, and resolver scope; verify the affected apps.
  • A successful DNS lookup is not a substitute for a real application request; verify actual traffic through TUN.

Separate the local proxy from system TUN traffic

If an explicit SOCKS5 request reaches a site but a system request times out or fails TLS through TUN, the two requests use different paths. Confirm the active node, the core handling TUN, and the core handling the node connection, then compare an explicit proxy request with a system request to the same target.

If TUN logs repeatedly show the proxy core’s own node-entry connection being sent back through the local proxy chain, a loop may exist. If system traffic still fails after the loop is addressed, continue with DNS. Resolving one issue does not prove that the other is fixed.

Use logs and socket trends to check for a loop

When a proxy core sends its own node-entry connection back through the local proxy, connections may keep growing or produce temporary-port errors. Review Xray, sing-box, and v2rayN processes and core logs, then sample TCP sockets again after a few seconds. A loop is supported only when the growth trend, log path, and local-entry/node-entry relationship line up.

The netstat command below counts TCP entries across the whole Mac, including unrelated apps and connection states; it does not isolate Xray or sing-box connections. A rising total is only a coarse signal. Compare it with core logs, process topology, and connection targets before attributing repeated connections to a local entry or node entry. One count, Can't assign requested address, or two cores alone does not identify the cause.

Check TUN processes and whether TCP sockets keep growing

sh
ps -axo pid,comm | grep -Ei 'v2rayn|xray|sing-box'
netstat -an -p tcp | wc -l
sleep 5
netstat -an -p tcp | wc -l
Read-only process and socket-count checks. A rising count is a diagnostic signal, not proof of a loop by itself; compare it with core logs and repeated connections to the local proxy and node entry. Redact local process details before sharing.

Compare system DNS, TUN DNS, and real requests separately

Read scutil --dns and the active Wi-Fi DNS configuration to identify scoped resolvers, then compare a system lookup with the client’s TUN DNS for the same test domain. Record any difference and the request path. A successful DNS lookup proves that one query received an answer; it does not prove that the application used the intended resolver.

Send one explicit SOCKS5 HTTPS request and one HTTPS request without an explicit curl proxy. TUN may still capture the second request. If explicit proxy traffic succeeds while the system request fails, investigate DNS, routing, and TUN processing between those paths.

Compare macOS resolver state and a normal lookup

sh
scutil --dns
networksetup -getdnsservers Wi-Fi
dscacheutil -q host -a name example.com
These commands read resolver configuration and a reserved example domain. They do not clear caches or change DNS settings. Redact search domains and local network details in shared output.

Compare explicit proxy traffic with system traffic

sh
LOCAL_SOCKS_PORT='<LOCAL_SOCKS_PORT>'
curl --proxy "socks5h://127.0.0.1:${LOCAL_SOCKS_PORT}" --connect-timeout 5 --max-time 15 https://example.com/
curl --noproxy '*' --connect-timeout 5 --max-time 15 https://example.com/
These are read-only HTTPS GET requests. The second bypasses curl’s proxy setting, but macOS TUN may still capture it. Replace the local port placeholder; never paste node credentials or a private node address.

Address a confirmed core self-loop first

Consider disabling Legacy TUN Protection only when logs, topology, and connection trends together support self-capture. If the installed version supports one core for TUN, DNS, and node egress, evaluate a unified core after backing up settings. Do not assume that using both Xray and sing-box is itself an error, or treat one successful configuration as a rule for every Mac.

Fully exit and restart v2rayN after a change. Recheck the core processes, socket trend, explicit proxy request, and system request through TUN. A stable socket count shows that this metric settled; it does not show that DNS or web access has recovered.

Consider system encrypted DNS only if DNS still fails

If the loop has stopped but the system resolver still returns a different result from TUN DNS, and real HTTPS traffic connects to an unexpected address or continues to fail, consider a macOS-supported encrypted DNS profile. Review the profile’s DNS endpoints and identifiers before installation, and use only a trusted source. Do not create or install an unknown profile from a sample command.

Apple’s Device Management DNSSettings documentation says an MDM-installed setting applies only to managed Wi-Fi. On devices that support cellular networks, a manually installed setting also applies to cellular.

NetworkExtension’s NEDNSSettings.matchDomains is a separate API rule for resolver scope: matching domains use the associated resolver, while an empty string denotes the default domain. A tunnel default route can make the supplied DNS servers the default and cause matchDomains to be ignored. This API behavior is not identical to every configuration profile implementation and does not guarantee that every app uses that resolver.

Keep the profile-removal steps. If a public Wi-Fi captive portal fails, temporarily remove the profile to authenticate, then decide whether to restore it. Verify the actual resolver path for affected apps; clearing a cache cannot fix an incorrect upstream or scoped resolver.

Verify both paths and roll back the right change

After changing settings, compare system DNS, TUN DNS, explicit SOCKS5, and real HTTPS without an explicit proxy again. Confirm that system applications can reach the target and that repeated socket samples remain stable; record each result separately instead of using one as a substitute for the others.

If disabling protection or changing cores creates a new problem, exit v2rayN and restore the backed-up settings. If DoH affects captive portals or other networking, remove only the profile added for this check. Do not change MTU, routes, DNS, and core settings together, or the result will be hard to interpret.

Sources

Frequently Asked Questions

Does explicit SOCKS5 success prove that TUN works?

No. Explicit proxy and system TUN traffic take different paths. Test both and inspect the core logs.

What if pages still fail after disabling Legacy TUN Protection?

Continue with the system scoped resolver, TUN DNS, and real HTTPS checks. Stopping a loop and restoring DNS are separate acceptance conditions.

Does a high socket count prove a proxy loop?

No. Compare repeated samples with core logs, process topology, and connection targets.

Does a DNS profile control every request from every Mac app?

Not necessarily. MDM-installed settings apply only to managed Wi-Fi; manually installed settings also apply to cellular on devices that support it. The matchDomains API describes resolver selection for matching domains, and a tunnel default route may cause that rule to be ignored. Check the actual resolver path used by affected apps.