Connectivity Troubleshooting · Clash Technical Blog

How to Fix Clash Verge Rev TUN on a macOS Mobile Hotspot

If Clash Verge Rev TUN fails on an iPhone Personal Hotspot despite normal Mac access, identify the outbound interface, pin it with a reversible override, and verify DNS.

  • Clash Verge Rev
  • macOS
  • Mobile hotspot
  • TUN
On this page

Pin the outbound interface only for this set of log messages

This article covers one specific failure: after an Intel Mac connects to an iPhone Personal Hotspot, direct system networking works but Clash Verge Rev cannot connect with TUN enabled. The environment in official issue #7576 uses client v2.5.2 and Mihomo v1.19.29. Other Mac systems should follow this procedure only when the same logs appear.

The key is not the webpage timeout. Immediately after TUN starts, the log shows get empty name, then <invalid>, then interface not found, followed by dns resolve failed. Automatic egress detection first receives an empty interface, leaving DNS and proxy connections without a usable egress.

First confirm that this is the same issue

SymptomInterpretationNext step
Direct system connectivity returns immediately after TUN is disabledThe node and system network are at least not failing togetherContinue by checking the outbound interface
The log first shows get empty name or <invalid>Automatic detection did not obtain an egress in timeQuery the current physical adapter
The log contains only operation not permittedThis is a permissions or service-mode issueDo not change the outbound interface
Neither the system proxy nor TUN can connectThe node, subscription, or core may have failedTroubleshoot the shared failure first
TUN egress path on a mobile hotspot
  1. iPhone Personal HotspotProvides the current network egress for the Mac
  2. macOS physical adapterThe route command shows the real interface
  3. Mihomo TUNUse that interface for DNS and connections
  4. Destination websiteCompletes resolution, rule matching, and access

If automatic detection receives an empty value in the second step, subsequent DNS and egress fail. Pinning an interface applies only to this log pattern.

Use the system route to identify the adapter used by the hotspot

First disable TUN so macOS returns to a directly connected state, then query the route to a public address in Terminal. The interface in the output is the physical adapter currently carrying hotspot traffic. Do not guess the name from someone else's screenshot.

View the current default egress and note the value after interface
route -n get 223.5.5.5

Record only the actual result on this Mac

  1. Confirm direct connectivity

    Disable TUN and the system proxy, then open an ordinary webpage so the route is not read from a failed state.

  2. Find the interface line

    The issue reporter saw en0, but Wi-Fi, a USB adapter, or a wired connection may have a different name.

  3. Run it once more

    Disconnect and reconnect the mobile hotspot, then query again. Confirm that the interface name remains unchanged before writing the override.

Override only two fields in Merge

Mihomo uses top-level interface-name for outbound traffic and places auto-detect-interface under tun. Open Merge or the override for the current Profile and add only these two keys. Do not copy the issue's complete TUN, DNS, or IPv6 configuration, which could replace settings that already work.

Replace en0 with the actual interface from the previous step, then save Merge
interface-name: en0
tun:
  auto-detect-interface: false

en0 is only an example. Do not put it in tun.device either. Official documentation says the macOS TUN device name begins with utun, while interface-name is the interface Mihomo uses to send traffic outward; they serve different purposes.

Restart the core, inspect the log first, then test DNS and webpages

After saving the override and passing configuration validation, restart the core completely, then enable TUN. Inspect the newly generated log first rather than relying on the switch color. After the interface error disappears, make a new DNS query and HTTPS request.

Validate in the same order

  1. Reload the current configuration

    Confirm that the original Profile and node remain selected. Do not change the subscription, DNS, or proxy mode at the same time.

  2. Enable TUN again

    Read the log from this startup and check whether <invalid> or interface not found still appears.

  3. Make two types of requests

    Open an ordinary webpage first, then check whether the Connections page shows the domain, rule, and actual egress.

  4. Disable TUN for comparison

    Confirm that direct system connectivity still recovers, so a cache hit is not mistaken for a completed fix.

The empty-interface and interface not found messages disappear, and webpages recover

Pinning the interface has bypassed this automatic-detection failure; continue with network-switch validation.

interface not found still appears

The interface name is wrong or has changed. Disable TUN and query the system route again.

The interface error disappears, but dns resolve failed remains

Stop adding DNS fields. Remove the override and troubleshoot DNS as a separate issue.

Configuration validation fails

Check that interface-name is at the top level and that indentation under tun is two spaces.

Recheck after switching networks when the interface is pinned

Manually selecting the interface disables automatic detection. It can temporarily stabilize a mobile-hotspot environment, but after switching back to home Wi-Fi, a USB network, or a wired connection, the original interface may no longer be the default egress. If it is not updated, TUN can remain enabled without establishing new connections.

Handling network changes

Query resultAction
interface matches the override valueKeep the current setting, then test DNS and webpages
interface has changed to another nameDisable TUN, update interface-name, and restart the core
You will switch networks frequentlyRemove the pinned-interface override, restore automatic detection, and observe whether the issue returns
Another VPN or TUN is running at the same timeDisable and test them separately first; do not hide a routing conflict behind one fixed value

If it does not work, remove the override and restore the original configuration

If pinning the correct interface still fails, automatic detection is not the only cause. Do not keep adding DNS, routing, or script settings from unknown sources. Restore the Profile from before the change.

Complete rollback order

  1. Disable TUN

    Wait for ordinary system networking to recover before editing Merge, so the old core does not keep using the failed route.

  2. Remove the two override keys

    Remove top-level interface-name and the tun.auto-detect-interface added in this procedure, restoring the original content.

  3. Reload the original Profile

    Keep the original node and rules, then complete one request through the system proxy to confirm that basic connectivity still works.

  4. Retain redacted logs

    Record the macOS, client, and core versions plus the first error after enabling TUN, and submit them to the corresponding official issue.

Five checks to confirm TUN works again on the hotspot

Final validation checklist

  • With the system proxy disabled and only TUN enabled, both the browser and terminal create new connections
  • The log no longer shows get empty name, <invalid>, or interface not found
  • The Connections page shows the expected domain, rule, and proxy or direct egress
  • After disconnecting and reconnecting the same hotspot, the interface name still matches the override
  • Direct system connectivity returns immediately after TUN is disabled without restarting the Mac

References