Getting Started / First-Time Setup
Clash Setup Guide
Import a subscription, choose a routing mode, connect, then use the connection logs to verify rule-based routing.
Start by finding the right entry point for your platform. On Windows, macOS, and Linux clients that support system proxy settings, you’ll usually start on the Profiles or Subscriptions page. On Android and iOS, open Profiles or Subscriptions first, then return to the home screen to connect. Client labels vary; you may see Profiles, subscription management, or Settings. If you haven’t installed a client yet, visit the client page to find one for your operating system.
This guide uses a GUI client compatible with Mihomo (Clash Meta) configurations. Have a trusted Clash YAML subscription URL or an existing local YAML file ready. If you already have a working configuration, note its name and current operating mode. Import the new configuration as a separate profile so you can switch back if anything goes wrong. Once your configuration and client are ready, follow the steps below to complete the initial check.
Step 01
Import and Enable a Subscription
Open the client and go to Profiles, Subscriptions, or the Profiles page. Click Add, New, or the plus button. If you have a subscription URL, choose Remote or Import from URL and paste the full address into the URL field. Don’t enter it in a node server or local port field. Give it a recognizable name, then save and wait for the download to finish. The new profile should appear in the list. Some clients show a last-updated time; others provide an Update button. The labels vary, but both options fetch the remote configuration to your device.
To import a local YAML file, choose Import from file on the same page and select it using the file picker. On a phone, if the file is in Downloads, you may need to find it in the system Files app before returning to the client. A remote URL and a local file are two different import methods; choose one. Keep a remote subscription if you want the client to fetch future updates. Use a local file if you only want to test the configuration you have now. Subscription URLs may contain access credentials. Hide the full URL before sharing screenshots or diagnostic information. Don’t publish an entire configuration if it contains node credentials.
Seeing a profile in the list doesn’t mean it’s active. Select the profile you just imported, or use its menu to choose Enable or Set as current. Look for a checkmark or confirm that the current profile name on the home screen has changed, then open the Proxy page. If the configuration defines policy groups, you should see its groups—not those from the previous profile. If the client reports a load failure, keep the previous profile and note the error. Don’t change the mode or system proxy yet; otherwise, it’ll be harder to pinpoint the problem.
If import fails with a format error, check with your subscription provider that the selected format is Clash YAML. A single share link, a Base64 list of nodes, and a complete configuration are different types of input. Even if all three can be copied and pasted, they may require different import options. Sometimes a remote URL opens but returns a login page or an error, which the client can’t parse as a configuration. If the error names an unsupported rule or protocol field, check which core the client is actually using instead of pasting the same URL repeatedly. Once the configuration is enabled, continue to mode settings. See the glossary for format terminology, or visit Troubleshooting to investigate import failures.
Step 02
Choose a Proxy Mode
Keep the profile you just imported active. Return to the home screen or Settings and look for Operating Mode, Proxy Mode, or Mode. If you see Rule, Global, and Direct, choose Rule for your first setup. In clients with an English interface, the option is usually called Rule. Return to the home screen and confirm the mode changed; some clients put this switch at the top of the Proxy page. This setting controls how the core handles connections it receives. It doesn’t determine whether your browser or other apps send their requests to the core.
In Rule mode, the core checks the configuration’s rules in order and applies the policy specified by the first matching rule. Some connections go direct; others are routed through a proxy group. Global mode uses the selected global outbound and isn’t suitable for checking the configuration’s routing rules. Direct mode generally sends connections that reach the core straight out; it doesn’t turn off the client or the system proxy. Start with Rule mode so you have a clear expectation for the next check: a direct connection in the logs may mean the rules are working as intended.
Next, check the policy groups on the Proxy page. Configurations can use custom group names, so don’t look for a button that’s always called Node Selection. Identify which group should handle the traffic you plan to test. If it’s a manual group, open it and select a familiar node. Some manual groups offer another policy group as an option; if so, check which node the subgroup ultimately selects. For automatic URL-test or fallback groups, keep the existing selection logic and note the outbound currently shown by the client. Don’t switch every group to the same node, especially groups that are set to direct.
If the client offers Test Latency or Connectivity Test, run it once for the node you plan to use. A result shows that the test request received a response; it doesn’t prove that your browser will route traffic through the core or that every site is reachable. If a node times out, first check whether it’s still available, or try another known-working node in the same manual group. There’s no need to immediately change DNS, switch operating modes, or reinstall the client. Note the current mode and selected policy. Next, change only how system traffic reaches the core so you can compare the results. To compare connection behavior across protocols, see the protocol and core guide.
Step 03
Connect and Route Traffic
Return to the client’s home screen. If there’s a separate Start, Run, or Connect button, click it and wait for the status to show that the client is running. Some desktop clients start the core with the app; in that case, just confirm there are no startup errors. A running core and routed system traffic are two separate things: the first means the client can handle requests, while the second determines whether apps send requests to it. Choose one method for your device below; you don’t need to follow both the desktop and mobile steps.
On desktop, find System Proxy on the client’s main screen or in its tray menu and turn it on. Then test with a browser that follows system proxy settings. On Windows and macOS, the system’s proxy settings will usually show the address and port set by the client, so you don’t need to enter them again manually. On Linux, whether the client can update these settings automatically depends on the client and desktop environment. If the toggle isn’t available, consult the client’s documentation. If you need to configure a browser that supports manual proxy settings, use the local listening address and actual port shown in the client; don’t copy someone else’s port. For an HTTP proxy, make sure you use the HTTP or mixed port, not the external controller port.
On mobile, return to the client’s home screen and tap Connect or the start icon. If a system VPN authorization prompt appears the first time, make sure it came from the app you just opened, then approve it as directed on your device. Wait for the client status to update and check the VPN status in the system status bar, Control Center, or Settings. If another VPN is already running, check whether you can pause it before reconnecting. On work-managed or otherwise managed devices, follow your organization’s device policies. A system VPN status of Connected only confirms that the traffic-routing layer is active; the current configuration still determines which policy handles each connection.
For your first desktop setup, don’t enable System Proxy and TUN at the same time. System Proxy relies on apps following the system settings; TUN receives traffic through a virtual network interface and may require a service or system permissions. First, verify that browser requests reach the core. Then decide whether other apps need to connect through TUN. If turning on the system proxy immediately disrupts your network, turn it off and check whether your original connection works again. Note the client’s startup messages and listening port before investigating conflicts. Don’t change the subscription, node, and traffic-routing method all at once. Once the connection is stable, use the next step to confirm that the expected rules are matching.
Step 04
Verify the Connection and Matched Rules
Choose one site in the configuration that’s expected to use a proxy, then another that’s expected to connect directly. If the configuration has no obvious direct-connection target, test only the proxy destination; there’s no need to rewrite the rules just for this check. Open the client’s Connections or Logs page, then visit the first site in your browser. Try to test one destination at a time. Existing tabs may reuse earlier connections, so close old tabs before revisiting the site or open it in a new private window. Entries may disappear from the connection list when a request ends, so watch the client as you reload the page if needed.
Find the destination domain that matches the time of your visit, then check the matched rule and outbound. If the client shows both a policy group and a node, compare the group name first, then check the node. Some clients show them side by side; others display them as a single outbound chain. Browsers open additional connections for images, fonts, and other resources, so don’t use an unrelated request to draw conclusions about the main site. Once the first destination’s outbound matches your expectations, check the second site the same way. If the log shows a direct policy or DIRECT and direct access is what you expect for that destination, the connection reached the core and was routed directly.
If a page loads but you can’t find its requests in the logs, don’t assume the proxy is working just because the site is accessible. First, check that the Connections page has no active filters. Then confirm that the browser follows system proxy settings, or that the app you’re testing on mobile is covered by the VPN. If there is a log entry but the outbound is wrong, check which profile is active, which domain the request actually used, and which rule matched first. In Rule mode, the first matching rule in the list determines the policy. If the domain, rule, and outbound are correct but the page times out, try a different node in the same policy group. Change only one thing at a time so you can interpret the result.
Once everything checks out, keep the current profile, Rule mode, and verified traffic-routing method. To temporarily stop using the proxy on desktop, turn off System Proxy before quitting the client, then confirm that your browser can connect the way it did before. On mobile, disconnect in the app and check that the system VPN status updates. If you still see “Connected” but can’t open websites, visit Troubleshooting with the destination domain, time of the issue, matched rule, and outbound result. These details make it easier to tell whether the request never reached the core or reached it but failed during outbound routing.