Core Concepts: How a Request Travels
The Interface, Core and Configuration
There’s more than one client in the Clash ecosystem. The interface lets you import configurations, switch proxy groups and view logs. The core reads the configuration, receives traffic, matches rules and decides how to connect. mihomo is one commonly used core. Different clients may use similar configuration syntax without exposing the same settings or running the same core version. When a guide mentions an option, check which core and settings are available in your app. Don’t rely on the app’s icon or name alone.
Configurations are usually written in YAML. Proxies describe the settings for an outbound connection, proxy groups let you choose among available options, and rules send different requests to a selected outbound. A rule’s final field often names a proxy group, not a proxy. For example, if a group is named PROXY, you can pick one proxy in that group today and switch to another tomorrow. As long as the group name stays the same, rules that refer to it don’t need to change. When group names look alike, check the exact spelling in your configuration.
A subscription provides a configuration or a list of proxies; it isn’t the network connection itself. A successful update only tells you that the client retrieved the content and processed it. You still need to activate that configuration, start traffic capture, select an available outbound and verify the result with a real request. Keep these states separate when troubleshooting: opening the subscription URL doesn’t prove a proxy works, and a working proxy doesn’t prove that the app on your phone is sending traffic through the client.
Traffic In, Rules and Outbound
Take opening a browser as an example. First, check the entry point: did the browser’s request reach the core through the system proxy or a virtual network interface? Next, check the policy: which mode is active, and where does the first matching rule send the request? Only then check the outbound: can a direct connection reach the destination, or can the selected proxy connect? Connection details often show the destination, matched rule and outbound. Find the first point that differs from what you expected; don’t replace your subscription as soon as you see a timeout.
DIRECT means the core connects directly; REJECT means it blocks the request. Both are outcomes after the request has entered the core. Turning off the system proxy or stopping VPN capture on a phone changes the entry point instead. Existing connections may remain open for a while and may no longer appear in the logs. When testing, close old tabs and open the destination again. That makes changes easier to spot than repeatedly refreshing a page that reuses its connection.
DNS resolves domain names to addresses. Whether a rule can match a domain depends on what information the core receives through that entry point. A system proxy may pass the domain directly, while some apps resolve it first and connect by address. The same site can therefore show different fields in the logs depending on how you access it. When starting out, keep the client’s default DNS settings and learn to read the destination and matched rule. Once the basic path works, test resolution and routing separately in the later sections.
Keep a Baseline for Comparison
Pick a website you can usually open and note whether it works with the client off. Then record the active configuration, entry point, mode and selected group member, and visit the same site after connecting. Use this as your baseline. If you’ve just changed the mode, don’t also change routing rules or enable TUN. If something goes wrong, use your notes to retrace your steps instead of reinstalling and losing useful context. Give configurations names that make their purpose clear rather than calling every file “Default.”
Keep the scope of your test in mind, too. A page loading in your browser only confirms that this browser request worked; it doesn’t mean file sync, video playback or other processes took the same route. For an initial check, distinguish the app you’re testing from a control app, and note roughly when you tested. If no new log entry appears, first confirm that the request was made again, then check the entry point. Old logs and routine background traffic can look busy without proving anything about your test.
Troubleshoot in order: check whether the request reached the core, which rule matched, and then which outbound handled it. Change one thing at a time.
Choose a Client: Start with Your Platform, Then Your Needs
On Phones, Start with the Import Method
Start on the Download page by selecting your operating system. For Android, iOS, Windows and macOS, start with Clash Plus. For Linux, consider Clash Verge Rev or FlClash. Ask three questions when choosing: what format is your subscription in, can your system run this package, and can the client show connection details? The controls you’ll need most at first aren’t advanced settings, but the configuration list, group switching and error messages. If those are easy to find, you’ll be ready to troubleshoot.
For Android, see the platform-specific notes for Clash Plus, Clash Meta for Android, FlClash and Surfboard. Don’t guess your device’s architecture from its memory or the processor’s marketing name. A processor may support an instruction set that the installed system can’t use with a particular package. Check the manufacturer’s specifications against the builds listed on the download page. If the required architecture isn’t available, choose another client for the same platform rather than using a package built for a different architecture.
On iOS, use the App Store link on the download page to find Clash Plus. Check the system requirements in the store listing, then locate the client’s configuration import, proxy groups and connection or log views. Android interface guides can help explain the order in which settings take effect, but their authorization steps and prompts don’t necessarily apply to iOS. When switching phones, make sure the subscription works on the new device before retiring the old one. Also check for other VPN configurations or device-management policies.
On Desktop, Check the Architecture and Entry Point
| Platform | Start with | Check before installing |
|---|---|---|
| Android | Clash Plus | System version, available architecture and VPN authorization |
| iOS | Clash Plus | Device requirements in the store and existing VPNs |
| Windows | Clash Plus | Operating system, installation permissions and current proxy settings |
| macOS | Clash Plus | Apple silicon or Intel processor |
| Linux | Clash Verge Rev、FlClash | Distribution package format, architecture and dependencies |
On Windows, check System type under Settings → System → About. On macOS, open About This Mac and choose the package for the listed chip or processor. On Linux, check both the architecture and the package format used by your distribution; Debian-based distributions and Fedora, for example, usually use different formats. A package opening successfully doesn’t mean all dependencies are installed. Check your distribution’s or the download page’s installation instructions before choosing a graphical installer or package manager.
On Windows, compare Clash Verge Rev, FlClash and Clash Nyanpasu. On macOS, you can also compare Clash Verge Rev and FlClash. Clash for Windows and ClashX Meta are discontinued, archived options best used as references when migrating an old configuration. A fresh install and a migration are different tasks. For a fresh install, focus on getting a repeatable connection working. For a migration, first record the old client’s subscription, rule overrides, ports and system proxy state, then restore them one at a time.
Check Compatibility in Two Passes
First, check the basics: import a configuration suited to the client, confirm the proxy groups are present, start the client and verify that real requests appear. Only then check whether advanced fields carry over, such as rule providers, DNS settings or override options. Different interfaces may accept the same file but apply their own settings at startup. If a YAML edit has no visible effect, check for overrides or a generated runtime configuration before editing the original file again.
A standalone mihomo core is best suited to users who already understand its working directory, permissions and startup process. On a regular computer or phone, start with a graphical client to establish a baseline. If you need to run mihomo as a service, check the core section of the download page. Don’t let two clients capture traffic on the same device at once: the later one may overwrite system proxy settings, and virtual interfaces may compete over routes. To compare clients, quit the first one and test the same destination with the second.
Once you’ve chosen a client, note its name, the system architecture and where you got the package. If you’re sharing recommendations with family or coworkers, send them the platform-specific link on the download page rather than forwarding your installer. Their device architecture, store access and management policies may differ from yours. The FAQ at the bottom of the download page can help with package and platform choices. Troubleshoot runtime issues in the sections below instead of replacing a client that already works just because its interface uses different terms.
Install and Authorize: Connect the Client to Your System
On Phones, Check Installation and VPN Access Separately
On Android, choose a package from the Android downloads section, then open it from your system’s downloads list. If Android asks you to allow apps from this source, confirm that the installer is the browser or file manager you just used, then follow the prompt. You can turn off permission for that source after installation. If you see a package parsing or signature conflict, check the architecture, system version and whether an app with the same name is already installed. Don’t delete app data just to see if it helps.
The first time you start a connection in the app, Android will usually show a system request to set up a VPN connection. Confirm that the request comes from the client you just installed before granting access. This step doesn’t depend on importing a subscription first, but the client generally needs an active configuration to start working. Return to the app and check the connection status. If it hasn’t connected, see whether another VPN is running or your device has an organization-managed always-on VPN. Follow your organization’s policy on managed devices.
After installing on iOS, open the client once. If it needs to add a VPN configuration, iOS will ask separately; confirm as prompted. You can check the connection in the client or in the system’s VPN settings. If you already have a personal VPN or work configuration, identify which app owns the current connection before making changes. Don’t delete profiles from unknown sources. If no authorization prompt appears, return to the app and make sure you actually started a connection rather than repeatedly tapping an old item in Settings.
Don’t start by changing every background permission. First, connect with the screen on and a stable network. Then lock the screen for a few minutes and retry in the same app. If the connection only drops while the screen is locked, check the app’s battery restrictions and background-use settings. On some manufacturers’ devices, these options are spread across app info, battery settings and autostart management. The Android authorization and background operation guide can help you find them.
On Desktop, Check the Installation Scope and Running State
Before installing on Windows, quit any existing proxy client and note any manual proxy address or automatic configuration already set in Windows, especially on a work computer. Follow the installer’s prompts to choose whether to install for the current user or the whole system, and grant only the permissions needed for that step. After installation, check whether a similar app is still running in the system tray; closing its main window may not quit it. For the first test, use the system proxy instead of installing a service or changing routes.
On macOS, open the disk image, move the app to Applications as instructed for that package, then launch it. Don’t keep running it from the mounted image. If macOS blocks startup, read the warning and check the app’s source; don’t disable system-wide protections for a single package. On Linux, install with a package manager suited to your distribution. If you see a dependency error, check whether it concerns a missing library, permissions or package architecture. Once the interface opens, check in your desktop network settings whether the proxy entry actually changed.
Test Both Connecting and Disconnecting
“System proxy” on desktop and “VPN” on a phone are different entry points. For your first test, use a browser that respects the system proxy on desktop, or a regularly used foreground app on your phone. You can check that the interface opens before importing a third-party configuration, even without a subscription. Run a network test after completing the import in the next section. Check these separately: the interface says it’s running, the system entry point is enabled, and a request from your target appears in the connection list.
Before quitting, check the reverse path: turn off traffic capture, confirm your regular network works again, then quit the app. If a desktop browser still points to a local port that is no longer listening, it may report that the proxy server isn’t responding. Check the address actually saved in system proxy settings. If a phone can’t connect after VPN disconnects, look for an always-on VPN or a system option that blocks connections outside the VPN. Note the original settings and restore only what you need; don’t overwrite a proxy that belongs to your network.
For a fresh install, enable just one client and one entry point. Confirm your regular network still works before testing subscriptions and routing rules.
Import a Subscription: Check the Format, Select a Configuration, Then Update
Tell URLs, QR Codes and Files Apart
Look for an Add option under “Profiles” or “Subscriptions” in the client. If your provider gives you a Clash- or mihomo-compatible subscription URL, import it by URL. If they give you a local YAML file, import the file. A QR code just transfers text to another device; it might contain a subscription URL or a link for one proxy. After scanning, check which type the client detected. Don’t try both types in the same input field.
A complete Clash YAML file can include proxies, proxy groups and rules. A proxy list may contain only connection details; even if the client can read it, it might not create the routing rules you need. Some providers also require you to choose the client format on their website. Copying the browser’s address bar may just give you a sign-in page. If the first import fails with a format error, check the provider’s export options, then use the subscription format guide to confirm the right import method.
After pasting a URL, remove any accidental spaces at the beginning or end, but don’t delete parameters after the question mark. Those parameters may contain subscription credentials. Hide the full URL and QR code in screenshots, and don’t paste them into public logs or online conversion tools. If a download fails, note the status and time. For example, an authorization failure and an invalid content format are different problems: check the URL’s access first in the former case, and whether the content matches a supported format in the latter.
Importing a Configuration Doesn’t Activate It
Give the new configuration a name you’ll recognize, save it, then return to the list and make it the active configuration. Open the proxy groups and check which groups are available and what’s selected by default. Then go to the connection page, start the client and generate a request. If you still see the old group names, you may have saved the new configuration without switching to it, or the client may have fallen back to the previous one while loading. Check the “Current configuration” indicator and any load errors before importing the same URL again.
After importing a local YAML file, an app may save a copy. Editing the original file in your file manager might not change the active configuration. You’ll usually need to import it again or use the editor in the app. Use spaces for indentation, align fields at the same level and don’t mix in tabs. If the client reports a parsing error on a particular line, also check the colons, quotes and indentation above it. The reported line is often just where the core finally couldn’t continue reading.
If you see an error saying a policy doesn’t exist, compare the name in the error with the group name in your configuration. Check spaces, capitalization and punctuation carefully. If the import succeeds but startup fails, work out whether the configuration failed validation or there’s a conflict with a port, VPN or permission. Check configuration errors for the former; return to installation and authorization for the latter. On a phone, the visible error may be brief. Look in the client’s logs or diagnostics for the full line, and share only the relevant excerpt—not the entire subscription.
Keep Remote Updates Separate from Local Changes
Run one manual update first and confirm that the configuration source and update time display correctly. Then set “Auto update” according to your provider’s recommendations. If the client asks for an interval in hours, start with once a day rather than refreshing repeatedly at short intervals. The client needs access to the subscription service to update. If it can’t load the result, switch back to the last working configuration and check the update. A failure after a change could be due to new content or simply a network that can’t retrieve the file.
Don’t put custom rules you plan to maintain long-term directly in a subscription that refreshes. If the client supports overrides or merges, put local rules there and confirm whether they’re inserted at the top or appended at the end. If it doesn’t, keep a separate copy of a working configuration. Note the source, the active settings and where you made changes. If a subscription later renames its groups, you’ll only need to check references and overrides, not search a large unfamiliar file for edits you made.
Proxy Modes: Rule, Global and Direct
Modes Change the Policy, Not the Capture Scope
For everyday use, choose “Rule” under “Proxy mode.” It selects an outbound for each new connection according to the rules in the active configuration—for example, sending resource requests through a group while letting other requests connect directly. “Global” sends traffic that reaches the core to the global selection. Check the selected outbound in the GLOBAL group; switching modes doesn’t automatically pick a remote proxy. “Direct” sends requests that have reached the core directly. That’s different from turning traffic capture off.
If an app never sends requests through the system proxy, switching to Global won’t capture them. Whether the desktop system proxy works depends on how the target app reads system settings. On a phone, the VPN entry point may also be affected by the client’s or system’s app-scope settings. When testing all three modes in the same app, keep the entry point unchanged and confirm that a new request from the app appears in the connection log. Otherwise, you may be comparing entry points rather than policy outcomes.
After switching modes, establish a new connection. Browsers may reuse connections, and media playback or background sync may not immediately use the new policy. Close and reopen the relevant page, or end the app’s old session if needed. Check the new connection’s destination, matched rule and actual outbound. The main domain in the browser’s address bar is only a starting point: the page may also request login services, images or other domains, each with its own result.
Understand the Three Modes with a Minimal Configuration
Here’s a local practice file that can be loaded by mihomo on its own. It exposes a proxy port only on your device and contains no remote proxies. In Rule mode, it rejects requests matching the example domain and sends the rest direct. If the local port is already in use, stop the test instance using it or choose a free port. A graphical client may override the port, so use the actual listening port shown in its interface. Don’t replace a subscription you’re actively using with this example.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- DOMAIN,example.com,REJECT
- MATCH,DIRECT
On desktop, if curl is available, start the core and send a request explicitly through the local proxy with curl --proxy http://127.0.0.1:7890 https://example.com/. In Rule mode, it should be rejected. Switch to Direct and run the command again; it should attempt a direct connection, although whether the page loads depends on your network. This test doesn’t depend on your browser’s system proxy settings, and the destination should appear in the logs. It doesn’t prove other apps use the same entry point.
Compare Modes to Narrow Down a Problem
With a real configuration, if a site won’t load in Rule mode, briefly switch to Global, select the same proxy you know works, and reopen the site. If it loads in Global but not Rule mode, check the rule order and the selected group in Rule mode. If both fail, check the proxy, destination or entry point. Switch back to Rule when you’re done. Global also sends traffic that would otherwise connect directly through the selected outbound, so it isn’t a good long-term fix when you don’t know which apps are in scope.
A latency test within a group only shows whether its test destination responded at that moment. It doesn’t tell you whether every site will load. A result in the proxy list doesn’t replace a test in the target app, either. Groups that select automatically may switch members after the next check. For a first diagnosis, use a manual selection group to pin one working option, note its exact name in connection details, then follow the first connection verification steps to compare results.
When you no longer need the proxy, disconnect with the client instead of just switching to Direct. If several apps are running, check which one the system proxy points to and compare it with that app’s logs. On a phone, note any per-app include or exclude list in your test results. That way, when you want to test rules again, you won’t have to guess: send the same app through the same entry point and compare new connections across modes.
Routing Rules: Top to Bottom, First Match Wins
Describe the Destination Precisely
DOMAIN matches one exact domain and is useful for a specific host. DOMAIN-SUFFIX covers the domain and its subdomains, making it useful for a whole domain family. Don’t paste a full web address with a protocol, port or path. If you only need to change the handling of one host, start with its exact domain rather than widening the match to the whole suffix. Broad keyword matches can affect unrelated services, so use them only after checking their scope.
Address rules match a destination address or network range. Use IP-CIDR for an IPv4 range and IP-CIDR6 for IPv6. First confirm that the destination falls within the range. An exception covering IPv4 alone won’t address a difference when the same service connects over IPv6. Some address rules support the no-resolve option to avoid resolving a domain just for that rule. Don’t expect it to match a request that has only a domain name and no usable destination address.
Put Specific Exceptions Before Broad Rules
The core checks rules from top to bottom and selects a policy as soon as one matches. For example, if you want to reject one test subdomain but send other requests with the same suffix direct, put the exact-domain reject rule before the suffix rule. MATCH is the fallback and belongs at the end. If you append a custom rule after it, the rule won’t take effect even if it’s written correctly. After using an insert or append option in a graphical client, check the final rule list rather than just the editor.
rules:
- DOMAIN,test.example.com,REJECT
- DOMAIN-SUFFIX,example.com,DIRECT
- IP-CIDR,192.0.2.0/24,DIRECT,no-resolve
- MATCH,DIRECT
The domains and network ranges above illustrate rule order; they aren’t addresses for live services. You can replace the corresponding section in the practice configuration from the previous chapter. The fallback here is also Direct, so the suffix rule mainly makes a clear match appear in the logs. A website loading doesn’t prove that the rule worked. If a real configuration uses a broad domain collection for the suffix, note which services in that collection already use different policies, then check them individually.
Rules in real subscriptions may point to proxy groups, but every group name used in a rule must exist in the active configuration. Don’t copy group names from a guide; find your own group in the proxy group view, then check the actual outbound in the logs. A RULE-SET reference must also match the provider name in the configuration. Make sure the provider’s declared behavior and format match the file. If a rule set fails to update, check its load status rather than treating an unavailable condition as an active safeguard.
Verify Every Change with a Positive and a Negative Test
Prepare two requests for each new rule: one that should match it and a nearby one that shouldn’t be affected. For example, add an exception for a login domain while checking that regular resource requests still use the original policy. If a page redirects, look in the connection list for the domain actually requested. A failed load may come from another request, not the main site’s rule. Don’t start by exempting an entire suffix; keep the change scoped to the problem you observed.
If the logs show no match, first check that the configuration is active and Rule mode is selected, then look for an earlier rule taking precedence. If the log shows only a destination address, go back to the entry point and DNS to check whether the core can see the domain. If the correct rule matches but the connection fails, check its group and proxy instead of moving the rule. For more examples, see rule syntax and priority. Make sure the rule types match the fields in your actual configuration.
After making a change, note what the rule is for and how you tested it locally. Don’t just write “fixed.” Record which app it serves, which connections should not match, and which rule to remove if you need to undo it. Organize local overrides by purpose. When you update a subscription or add a client, use your notes to rerun the test. If the original use case no longer applies, remove the exception on its own and test again. That keeps the rules from piling up until no one can tell what’s doing what.
TUN and DNS: Verify the Entry Point Before Capturing More Traffic
TUN Handles the Traffic Entry Point; DNS Resolves Names
The desktop system proxy only affects apps that choose to use it. If an app ignores it, check the app’s own network settings before considering TUN in the client. TUN uses a virtual network interface and system routes to send eligible traffic to the core. It may cover more traffic, but it doesn’t guarantee that every request will be handled by the core. Permissions, interfaces, exclusions and network conditions all affect the result. Test with one app you actually want to capture; don’t use Global mode as a substitute.
Mobile clients often capture traffic through the system’s VPN framework, and their interfaces may not have a TUN setting with the same name as on desktop. Don’t install extra components just to find a switch mentioned in a guide. If a desktop client asks to install a service or grant network permissions, read its prompt and check for existing VPNs, virtual interfaces or network tools required by your organization. Note the existing setup so you can tell whether a later problem comes from the client’s routes or a disruption to your usual network.
fake-ip is a DNS enhancement mode. For eligible requests, the core assigns a temporary address to the domain and can later use its mapping to recover the domain for rule matching. Seeing such an address doesn’t mean the site’s public DNS record has changed. Other DNS settings keep the real address, but if an entry point provides only an address, whether the core can identify the domain depends on the situation. Choose a mode based on how it works with the apps you actually use.
Run a Small Test You Can Undo
Enable TUN on a configuration you’ve already verified, without changing the proxy mode or routing rules. For a desktop test, turn off the system proxy you’re using as a comparison so browser requests don’t take two paths. On a phone, use the client’s existing VPN entry point. Visit the same destination and check whether the connection that was previously missing appears. Then test a local resource you actually need, such as your printer’s admin page. If the network behaves unexpectedly, turn off TUN, return to the original entry point and confirm things work before changing anything else.
Here are mihomo TUN and DNS fields to help you understand what a supported client is using. Add them to a configuration that already works; don’t duplicate top-level sections that are already in the file. auto-route lets the core configure routes automatically. The entries under dns-hijack handle the corresponding ordinary DNS requests; they don’t mean that an app’s own encrypted DNS will be handled the same way. This also requires platform support, permissions and an available upstream resolver.
tun:
enable: true
auto-route: true
dns-hijack:
- any:53
dns:
enable: true
enhanced-mode: fake-ip
Diagnose DNS and Routing Separately
If only domain names fail, first check whether DNS responds, then look at the returned address and the connection that follows. If a temporary address is returned but no matching connection appears, check whether the request is leaving through the expected capture path or using a cache from the previous DNS mode. After changing DNS settings, restart the test app and make a fresh request. If regular websites work but discovery of a local device fails, first check the app’s local network permission, then see whether that name needs a DNS exception.
If an app really needs the real address, check whether the client supports exceptions for specific names with fake-ip-filter. Start with just the name that reproduces the problem, then run a reverse test with an app that works normally. Troubleshoot DNS upstreams and routing rules separately. If an upstream is unreachable, finer rules won’t fix a DNS timeout. If resolution works and the logs show the expected policy matched, check that outbound instead of adding more DNS servers.
Symptoms can change when you move from home to mobile data or an office network. First turn off traffic capture and complete any network checks or sign-in required by that connection. Then reconnect as before; if needed, establish the upstream connection again. Don’t use old logs to judge a new network. Follow the routing and DNS policies on managed networks. Before enabling these settings, practice switching back to the regular entry point from a failed connection.
Maintenance: Updates, Troubleshooting and Rollback
Update the App, Core and Subscription Separately
An app update may change menus, authorization steps or overrides. A core update may change how configurations are parsed or which protocols are supported. A subscription update may change the configuration, group members and rules. If something breaks after an update, first work out which layer changed. Don’t update the client, replace the subscription and change DNS all on the same day. Keep a known-working configuration and brief test notes. Retest after changing each source so you have something to compare if a problem comes up.
If the client lets you update the core separately, make sure it’s an option officially supported by the app. An app’s built-in core may not support independent replacement; don’t manually swap programs in the installation directory. Before updating a subscription, note the currently selected group member. Some subscriptions rename groups or retire proxies. If the connection becomes unstable after an update, check whether your group selection or overrides still refer to old names before deciding whether to update those references or temporarily use the previous configuration.
Keep at least three things distinct in your backups: the original subscription or imported file, local overrides, and operating notes without credentials. A configuration backup may contain proxy keys or subscription URLs, so store it somewhere you control rather than in a public repository or shared drive. Screenshots aren’t enough; they often don’t capture overrides. You don’t need to back up every runtime cache, either. Before restoring, check your notes for settings saved by the system that won’t be restored with the configuration file.
Choose a Troubleshooting Path from the Connection Logs
If nothing works in any app, turn off traffic capture and test your regular network first. If that also fails, check Wi-Fi sign-in, mobile data or leftover system proxy settings. If the regular network works but fails with the client enabled, check whether the core started and the configuration loaded. If no target request appears in the logs, go back to the entry point. On a phone, make sure the VPN shown by the system belongs to the current client; another always-on connection can be misleading.
If only one app fails, find a successful request to compare. Check whether both apps appear in the logs, which rules match and which outbound each uses. If only one domain fails to resolve, note the current network type and DNS mode. If only one group fails, retry with a known-working member of the same group. If the problem happens mainly after locking the screen or changing networks, check reconnect and background permissions first. Don’t mistake a single disconnect after sleep for a rule problem.
When preparing a diagnostic report, note when it happened, the system, client name, entry point, mode and shortest steps to reproduce it. Include one representative chain of events, such as destination seen, Direct rule matched, connection timed out. Before sharing, remove the full subscription URL, credential values and identifiable device names. You can temporarily raise the log level to investigate, then return it to normal after reproducing the issue. Status colors and error counts can’t replace a clear reproduction.
Practice Recovery While Everything Works
Before changing a configuration, save a copy and keep one known-good configuration as a rollback option. If the new one won’t start, switch back, then restore the previous proxy mode and group selection. If needed, turn off TUN temporarily or restore the system proxy. Retest a regular website and an app you actually need. If the old configuration also fails, return to the network baseline test instead of reinstalling repeatedly. Permissions, system routes and remote subscriptions can all be stored outside the installation directory.
If an old client is discontinued, migrate in stages using the client migration guide. First verify the original subscription in the new client, then add local overrides, rule sets and DNS settings. Don’t carry over every cache and runtime setting at once. Avoid switching all your devices at the same time; keep one working device for comparison. Once migration is complete, remove the old client’s autostart and traffic capture, confirm there are no leftovers, and note the new rollback option.
Next Steps: Make Every Configuration Change Testable
Start with a Separate Practice Configuration
Before going further, make sure you can explain three things: which entry point a request uses, how a rule selects a policy and which outbound the policy uses. Change one condition in the minimal configuration above, predict what the logs will show, then test it. The practice file uses only example domains and built-in policies—no subscription or remote proxies required. Once you can explain both a match and a non-match, apply the same pattern to a real configuration. Build more complex features on tests you can repeat.
Desktop users with the mihomo command-line program installed can save the practice file as config.yaml, then run the command below from that directory. -t tests the configuration; -f specifies the file. Complex configurations may refer to rule sets or other files, so prepare the working directory and dependencies before checking them. If the graphical client has a “Check configuration” option, try that first, especially if it merges overrides.
mihomo -t -f ./config.yaml
A successful command only means the check found no issue that would prevent the configuration from loading. It doesn’t prove that a proxy is reachable, DNS behaves as expected or rules are in the right order. A graphical interface may also rewrite the entry point or mode after loading. Start the relevant instance and verify it with a request that definitely goes through it. If the check fails, read the first actionable error and change the smallest possible area. One indentation or reference issue can trigger several follow-up errors; don’t fix them blindly one by one.
Separate What You Maintain
As your rules grow, distinguish device-specific exceptions from baseline policies shared across devices. Keep device-specific settings in local overrides and document the purpose of shared rules. If you plan to use rule providers, start with a small, readable rule set. Check its declared name, file type and update source before connecting it to RULE-SET. Test both a normal match and what actually happens when the file is unavailable.
Only then consider proxy groups that select automatically or fail over. Be clear about what you’re optimizing for: rotating through known-good outbounds, or switching when a preferred one fails. Health checks sample a test destination; they don’t represent real traffic. Checking too frequently also creates extra traffic. When testing a new group, point a dedicated rule to it and watch actual connections as its members change. Once it’s stable, decide whether it should replace your everyday default group.
If you use multiple devices, create a local test sheet with the same destinations, rules and expected policies for each. On phones, focus on screen locking and network changes; on desktop, compare the system proxy and TUN. If devices have different capabilities, use different settings to achieve the same goal. Don’t enable unrelated features just to make every configuration identical. To share an example, rewrite a small snippet from a separate practice configuration and keep only the fields needed to explain the result.
Check the Rollback Path Before Applying Changes
A full acceptance test can take just a few requests: one service that should go direct, one that should use a specified group, one control that the new rule shouldn’t affect, and one baseline with traffic capture off. If the change involves DNS, also check a resolution failure case or local network access. Record expected and actual results for each. If they don’t match, return to the previous configuration instead of changing proxies and rules halfway through the test. A successful test gives you a baseline for the next update.
If everything works for everyday use, stop here. Follow the sequence—rules, proxy groups, network entry points, then DNS—only when you have a specific problem to solve. If you’re setting up a phone for a family member, return to the Setup Guide for a basic connection. For unfamiliar settings, check the Glossary. The priority isn’t to enable more options; it’s to know which change affected the result and how to return to the last working state.