First-time setup · About 10 minutes

Clash Setup Guide

Go from importing a subscription to verifying your connection. First, confirm that your browser follows the rules; then decide whether to enable TUN or configure other apps separately.

Before you start, have an installed client and a subscription link ready, or a YAML configuration compatible with your current core. Need to install a client first? Visit the Download Center and choose your operating system.

Step 01

Import a Subscription

Open the client and go to “Subscription,” “Configuration,” or “Profiles.” Look for “Add,” “New,” or a plus sign, then choose “Import from URL” and paste the full Clash or mihomo subscription link from your provider. Don’t paste the provider’s homepage, login page, or a link for sharing a single node. If there’s a name field, use a clear label so you can identify the profile when it’s time to update it. If you have a local YAML file instead, choose “Import from file” and open it with the system file picker; there’s no need to paste the entire configuration into the URL field.

After clicking “Save” or “Import,” stay on the list page and check the result. If the new entry has no update status and the menu offers an “Update” option, click it once and wait for it to finish. Then select the entry and, if needed, click “Enable” or “Set as current profile.” Some clients enable an imported profile automatically; others only save it to the list. Check the selected indicator or current profile name to be sure. Finally, open the Proxies page and confirm that expandable proxy groups are available. Seeing a subscription name in the list only means the entry was saved, not that the configuration is running.

If the import fails, first determine whether the client couldn’t retrieve the content or retrieved it but couldn’t parse it. For a timeout, make sure your device is online, then copy the full link from your provider again and check for spaces or line breaks at either end. For a format error, confirm that you’re using a subscription link compatible with your client or core—not a webpage that only shows content after you log in. If a rule or field is unsupported, check compatibility between the configuration and core instead of deleting the field just to force it to load. Subscription links may contain access credentials. When sharing a screenshot or asking for help, show the error message but hide the full link.

If you have multiple profiles on one device, don’t delete the old one just to troubleshoot. Note which profile is selected, then import the new one under a different name and switch to it. If it doesn’t work, you can switch back. After switching, reopen the Proxies page rather than relying on the group names you noted earlier; each subscription has its own groups. Once the new profile’s groups appear, you’re ready to choose a mode.

Step 02

Choose a Proxy Mode

Stay on the Proxies page and look for the mode selector at the top. Some clients put it on the home screen or in Settings. For your first setup, choose “Rule” or Rule. This mode checks requests received by the client against the rules in the configuration and then decides whether to connect directly, route through a proxy, or block them. The mode only controls how the client handles traffic it has already received; selecting “Rule” doesn’t automatically route your browser through the proxy. Choose the routing mode and a node first, then enable your device’s proxy connection in the next step.

After choosing a mode, expand the manual selection group in your configuration. It may be called “Node Selection,” “Proxy,” or something specific to your subscription provider. If the client has a rule viewer, check which group the rule for your target domain points to, then choose a node in that group. Otherwise, use the configuration notes to identify the default group and check the connection log after testing. A group may also select another group. If you see “Auto Select,” the client chooses a node based on the checks defined in that profile. To reduce variables during your first troubleshooting session, select a specific node in a manual group; you can switch back to automatic selection afterward.

If the client can test nodes, try a few candidates and choose one that returns a result; there’s no need to pick the one with the lowest number. A successful test only means that the node could reach the test address at that moment—it doesn’t guarantee access to every site. After selecting a node, make sure the selection indicator moved to it, then return to the home screen and confirm the mode hasn’t changed to Global or Direct. If a rule points to a different group, traffic won’t use the node you selected, even if its test succeeded. The actual request log is the final check.

Use “Global” briefly as a comparison when troubleshooting. If the interface has a Global group, make sure it has a working node selected, then switch back to Rule mode when you’re done. “Direct” can help you compare results without a proxy node, but it doesn’t turn off the system proxy or a mobile connection. There’s usually no need to switch modes repeatedly. Avoid changing your subscription, mode, and node all at once; even if the site starts working again, you won’t know which change fixed it.

