Initial Setup: From Import to Verification
Clash Setup Guide
Import a subscription, choose a proxy mode, connect, then confirm each test request uses the expected route.
If the client is installed and you have a compatible profile, setup usually takes about 10 minutes. Not installed yet? Choose a package for your operating system and processor architecture on the client download page.
Import a Clash Subscription
First, copy the profile URL for your client from your subscription provider’s account page. If the page lists a general URL, individual node links, and a Clash subscription, choose the option explicitly labeled Clash or Mihomo that’s compatible with your client’s core. A single-node link usually describes just one node; it isn’t a complete profile with proxy groups and routing rules. If your provider offers a ready-to-use Clash YAML file, import the file directly instead of converting it to a URL.
Open the client’s “配置,” “订阅,” or Profiles page. Click “新建,” “添加,” or “从 URL 导入,” then paste the address into the URL field. Before saving, make sure you’ve pasted the complete subscription URL without extra text or line breaks. If prompted for a name, choose one that helps you identify the configuration; it won’t change the proxy nodes. To import a file, select the original YAML file and wait for it to appear in the list.
When the new entry appears, make sure it’s selected as the active profile. Click the entry or choose Use or Enable, check for a selected or active status on the Profiles page, then open the Proxy page to view its groups and nodes. This is especially important if you already have another profile: adding or refreshing a subscription may leave the old profile active. Keep the old entry until you’ve verified the new one.
If the download fails, first check that the same device can access the internet normally, then make sure the subscription URL is still valid on your provider’s site. If the client retrieves content but can’t parse it, check that the provider gave you a profile file rather than a login page. If needed, try the provider’s client-specific URL. Consider a subscription converter only if the format is genuinely incompatible, and prefer compatibility options from your provider. Subscription URLs may contain credentials, so don’t share them in public screenshots, support tickets, or unfamiliar conversion services.
Once the Profiles page shows the active entry and the Proxy page shows its groups, you can continue. This confirms that the profile loaded, but app traffic may not be reaching the client yet. Don’t judge whether the subscription works just by whether a website opens.
Choose a Proxy Mode and Group
Open Proxy or Settings and find Proxy Mode. For your initial setup, choose Rule (rule). In Rule mode, requests are matched against rules in order. The first matching rule determines the route; if none of the earlier rules match, the client checks the next one. The final MATCH rule is commonly used as a fallback. Rule mode doesn’t send all traffic through a proxy—your profile may route some requests directly.
If you don’t already have test domains in mind, choose two sites you’re authorized to access and check the expected routes in the client’s rules page or local profile: one should go direct, and the other should use a proxy group. Prefer sites with clearly defined domain rules rather than guessing based on a site’s name, language, or server location. Some pages load images and scripts from multiple domains, so start by noting the main page domain and distinguish other requests during testing.
Proxy Groups Determine the Outbound Route
Go back to Proxy and open the group referenced by the rule. If your profile contains MATCH,PROXY, then PROXY is the group name. Your profile might use a different name, such as Proxy Selection; follow the name referenced by the rule. If the group supports manual selection, choose a specific node for testing so the outbound route doesn’t change between requests. If the selected option is an auto-select subgroup, open it to see which member it currently uses. The selected option in a parent group may itself be another group.
If the group contains DIRECT, selecting it routes requests directly, even when the top-level mode still shows Rule. Latency tests can help you choose a node, but they only measure the node’s response to a specific test address; they don’t confirm access to your target site. If a node times out, try another node in the same group against the same target before changing the profile or mode.
Use Global Mode for a Brief Comparison
Global (global) sends connections entering the proxy core through the global policy, making it useful for a quick check of whether routing rules affect access. After switching modes, check which route the global group has selected, then repeat the same request. If the global group is set to direct, changing modes won’t send the request through a proxy node. Direct (direct) handles connections entering the core as direct connections; it doesn’t turn off the system proxy. Switch back to Rule mode when you’re done comparing, then continue with your normal setup.
Connect Through the Proxy
Once the profile and proxy group are set, route your test app’s traffic through the client. On Windows, macOS, or Linux, enable the system proxy if the client offers that option, then test with a browser that follows system proxy settings. A tray icon only shows that the client is running; it doesn’t mean the system proxy is enabled. Check the client’s toggle, and if needed, confirm that a local proxy is set in your operating system’s network settings.
If your desktop environment has no system proxy option, or your test app has its own proxy settings, open the client’s port settings and check the actual listening address and port. Enter them in the app using a supported protocol. If the proxy listens on the local loopback address, the host is usually 127.0.0.1; use the port shown in your settings rather than assuming a common default. For an HTTP proxy, use the appropriate HTTP or mixed port. If the app specifically requires SOCKS5, check that the client provides a SOCKS port or a mixed port with SOCKS support.
On Android or iOS, return to the home screen and tap Start or Connect. The first time you connect, the system will ask to allow a VPN connection. Make sure the request comes from your client before approving it. Return to the app and wait for the home screen to show that you’re connected before opening your test app. If another VPN or work profile is already active, check which connection the system is using. On a managed device, don’t remove organization-managed network settings just to test. If you use per-app proxying, make sure your test app is included.
For your first desktop test, use either the system proxy or the app’s manual proxy setting—you don’t need to enable TUN as well. If the test app doesn’t appear on the client’s Connections page, first check whether it’s using the route you just configured; there’s no need to start troubleshooting virtual adapters or DNS yet. If you need to route apps that ignore system proxy settings, check the supported traffic-capture methods and system permissions in the Troubleshooting guide.
At this point, confirm just one thing: the desktop system proxy is on, the test app has its proxy settings, or the mobile VPN is connected. Next, use a real request to check whether traffic reaches the core and the selected rule is applied.
Verify That Clash Is Working
Open the client’s Connections page, then visit a test site that should use the proxy in your browser. Don’t rely on a tab that was already open before you switched modes: cached content, existing persistent connections, and background requests can all skew the results. Close old tabs for the site and open it in a new private window to limit other requests where possible. Check the new connections generated by this visit—not the window type or whether the page loads completely.
Find the request in the connections list by destination domain or time. Check the matched rule, the proxy group it references, and the final outbound route. These tell you why the request took that route, which group handled it, and where it actually went. If the connection ends too quickly to show in the live list, search the Logs page by time to see whether the client recorded it. If the proxy group looks right but the final route is DIRECT, check the selection in Proxy Groups instead of immediately switching to Global mode.
Next, visit a site that should connect directly. If the request also reaches the core and the log shows DIRECT, that confirms both routes are working as expected in Rule mode. If the direct site loads but no connection appears, the browser or system may have bypassed the proxy through an exception list, or the request may have ended before it was logged. Don’t assume that no log entry means a direct rule matched. Check your proxy exceptions, or test another site that should go direct but is known to route through the client.
If the results don’t match your expectations, change one thing at a time. If neither site appears in the logs, return to the connection step and check how traffic is routed through the client. If a request reaches the client but matches the wrong rule, check the active profile and whether an earlier rule matched first. If the rule and proxy group are correct but the request still fails, try another node with the same domain. Keep the time, domain, and error details for troubleshooting; there’s no need to export the entire profile with its subscription URL. For persistent node timeouts, subscription refresh failures, or DNS issues, follow the relevant steps in the Clash Troubleshooting guide.
When you’re done testing and don’t need the proxy, turn off the system proxy you enabled on desktop, or restore the test app’s original proxy settings, then quit the client. On mobile, tap Disconnect on the client’s home screen and confirm the system VPN is disconnected. Finally, use a normal network connection to open a site that should connect directly and make sure your device isn’t still trying to reach a stopped local port.