quickstart / first connection

Clash Setup Guide

Import a subscription, choose a proxy mode, connect, then check which route your traffic actually takes.

If you have a client installed and a subscription URL ready, allow about 10 minutes for the initial setup. Haven't installed a client yet? Start at the download page and choose one for your system.

Import and Enable a Subscription

Open the client’s “Subscription” or “Config” page and choose “New,” “Add Subscription,” or “Import from URL.” If prompted to choose a source, select remote config, not a local file. Paste the full URL provided by your provider; it starts with https://, and any query parameters at the end must be included. You can give it a recognizable name for reference; this won’t change the config. Save, then click “Update” once or check the import result. First make sure the client can fetch the config before enabling automatic updates.

Seeing a new entry after importing doesn’t mean the config is running. Return to the config list, click the entry, or use its “Enable” menu; some clients mark the active config with a selection indicator. Then open the “Proxies” page and confirm the config’s proxy groups or nodes are there. If the list still shows old content, check which config is selected and look for a loading error. If you already have a working config, keep it for now. Confirm the new one loads before deciding whether to remove the old entry, so you can switch back if needed.

If the download fails, first check your internet connection and make sure you copied the provider’s import URL, not an account page URL. If the client reports an authorization error or expired subscription, check with the provider that the link is still valid. If the download succeeds but parsing fails, the content may not match the import method: a web page, a Base64 node list, or a Provider file intended only for reference in another config can’t be enabled as a complete config when the client expects Clash-compatible YAML. Use a subscription format labeled Clash or mihomo by the provider. For help identifying formats, see Subscription URLs and Config Formats.

Subscription URLs may contain account credentials. Hide them in screenshots you share, and never post the full URL on a public site while troubleshooting. Once the config is selected and the proxy page shows the expected groups or nodes, you can move on. You don’t need to edit YAML yet, or reimport the config just because a web page isn’t using the proxy.

Choose a Proxy Mode and Node

Return to the client’s home screen or “Proxies” page and find the “Mode” menu. For a first everyday connection, select “Rule” or Rule. Rule mode checks connections against rules from top to bottom and uses the outbound route specified by the first match. For example, a config might send one type of request through DIRECT and another through a proxy group. So it’s normal for some pages to connect directly and others through a node in the same client. For details on rule syntax, see Rule Syntax and Matching Order.

After choosing a mode, open “Proxies” and find the group that handles the traffic you want to route. Group names depend on the subscription; it may not be called PROXY and could have a name like “Select Node.” You can run a latency test next to the group to narrow down the options, then choose an entry in a manually selectable group and confirm the expected node is selected. A successful test only means the node responded to the test target; it doesn’t prove that your browser is using the proxy or that other destinations are reachable. Verify an actual page separately.

If the selected entry in a group is another group, open that nested group to check its current outbound route. Automatic groups follow the selection logic defined in the config, so there’s no need to choose a node manually; wait for testing to finish and make sure at least one usable option is listed. If you’re testing proxy routing, don’t leave the manual group you plan to use set to DIRECT. You don’t need to change every group to the same node, though: some groups are meant for direct connections, and rules may intentionally route certain traffic through them. See Proxy Group Fields Reference for group types and nesting.

“Global” mode usually sends all requests reaching the core through the global policy. It can help troubleshoot rules temporarily, but make sure the global group itself isn’t set to direct. “Direct” mode is useful for comparison. Changing modes only affects how the core routes traffic; it doesn’t enable the system proxy or VPN. For your initial setup, keep Rule mode and note the group and node you selected. Once traffic is routed in the next step, you’ll have something to compare against.

Enable the System Proxy or VPN

Desktop: Make sure the client core is running, then enable “System Proxy” from the home screen, settings, or tray menu. If the client offers both “System Proxy” and “TUN Mode,” start with only the system proxy for your first browser test to keep things simple. When enabled, the client tries to apply its local proxy settings to the system or desktop environment. Test with a browser that follows system proxy settings. If the browser has a fixed proxy configured, or an extension controls its proxy separately, check which setting is taking effect. Some apps ignore system proxy settings, so their behavior alone can’t tell you whether the client is connected.

Mobile: Tap “Connect” or the start button on the main screen. The first time you connect, the system usually asks for VPN permission. Make sure the request comes from the client you just opened, then allow it to create a connection. Wait until the main screen shows “Connected” before switching to your browser and making a request. If the system says another VPN is in use, check what that connection is for. On a personal device, you can disconnect it and try again if appropriate. On a managed device, keep existing policies in place and follow your administrator’s instructions.

If the toggle switches on and then back off, stay in the client and check the first error instead of repeatedly tapping Connect. If the config failed to load, return to the first step and make sure it can still be enabled. If a local port is already in use, check whether another proxy client is running; two programs may be trying to use the same port. If you do need to change the port, note the new value so you can use it in the command test later. For port field syntax, see the Local Listening Ports Reference.

If a browser that follows system proxy settings routes traffic successfully but a desktop app still doesn’t appear in the connection log, check whether that app supports a separately configured proxy. If you need to route that kind of traffic, read Clash TUN Mode Setup to understand the permissions and traffic coverage before switching. Get one connection method working before adding another; that makes it easier to tell whether a problem lies with the entry point, rules, or node.

Verify That Traffic Is Routed as Expected

After connecting, don’t rely on the status light alone. Open the client’s “Connections” or “Logs” page, then use a browser to visit a domain you know should match a proxy rule. If the page was already open, reload it or open a new test page to trigger a fresh request. Back in the client, find the entry by domain or request time and check three things: whether the request reached the client, which rule it matched, and which group and node handled the outbound traffic. The Connections list may show only active connections. If you can’t find a short-lived request, open the log before testing and try again.

A page loading and a log entry showing the expected node together confirm that the request went through the proxy. If the page loads but the log shows DIRECT, the request reached the core but was routed directly by the rules. If that’s unexpected, check the rule order and selected policy. If repeated tests produce no matching entry, first try an app that definitely uses the current system proxy or VPN rather than switching nodes. If the entry points to a node but the request fails, try another node in the same group while keeping the domain and mode unchanged. That way, you change only one variable at a time.

Test the Desktop Client’s Local Proxy from the Command Line

If the client shows 7890 as its HTTP or mixed port, run the command below in a terminal. If the port is different, use the value shown in the client. In Windows PowerShell, if curl resolves to an alias, use curl.exe explicitly. Don’t use a SOCKS-only port in this HTTP command.

curl --proxy http://127.0.0.1:7890 --noproxy "" --max-time 15 -I https://example.com/

--proxy makes the command connect directly to the local proxy, while --noproxy "" clears proxy exceptions set by environment variables. If you get an HTTP response header from the destination, check the client to see which outbound route it used; this example domain may be routed directly by your config. A successful command doesn’t mean your browser is connected, since the command doesn’t rely on system proxy settings. If it can’t connect to the port on 127.0.0.1, first check that the core is running and that the port type and number are correct. If the command succeeds but the browser has no matching log entry, check the browser and system proxy settings first.

To further verify your outbound IP, you can use a trusted IP lookup service. Record the results when traffic is expected to go direct and through the proxy, and check the connection log for the lookup domain at the same time. In Rule mode, the lookup site is also subject to your rules, so an IP change alone isn’t conclusive. When troubleshooting is done, restore your usual mode if you changed it temporarily. Before closing the client, disable the desktop system proxy or disconnect the mobile VPN. If the client connects but pages still won’t load, continue with the Troubleshooting section of the FAQ.