Clash Verge Rev’s system proxy switch is useful for browsers and other applications that understand macOS proxy settings, but it does not cover every type of traffic. Terminal tools, Docker containers, some development environments, game launchers, and applications with their own network stack may connect directly even when the system proxy is enabled. TUN mode solves this limitation by creating a virtual network interface and allowing the Mihomo core to process traffic that would otherwise bypass the local HTTP or SOCKS proxy.
On macOS, enabling TUN mode is not simply a matter of turning on one switch. Clash Verge Rev must receive the required system permission, the active configuration must contain compatible DNS and routing settings, and macOS must actually send traffic through the virtual interface. This guide explains a safe setup path, verification methods, common permission problems, and the differences between TUN mode and the ordinary system proxy.
How To Enable TUN Mode In Clash Verge Rev On macOS
Understand What TUN Mode Changes
A normal system proxy works at the application layer. Clash Verge Rev tells macOS to use a local HTTP, SOCKS5, or mixed port, often something such as 127.0.0.1:7890. Applications that read the macOS proxy settings then send requests to that port. Safari, many Chromium-based browsers, package managers with proxy support, and some desktop applications can work this way.
TUN mode operates at a lower level. The Mihomo core creates a virtual network interface, commonly referred to as a TUN device, and receives IP traffic routed into that interface. The core can then inspect the destination, resolve domains according to its DNS settings, apply the rule list, and send the connection directly or through a selected proxy group. This makes TUN more suitable for programs that do not expose an HTTP or SOCKS proxy option.
System proxy
Changes macOS proxy settings so applications that honor those settings connect through Clash’s local listening port.
TUN mode
Captures routed IP traffic through a virtual interface, including traffic from applications that ignore the system proxy.
Rule matching
Evaluates the destination against the active rules and sends the connection to DIRECT, a proxy group, or REJECT.
Prepare Clash Verge Rev and the Active Profile
Before changing macOS permissions, confirm that Clash Verge Rev can already start the active profile without errors. Import a working subscription or local YAML configuration, select it as the active profile, and wait until the Mihomo core is running. A configuration that fails to parse will not become reliable merely because TUN mode is enabled.
Open the profile or configuration view and check the basic runtime fields. Exact menu names can vary between Clash Verge Rev builds, but the following values illustrate the relationships that matter:
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
dns:
enable: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
nameserver:
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
tun:
enable: true
stack: mixed
auto-route: true
auto-detect-interface: true
dns-hijack:
- any:53
This is a structural example, not a configuration that should be copied without checking the installed core and provider requirements. Some subscriptions include their own dns or tun sections, while others rely on the client’s TUN controls. If the GUI generates runtime overrides, editing the downloaded subscription file may have no lasting effect because the next update can replace it.
Check the Core and Configuration Compatibility
TUN support depends on the proxy core, not only on the graphical client name. Current Clash Verge Rev installations commonly use the Mihomo core, but the bundled version and available features can differ between releases. Check the About, Core, or Runtime information area and confirm that a Mihomo core is active. If the startup log identifies an older or unexpected core, fields such as stack: mixed, DNS hijacking, or advanced TUN options may not behave as expected.
Also check whether the configuration uses a compatible DNS mode. Fake-IP can make domain-based routing more consistent for intercepted traffic, but it can expose compatibility problems in software that expects the original DNS answer. Redir-host may be preferable for a particular application or local network, although its behavior depends on the core and the surrounding routing setup. Do not switch DNS modes repeatedly while several other settings are changing; test one controlled change at a time.
- Confirm that the active profile loads successfully before enabling TUN.
- Use
mode: rulewhen you need rules to select between DIRECT and proxy groups. - Keep
allow-lan: falseunless other devices genuinely need to use this Mac as a gateway. - Ensure the DNS section does not contain invalid nameservers, conflicting fake-IP ranges, or unsupported fields.
- Record the original profile or export a backup before changing advanced settings.
Enable TUN Mode on macOS
Quit other proxy clients before starting the setup. Two applications attempting to change system proxy settings or create virtual interfaces can produce misleading results. VPN software, network filters, endpoint security tools, and DNS utilities may also install their own network extensions. Temporarily disable competing tools where possible so that the first test has only one traffic interception layer.
In Clash Verge Rev, select the active profile and open the settings area for the core or service. Locate the TUN switch, enable it, and accept the macOS permission request when it appears. Depending on the build and macOS version, the request may involve an administrator password, a system extension approval, or permission for a helper process. Approve only the request associated with the installed Clash Verge Rev application.
If macOS does not display a prompt, open System Settings and review Privacy & Security. Look for a blocked system software or network extension message and approve it if the developer and application identity are correct. Some permission changes take effect only after restarting the application; others may require logging out or restarting macOS. After approval, return to Clash Verge Rev and toggle TUN off and on once so the core retries interface creation.
Enable automatic route and interface detection when those controls are available. Automatic routing allows the core to insert the routes required for intercepted traffic, while automatic interface detection helps it choose the active Wi-Fi or Ethernet interface. On a Mac that frequently changes between Wi-Fi, Ethernet, and a VPN, manually selecting an interface may be more predictable, but it must be updated when the network changes.
Choose a Suitable TUN Stack
If Clash Verge Rev exposes a TUN stack selector, mixed is usually a practical starting point for a general macOS desktop. A system-specific stack may offer different compatibility or performance characteristics, but the best option depends on the installed Mihomo version and the applications being intercepted. Use the default recommended by the client first, then change the stack only if the log shows a specific compatibility issue.
Automatic DNS hijacking is often necessary when applications send DNS requests outside the normal system proxy path. Without consistent DNS handling, a program may resolve a domain directly while its connection is routed through Clash, or it may obtain an address that does not match the intended rule. This can appear as a wrong region, a failed connection, or a rule that seems not to match. DNS hijacking is powerful, so exclude local networks and special applications when the configuration or client provides supported exclusions.
Verify That Traffic Actually Uses TUN
A TUN indicator in the GUI is only the first check. Verify the interface, the route, the Clash connection log, and an application that previously bypassed the system proxy. Testing all four gives a more reliable result than opening one website in a browser.
Inspect the Client Status and Logs
After enabling TUN, the status area should show that the Mihomo core is running and that TUN is active. Open the connection view and generate a new request from the target application. Use a destination that has not recently been accessed so that an old cached connection does not confuse the test. The log should show the domain or IP address, the matched rule, and the policy group used for the connection.
If the request appears in the Clash connection list, the traffic reached the core. That does not yet prove that the selected proxy node worked; inspect whether the rule chose a proxy group, DIRECT, or REJECT. If the request is missing, check whether the application is using a separate VPN, a custom proxy, a Unix socket, a container network, or a persistent connection created before TUN was enabled.
Use macOS Terminal Tests
Run these commands in Terminal to inspect the virtual interface and local proxy listeners. The interface name can vary, so search the output instead of assuming a fixed name:
ifconfig | grep -A 4 -E 'utun|tun'
route -n get default
lsof -nP -iTCP:7890 -sTCP:LISTEN
scutil --proxy
The ifconfig output can show active tunnel-related interfaces, but macOS may also use utun interfaces for other VPN services. Therefore, interface presence alone is not proof that Clash is handling traffic. The lsof command checks whether a local Clash port is listening, while scutil --proxy reports the macOS system proxy state. TUN traffic may work even when the system proxy is disabled, because these are separate mechanisms.
For a controlled application-layer comparison, run curl once with an explicit SOCKS proxy and once without it:
curl --proxy socks5h://127.0.0.1:7890 https://example.com
env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY curl -I https://example.com
Replace the port with the actual mixed or SOCKS port shown by Clash Verge Rev. The first command tests the local proxy directly. The second command removes common proxy environment variables, but it does not disable TUN. If the second command still appears in the Clash connection log while TUN is active, that is evidence that traffic interception is working. Use a real destination relevant to your testing environment rather than relying only on example.com.
Handle Routing, DNS, and Local Network Exceptions
TUN mode can change more than access to external websites. Printers, NAS devices, corporate services, virtual machines, Docker networks, and local development servers may use private address ranges. A broad proxy rule can accidentally send local traffic into a proxy group, causing slow connections or complete failure.
Review the rules for private and local destinations. Common entries include GEOIP,PRIVATE,DIRECT, localhost rules, and domain rules for internal services. The exact rule syntax and database behavior depend on the core, so confirm that the referenced rule providers are available. Rule order matters: Clash evaluates rules from top to bottom, and the first matching rule normally determines the policy.
rules:
- DOMAIN,localhost,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
- GEOIP,PRIVATE,DIRECT
- MATCH,Proxy
Do not add private-network rules mechanically if your organization intentionally routes an internal range through a VPN. For example, a company may use a private address space that must remain connected to its corporate tunnel. In that situation, coordinate the TUN and VPN route design rather than allowing two tools to compete for the same destination.
DNS failures are another common source of confusion. A browser may use secure DNS independently, while a terminal tool may use macOS resolution, and TUN may redirect DNS requests to the Mihomo core. Compare the domain shown in Clash logs with the resolved address and the active DNS mode. If an application works by IP address but not by domain, investigate DNS and rule matching before changing proxy nodes.
Troubleshoot Permission and Startup Failures
When TUN refuses to start, begin with the runtime log rather than repeatedly clicking the switch. Look for messages containing terms such as permission denied, service unavailable, interface creation failed, route installation failed, address already in use, or invalid configuration. The wording differs between macOS versions and Mihomo builds, but the category usually indicates the next action.
- Permission denied: revisit System Settings → Privacy & Security, approve the relevant helper or network extension, then restart Clash Verge Rev.
- Interface creation failed: quit other VPN and proxy clients, disconnect unused network filters, and retry after a full application restart.
- Route installation failed: check whether another VPN owns the default route or whether the current user lacks the required authorization.
- Invalid configuration: disable TUN, validate YAML indentation and field names, then start the profile without advanced overrides.
- DNS timeout: review nameservers, fake-IP settings, DNS hijack options, and local-network exclusions.
- Only one application fails: inspect that application’s own proxy, VPN, DNS, sandbox, or container settings before changing global Clash rules.
Startup behavior deserves a separate check. If TUN works only after manually opening Clash Verge Rev, enable the client’s launch-at-login option if available and confirm that the core starts before the application you want to route. Some applications launch very early and create long-lived connections before Clash is ready. Restart the affected application after TUN becomes active instead of testing an already-established connection.
Know When to Use TUN or System Proxy
TUN mode is not always the better permanent choice. It can provide wider application coverage, but it also adds a virtual interface, route management, DNS interception, and possible interaction with VPN or security software. The system proxy is easier to understand and often sufficient for browsers and applications that explicitly support HTTP or SOCKS proxies.
| Requirement | System proxy | TUN mode |
|---|---|---|
| Browser traffic | Usually sufficient | Useful when the browser bypasses system settings |
| Terminal tools | Requires proxy variables or tool-specific settings | Can capture traffic that does not support a proxy |
| Docker and virtual networks | Often incomplete | May work, but requires route and DNS testing |
| Setup complexity | Lower | Higher because permissions and routes are involved |
| Interaction with VPN software | Generally easier to isolate | Requires careful ownership of routes and DNS |
A sensible daily setup is to keep the system proxy available for ordinary applications and enable TUN only when you need coverage for software that bypasses it. If both are enabled, remember that they are separate paths: an application using the system proxy enters through a local port, while intercepted traffic enters through the TUN interface. Their logs may look similar, but their failure causes can be different.
A Safe macOS TUN Checklist
Use the following sequence when setting up a new Mac or rebuilding Clash Verge Rev after an update:
- Close other proxy clients, VPN applications, and network-filter tools that may install competing extensions.
- Back up the subscription URL, YAML configuration, custom rules, and any local rule-provider files.
- Confirm that the active Mihomo core starts normally with TUN disabled.
- Check the actual mixed, HTTP, and SOCKS listening ports instead of assuming a default port.
- Enable TUN and automatic route detection in Clash Verge Rev.
- Approve the macOS permission request only after verifying the application identity and requested component.
- Restart Clash Verge Rev if the permission was approved outside the application.
- Test a new connection and confirm its domain, rule, and policy in the Clash connection log.
- Check local network access, DNS behavior, terminal traffic, and the applications that motivated the setup.
- Document any exclusions or custom routes so that a future profile update does not silently remove them.
Frequently Asked Questions
Does TUN mode replace the macOS system proxy?
No. TUN mode and the system proxy are separate traffic paths. TUN can capture applications that ignore the system proxy, while applications that explicitly use HTTP or SOCKS settings may continue to connect through Clash’s local listening port.
Why does TUN show as enabled but the terminal request is not in the Clash log?
Check whether the request uses an existing persistent connection, a separate VPN, a container network, or a custom proxy environment variable. Test a new destination, restart the terminal application, and verify that Clash’s core and virtual interface are actually running.
Can TUN mode route Docker traffic on macOS?
It may route traffic from the Docker Desktop networking layer, but results depend on Docker’s virtual network, DNS behavior, and the selected Clash rules. Test from inside a container and inspect the Clash connection log rather than assuming that host-level TUN automatically covers every container connection.
What should I do if TUN breaks local devices?
Disable TUN temporarily, restore connectivity, and review private-network rules, DNS hijacking, and conflicts with other VPN software. Add only the required local exclusions, then enable TUN and retest printers, NAS devices, development servers, and corporate resources separately.