Connectivity Troubleshooting · Clash Technical Blog

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

If a Mac on an iPhone Personal Hotspot connects directly but Clash Verge Rev TUN reports an empty interface, identify the outgoing adapter and fix it with a persistent override. Check the fields, DNS, and real requests. If problems arise, remove the override and restore the original settings.

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

If your Mac connects directly through a phone hotspot but cannot load pages with TUN enabled, the later DNS error may follow from a missing outbound adapter. Keep the startup logs and use the system routes to identify the adapter carrying hotspot traffic before deciding whether a temporary fixed interface is appropriate.

Direct hotspot access works, but TUN logs show an empty interface

On an Intel Mac connected to an iPhone personal hotspot, compare with Clash Verge Rev TUN off and on to confirm whether direct access works while proxy access fails. Official issue #7576 used client v2.5.2 and Mihomo v1.19.29; other Mac setups should proceed only if 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.

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.

Use the logs to choose interface or permission checks

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

Set the outbound adapter in Merge and disable automatic adapter detection

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.

After restarting, check interface errors, DNS, and pages

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

    Using the same node, make a new DNS query and HTTPS request. Check whether the connections page shows the corresponding domain, rule, and actual exit.

  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.

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

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.

Steps to undo this interface override

  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.

References