Clash First Connection Guide: Choose a Proxy, Test Latency, and Check Your Exit IP
After importing a config, choose a node in the right proxy group, learn what latency tests measure, then use your browser and command line to confirm traffic exits through the proxy.
Check your active config and proxy group before choosing a node
A successful subscription import only means the client received the config. Set it as the active config in the config list, then open the Proxies page and check the groups. If you still see the old nodes, confirm which config became active after the subscription update. Clicking nodes in the old list repeatedly won't activate the new config.
- Check the current mode. For your first test, keep Rule mode (
rule) enabled so you can verify how traffic is routed in everyday use. Direct mode does not select proxy egress based on rules. Global mode uses the global policy, so changing a service group in Rule mode does not change the global policy. - Find the group handling the request. Rules are matched in order, and the first matching rule usually determines where traffic goes. For example, if
DOMAIN,api.ipify.org,DIRECTappears first, requests to that domain will connect directly—even if a later catch-all rule points to a proxy group. If the log shows aMATCH, check which group that catch-all rule specifies. - Know the difference between manual and automatic groups. A
selectgroup lets you choose a node or a nested group manually. If you select a nested group, check which node it ultimately uses.url-testandfallbackgroups select routes based on their own health checks, so a highlighted group name does not necessarily represent one fixed node.
Send a new request after switching. Your browser may reuse a connection established before the switch. To verify a specific selection, make a fresh command-line request, then check the client logs by time and destination domain. This is more reliable than watching a page that was already open. See proxy group settings and rule settings for related fields.
Understand latency tests: milliseconds aren't download speed
The latency shown on the Proxies page usually comes from probing a specified HTTP or HTTPS test URL through the node. The exact timing depends on the core and client implementation; it may include connection setup, the TLS handshake, or waiting for a response. This is not an ICMP ping to the node's address, and it can't be converted into download bandwidth.
Compare candidate nodes under the same test conditions
- Use the same network and test URL. Test each candidate node three times and note the typical result and number of timeouts. Don't rank nodes by comparing results from different URLs.
- For example, node A returns 112, 118, and 121 ms; node B returns 76 ms, times out, then returns 290 ms. Even though B has a lower single reading, testing a website with A first makes it easier to rule out intermittent failures. These numbers are only examples to illustrate how to compare results.
- If every test times out, first check whether the test URL is reachable, whether the config has usable nodes, and whether the client reports a DNS resolution failure, connection timeout, or TLS error. If only one node times out, compare it with another node using the same URL.
Compare direct and proxy exit IPs in your browser
Run both checks on the same network; don't switch between Wi-Fi and a mobile hotspot. Use the same IP lookup service for both, such as https://api.ipify.org/ in your browser, to see your public IPv4 address. The address returned is the source IP seen by the lookup service, not your computer's local network address.
- Record your direct-connection baseline. Turn off Clash system proxy and TUN, and make sure no other VPN or browser proxy extension is handling requests. Open the lookup URL in a new window and note the result. If it won't load, don't treat the error as an IP address; you can still verify the proxy route using connection logs.
- Enable only one connection method. Start by enabling the client's system proxy and keeping TUN off. In Windows 11, for example, go to Settings → Network & internet → Proxy to check the proxy status. If the client uses a manual proxy, verify the local address and port too. If your browser has its own proxy settings, use the settings that the browser actually applies.
- Run the lookup again and check the connection log. Send the request from a new browser window, then check the time, destination domain, matched rule, and outbound chain in the client's Connections or Logs view. The public IP result and client log should correspond to the same request, not a previous refresh.
If the lookup IP changes and the outbound chain shows the selected node, that request used the proxy route. An unchanged IP alone doesn't prove anything failed: the lookup domain may match DIRECT, or both requests may happen to share an exit IP. Conversely, an IP change without a matching client log entry can't be attributed to Clash.
Use curl to verify the local proxy port and outbound route
Specify the local proxy explicitly to bypass the browser's proxy selection. First check which HTTP or mixed port is active in the client. Don't enter the control API port or a SOCKS-only port as an HTTP proxy. For mihomo, here's a top-level config snippet for local access only. 7890 is an example, not a default shared by all clients. Merge these fields only when you need to set the port manually. Don't overwrite subscription nodes or rules, and don't define the same key twice at the same level.
mixed-port: 7890
allow-lan: false
mode: rule
mixed-port accepts both HTTP and SOCKS requests. The commands below use an HTTP proxy, with curl creating a CONNECT tunnel to the HTTPS destination. Keep TUN and other VPNs off, and replace the port with the one your client actually uses. Run this in a macOS or Linux terminal:
curl -q --noproxy "*" --connect-timeout 5 --max-time 15 https://api.ipify.org/
curl -q --noproxy "example.invalid" --proxy http://127.0.0.1:7890 --connect-timeout 5 --max-time 15 https://api.ipify.org/
In Windows PowerShell, use curl.exe to avoid older PowerShell versions interpreting curl as a different command:
curl.exe -q --noproxy "*" --connect-timeout 5 --max-time 15 https://api.ipify.org/
curl.exe -q --noproxy "example.invalid" --proxy http://127.0.0.1:7890 --connect-timeout 5 --max-time 15 https://api.ipify.org/
In the first command, --noproxy "*" tells curl to bypass application-layer proxies for all destinations, but it can't bypass TUN if TUN has already captured the traffic. Turn TUN off before testing a direct connection. The second command excludes only example.invalid, which isn't involved in the lookup, so an existing NO_PROXY setting won't skip the lookup request. Put -q first to ignore the default curl config file.
If the second command returns an IP, the request went through the specified local proxy and received a response. That doesn't guarantee it exited through a node: in Rule mode, the local proxy may still route the request as DIRECT. To confirm the node's exit, check both the result and Clash's actual outbound chain.
Narrow down the problem based on where it fails
| Symptom | What to check first |
|---|---|
curl says the connection to 127.0.0.1:7890 was refused |
First check that the core is running and that the local port matches. The request hasn't reached a node yet, so switching nodes won't fix a listener issue. |
| The command line shows a proxy exit, but the browser has no matching connection log | Check the system proxy, browser-specific proxy settings, and bypass list. Retest using the same domain, and don't enable TUN at the same time to mask differences in how traffic enters the proxy. |
The connection is logged, but the outbound route is DIRECT |
Check the first matching rule and its policy. To test the node itself, briefly switch to Global mode and select that node in the global policy group. Switch back to Rule mode when you're done. |
| The latency test succeeds, but the actual request still times out | Compare the probe URL with the destination domain. Keep the destination domain and proxy group the same, then retry with a different node to tell a node-specific issue from a problem with the destination site. |
If you plan to use TUN, first keep the explicit-port test result. Then turn off the system proxy, enable TUN on its own, and compare connection logs for a new request without --proxy. This helps isolate application proxy settings, TUN traffic capture, and rule-based routing as separate steps. For more checks, see TUN configuration fields and common connection issues.