Where traffic enters: app proxy settings vs. a virtual network adapter

System proxy: apps connect to a local proxy port

On Windows 11 24H2, go to Settings → Network & internet → Proxy → Manual proxy setup and check Use a proxy server. When you enable System Proxy in a desktop client, the usual address is 127.0.0.1 with a local HTTP or mixed proxy port. For example, mixed-port: 7890 in the configuration means the same listening port accepts both HTTP and SOCKS connections. 7890 is just an example; use the port shown in your client.

Browsers that use the system proxy send HTTP requests to the local port. For HTTPS, they typically establish a tunnel with CONNECT, then perform a TLS handshake with the destination site through that tunnel. Apps that ignore this setting continue to connect according to their own networking logic. A system proxy also does not convert UDP datagrams sent directly by an app into HTTP proxy traffic.

TUN: the OS routes IP packets through a virtual network adapter

A Clash core with TUN support, such as mihomo, receives IP packets that match its routing rules through a virtual network adapter, then processes them according to the protocol and rules. Apps still connect to their original destinations; they don't need to know about 127.0.0.1:7890. On Windows, enabling TUN usually requires administrator privileges, or a service installed by the client to create the interface and configure routes. After turning it on in the UI, confirm that the interface was actually created.

Coverage depends on which addresses, interfaces, and IP versions the routes include. Excluded destinations, connections using other interfaces, and IPv6 traffic outside the TUN routes may never reach the core. Even when UDP is captured, forwarding it through a proxy depends on whether the selected outbound protocol and server support UDP.

Which apps are covered: browsers, command-line tools, games, and UWP apps

Scenario System Proxy TUN
Browsers such as Edge Usually uses system settings by default; app policies or proxy exceptions can change this behavior. Can capture direct connections covered by the routes. For a clean test, turn off System Proxy first.
Tools such as curl and Git Depends on the tool's proxy options, environment variables, or configuration. Don't assume it reads system settings. Can capture connections covered by the routes, making it useful for testing several tools that ignore the system proxy.
Games and voice chat Launcher web requests may use it, but gameplay and voice chat often use separate UDP connections. Can capture UDP covered by the routes. Check the outbound used for login, gameplay, and voice chat separately.
UWP apps Depends on the networking API and app restrictions. AppContainer loopback restrictions may prevent connections to a local proxy port. Connections made to their original destination addresses can be captured by routing; app network permissions still apply.

Choose a mode based on the connection that's failing

  • Browser works, but Git doesn't: Start by checking Git itself. Run git config --show-origin --get http.proxy to see Git's HTTP proxy setting and where it came from, then check the proxy environment variables in your current terminal. If only one tool needs a proxy, configuring it directly is usually easier to troubleshoot and won't change system routing.
  • The launcher signs in, but the game disconnects after a match starts: Check the connection log while the problem is happening. First see whether the relevant UDP connection reaches the core, then check the matching rule and outbound. Reaching the launcher's login page only proves that connection works; it says nothing about the game's UDP path.
  • Desktop browsers work, but a UWP app doesn't: Don't assume every app installed from the Microsoft Store is a UWP app. Test one entry point at a time: reproduce the issue with only System Proxy enabled, then turn it off and try again with only TUN enabled. If only the second test succeeds, check whether the app uses the system proxy and whether loopback restrictions apply. The comparison alone can't tell you which is the cause.

Windows comparison test: check the proxy port and TUN routing separately

Keep the configuration, policy group outbound, and test address the same. After switching entry points, start a new connection instead of reusing an existing browser tab. First confirm the port the client is listening on, and note the original system proxy settings so you can restore them afterward.

Test 1: Turn off TUN and specify the proxy explicitly

Run the command below in PowerShell, replacing 7890 with the client's HTTP or mixed proxy port. Put -q first to ignore curl's default configuration file. If NO_PROXY in the current terminal includes the test domain, use a test environment without that exclusion.

curl.exe -q -v --connect-timeout 10 --max-time 20 --proxy http://127.0.0.1:7890 https://example.com/

