Getting Started / First Connection
Clash Setup Guide
From Subscription Import to Connection Verification
Load a configuration, make your first connection in rule mode, then check the traffic route on the connections page. If the client is installed and your configuration source is ready, these four steps take about 10 minutes.
Import a Subscription or Local Configuration
Open the client’s “Configuration” page and look for “New,” “Import,” or a plus button. If you have a subscription URL from your configuration provider, choose “Import from URL,” paste the full address, then click “Save” or “Download.” Use configurations from trusted sources. A subscription URL may contain access credentials, so when sharing a screenshot or asking for help, show only the error message—not the full URL. Once imported, the configuration usually appears as a new item in the list. Some clients use the subscription name; others let you rename it to make its purpose clear.
If you have a local config.yaml file, choose “Import from file” on the same page and select the original file in the system file picker. If you saved it with a text editor, check that the filename hasn’t gained a .txt extension. For your first test, keep the original file intact rather than changing ports, rules, or DNS. That makes it easier to tell whether the original configuration failed to load or a later edit caused the problem.
Once the configuration appears in the list, open its entry or click “Enable” or “Set as current.” Some clients select the first configuration automatically; others import it without switching to it. Check the selected item or the configuration name shown on the home page. Then open the “Proxy” page and confirm its policy groups belong to the configuration you just imported. If the list still shows the old content, return to the configuration page and make sure the switch completed. Don’t repeatedly import the same URL.
If the import fails, check which stage the error points to. “Request timed out” means the client couldn’t retrieve the content. First check whether your current network can reach the configuration source, then ask the provider to confirm the link is valid. For “Parse failed,” make sure the file is a Clash configuration supported by your client—not a login page, error page, or subscription format for another client. If you already have a working configuration, keep it until the new one loads successfully. Once the configuration list and proxy page show the same setup, you’re ready to choose a mode.
Choose Rule Mode and a Policy Group
Find “Mode” on the “Proxy” page, home page, or settings page. For your first setup, choose “Rule” or Rule. Rule mode evaluates requests against the active configuration’s rules in order, then sends each match to the assigned outbound route or policy group. So it’s normal for two sites opened in the same browser to take different routes—one direct and the other proxied. Global mode sends traffic routed through the client to the global policy. Use it for a brief comparison. Direct mode sends routed traffic through the direct policy. None of these modes is the same as the system proxy toggle.
After choosing a mode, open the “Proxy” page and check the policy groups. Their names come from the configuration; “Select Node” and “Auto Select” are common examples. Find the group used for proxy traffic and check which option is selected. In a manual group, choose an existing node. If the selected option is another policy group, open it to check the final outbound route. If you see DIRECT, that route is direct. The client being active doesn’t automatically send traffic through a proxy.
If the configuration includes an automatic latency-test group, check that it has candidate nodes, then use the client’s test feature to view the results. A successful test only means that the node could reach the test target at that moment; it doesn’t replace the real-world check in Step 4. If several nodes time out, keep rule mode and use the connections page to investigate once traffic is routed through the client. Avoid changing modes and repeatedly refreshing the subscription at the same time, or it’ll be hard to tell which change affected the result.
To find out why a domain is assigned to a particular policy group, note it down and check its connection record in Step 4. For rule order, policy group fields, and fallback behavior when no earlier rule matches, see the configuration reference. For now, check two things: the mode is set to “Rule,” and the policy group used for proxy traffic has a clearly selected outbound route. Next, route app traffic through the client.
Connect and Route App Traffic
On desktop, keep the client running and turn on “System Proxy.” Some clients put the toggle on the home page; others place it in the tray menu. After enabling it, check your operating system’s proxy settings to confirm the proxy and port match the listening address and port shown in the client. If your device already uses a workplace proxy, an automatic configuration script, or other network management software, note the original settings first. On managed devices, follow your administrator’s instructions. A client can load its configuration correctly without receiving browser requests—check those separately.
On Android or iOS, tap “Connect” or “Start” on the client’s home page. The first time you connect, the system will usually ask permission to add a VPN configuration. Confirm the request came from the client you just opened, then follow the system prompts. Return to the app and check that its status shows connected. If another VPN is already enabled on your phone, review any conflict messages and confirm which VPN is actually running. A VPN icon in the status bar only means the system connection is active; check the app to see which requests are routed through the proxy.
For your first test, use only one traffic-routing method. On desktop, the system proxy mainly affects apps that follow system proxy settings. A browser or other program with its own proxy settings may use those instead. If the target app doesn’t appear in the connections list, first check whether it has a separate proxy configured; then consider using the client’s TUN mode. For configuration fields related to traffic routing or DNS, see the general settings in the configuration reference. Don’t change several settings at once and hope for the best.
If the toggle switches off by itself or the client reports that it couldn’t start listening, read the error message first. If the port is in use, check whether another client instance is already running. Don’t terminate unfamiliar system processes. If the error says the configuration isn’t loaded, return to Step 1 and check which configuration is active. Once traffic routing is stable, leave the settings as they are and move on to a test that lets you check the domain.
Verify Requests, Rules, and Outbound Routes
Open the client’s “Connections” page. If your client doesn’t have a connection list, check the available connection details on its logs page. In a new browser tab, visit a site that normally loads and note the domain in the address bar. Then return to the client and look for a record from that moment. Redirects or requests for images and scripts may create several connections. Start with the one for the main site in the address bar; don’t use a background request to judge the route for the whole page.
Open a connection record and check the destination domain, matched rule, and outbound route, in that order. If a direct rule matched, seeing DIRECT is expected. To verify the proxy route, visit a destination that should use the proxy under your current configuration. Confirm that the connection passes through the expected policy group and reaches the expected node. A page loading only shows that the site is reachable; the connection record shows how it got there. Conversely, seeing a node name in the record doesn’t count as a successful test if the page fails to load.
If there’s no matching record, return to Step 3 and check how traffic is routed. Then check whether the browser uses its own proxy or reused an existing connection. Close the relevant tabs and retry to rule out a cached page. If there is a record but the outbound route is wrong, go back to Step 2 and check the active mode and policy group. If traffic reaches the expected route but the site won’t load, stay in the same mode, switch to another known-working node, and test the same site again. If you see a certificate warning, keep the browser’s security protection in place. Check the system clock first, then see how to troubleshoot certificate errors.
If even a site expected to connect directly won’t load, turn off the system proxy you just enabled or disconnect the client on mobile, then try the same site again. If it works after disconnecting, focus next on the traffic-routing method you changed and the active configuration. If it fails both before and after, check your device’s network connection first. Change one setting at a time and note the result; this makes problems easier to isolate than switching modes repeatedly. For a step-by-step diagnosis, see the connected but no internet troubleshooting checklist.
Your setup is verified when the connection log shows the expected outbound routes for both direct and proxied requests, and the pages load normally. When you update a subscription or switch configurations later, use the same sites and checks first. If you were only testing, turn off the system proxy or disconnect the client, then quit the app and restore the network settings you noted earlier. Don’t just close the main window—some clients keep running in the background.