Step 03

Connect to the Proxy

On desktop, return to the home screen or “Settings,” make sure the client core is running, then enable “System Proxy.” If starting the client and enabling the system proxy are separate actions, start the client first. An open app window doesn’t necessarily mean the core is running. Once the system proxy is on, test with a browser that normally follows your system proxy settings. Don’t start by testing a terminal or every app on your device. On Linux, if the client can’t update your desktop environment’s proxy settings, you can temporarily enter the local listening address and port shown by the client in your browser’s manual proxy settings. For an HTTP proxy, use the HTTP or compatible mixed port—not the external controller port.

On Android and iOS, select the current profile, return to the client’s home screen, and tap “Connect” or the start icon. The first time you connect, watch for a system prompt to add or allow a VPN configuration. Check the app name, then follow the system prompt to approve it. Wait until the client status changes from connecting to connected before opening your browser. If no permission prompt appears, check whether the client is already authorized or another VPN is running. You can temporarily pause your own VPN and try again. If your organization manages the device and restricts this permission, check with your administrator; don’t remove the device management profile.

If your browser works through the system proxy, you don’t need to enable TUN for this setup. For apps that don’t use the system proxy, check whether the client supports TUN and whether your operating system requires extra permissions or services. Note the current toggle states before making changes, and follow the platform-specific instructions in the complete documentation. TUN can route traffic from more apps into the client, but the selected mode still determines how that traffic is handled. Whether to leave the system proxy enabled for everyday use depends on the client’s recommendations. For initial troubleshooting, test one connection method at a time so you know how requests are reaching the client.

If the toggle immediately switches back off, don’t keep clicking it. Open “Logs” and check whether the problem is a permissions issue, a core that didn’t start, or a local listening port that’s already in use. If the system proxy still points to a local port that’s no longer listening, turn off the client’s system proxy first and confirm that your system proxy settings have been restored before continuing. Once the connection stays on, make an actual request. An enabled toggle only shows that the connection is active; it doesn’t prove that a webpage used the selected node.

Step 04

Verify the Connection

Open “Connections” or “Logs” in the client and note the current time. Return to your browser and visit a page that normally loads directly, then visit a site that your current configuration should route through a proxy group. Choose a site you know; there’s no need to sign in or enter personal information. Make a fresh request if possible—a page loaded from the browser cache may not generate a new client entry. After testing, immediately return to the Connections page and look for entries by time and domain. If the page loaded too quickly, check the client’s recent logs. A webpage often requests multiple domains, so start with the domain in the address bar rather than treating background requests as proof.

Expand the matching entry and check the visible rule, proxy group, or outbound route. A request expected to connect directly should show DIRECT, meaning the configuration bypassed proxy nodes; this is normal in Rule mode. A request expected to be proxied should show the relevant proxy group or node, and the page should load. A working webpage, a lit tray icon, or a VPN indicator in your system settings doesn’t prove on its own that a specific request used the proxy. If you also check your public IP, make sure the lookup domain matches a proxy rule; otherwise, you may still see your direct connection’s exit address.

If you can’t find an entry, first make sure the browser doesn’t have a separate proxy configured, then check that the connection toggle is still on. If the entry shows a direct connection, return to the rules page and check which rule actually matched the target domain. If a proxy group matched but the request failed, select a different node in the same group and retry the same URL. Don’t change the rules and connection method at the same time. Some clients only show active connections, so an empty list doesn’t necessarily mean the proxy has failed. To understand why your browser and terminal behave differently, read System Proxy Troubleshooting: Browser vs. Terminal.

Once direct and proxied requests both behave as expected, setup is complete. If results change after a subscription update, first make sure the correct profile is active and Rule mode is still selected, then repeat the same two tests. When you’re not using the proxy, turn off the system proxy in the client or disconnect on mobile. If you changed your browser’s proxy settings manually, restore them too. That way, if your internet stops working later, you can tell whether the device is offline or still pointing to a local proxy.