Check the verbose output first to confirm the connection targets 127.0.0.1:7890, then check whether the client logs a connection to example.com:443. If the local port won't connect, check that it's listening and verify its type. If the local connection succeeds but the request fails, check the rules, outbound, and DNS resolution. This command tests the local proxy entry point; it doesn't test whether other apps use the Windows system proxy settings.

Test 2: Turn off System Proxy and enable TUN only

Remove the explicit proxy option and use --noproxy "*" to make this request bypass curl's proxy settings, then try the same test address. “Bypass the proxy” applies only to curl here; the OS can still route packets through TUN.

curl.exe -q -v --connect-timeout 10 --max-time 20 --noproxy "*" https://example.com/

A successful response doesn't prove TUN captured the traffic—the destination might also be reachable directly. Match the request time, destination domain or IP, and port 443 against the client's connection log. If there's an entry, check the matching rule and outbound. If there isn't, first confirm the UI can show the new connection, then check the virtual network adapter, route coverage, and exclusions. For short-lived connections, use the runtime log for the same time window as a cross-check.

TUN is enabled but the network is broken: check the interface, DNS, and outbound

  1. Check the interface and routes. Start with the client startup log and look for permission errors or failures to create the interface or configure routes. On Windows, use Get-NetIPInterface and Get-NetRoute to inspect interfaces and routes, respectively. Compare the changes before and after enabling TUN, then check whether the failing destination uses IPv4 or IPv6. Don't look only for a 0.0.0.0/0 route; a more specific prefix may cover the destination.
  2. Check DNS resolution. If the error is Could not resolve host, investigate DNS before changing the outbound. In mihomo, tun.dns-hijack can send matching DNS requests to the core; for example, any:53 covers UDP port 53. It doesn't turn a browser's own encrypted DNS requests over HTTPS into UDP port 53 queries. With fake-ip enabled, apps seeing synthetic addresses is expected. If old results are still being reused after switching modes, restart the affected app before trying a new request.
  3. Check the rules and outbound capabilities. If the core logged the destination connection, review the matching rule, the policy group's current selection, and any outbound errors. Domain-based rules need the core to know the domain; if it only has the destination IP, don't assume a domain rule will match. If TCP works but UDP fails, check the UDP connection log, outbound protocol, and server support. A single website speed test isn't a substitute.
  4. Check other network software and local network access. Another VPN may change routes or DNS, sending traffic somewhere unexpected. Keep managed settings required by your workplace; if needed, retest after restoring the original network state. If only a printer, NAS, or intranet domain fails, check the route to that specific destination and which DNS resolver is used. A DIRECT rule changes the core's outbound action; it doesn't exclude an address at the OS routing level.

When reviewing mihomo configuration, treat tun.enable and tun.auto-route as separate settings: the first enables TUN, while the second lets the core configure related routes automatically. A desktop client may generate or override these fields through its UI. If the toggle doesn't match the subscription file, check the runtime configuration or startup log; don't rely on the subscription text alone to determine the current state.

Choosing a mode: start with the least broad option that meets your needs

  • Only browsers and desktop apps that follow system settings: Use System Proxy. To bypass it for local services, check the system proxy's exception list and the app's own settings first.
  • Only a few command-line tools need a proxy: Set an HTTP or SOCKS proxy for each tool, and check its documentation for proxy options and DNS behavior. Keep the setting in the relevant tool to avoid affecting other programs launched from the same terminal.
  • Several apps ignore the system proxy, or your use case requires UDP: Choose TUN. First verify that the target TCP and UDP connections reach the core, then check IPv6, DNS, local network access, and how existing VPNs behave.

When troubleshooting, enable only one entry point at a time. Enabling both doesn't turn rule mode into global mode, but it can send apps on the same machine through different paths into the core, making it harder to identify the source of a problem. Once you've found the cause, keep the entry point you need and turn off the other one. If the system had a manual proxy or configuration script beforehand, restore it using your notes from before the test.