01 / COMPONENTS
Core concepts: clients, cores, and traffic entry points
The client manages settings; the core handles connections
The window on your desktop is the client interface. It imports configurations, displays proxy groups, stores interface settings, and may start the background service. The proxy core is what listens on local ports, evaluates rules, and establishes connections. The two don't always start and stop together: closing the window may only hide it, while quitting from the system tray may stop the background service. Some clients manage the service separately. If the window is open but apps can't connect, check the logs to see whether the core started successfully. Conversely, if the window is closed but the system proxy still points to a local port, check whether the background service is still running rather than relying on the window's status.
Clash, Clash Meta, and mihomo aren't interchangeable modes you can switch between in the interface. Clash is a widely used ecosystem name; Clash Meta is a later core fork, and mihomo is the name of the project that evolved from that fork. An interface labeled Clash doesn't tell you which protocols, rule types, or DNS fields its core supports. Check the app's documentation before downloading, then confirm the loaded core under About, Core, or in the startup logs. Use the core comparison to help choose; if a field is reported as unsupported, first identify which core produced the error.
How a request moves through the system
Take a browser as an example. If it follows system proxy settings, it can send requests to a local HTTP proxy port. Apps with manual proxy settings can use the same address directly. An app that opens its own connections without reading system settings may bypass the core entirely. TUN receives traffic routed through the operating system's virtual network interface. These two approaches determine how traffic gets in. Rule, global, and direct modes determine what happens after it gets in. Switching to global mode won't capture apps that weren't routed through the core in the first place; turning off TUN doesn't necessarily disable an active system proxy.
Once traffic reaches the core, the mode, destination, and configuration determine its route. A rule can end with DIRECT, REJECT, a defined proxy, or a proxy group. A proxy group isn't a server: some groups let you choose a member, some test their members, and others switch based on availability. A connection log showing a matched rule only confirms that the connection reached the decision stage. Check the final policy chain and look for connection errors too. DNS resolution may happen in the client, core, or proxy, depending on the entry point, protocol, and configuration. You can't infer where resolution happened just from the domain shown in a browser.
Four checkpoints to find the first failure
Follow the same troubleshooting order each time: configuration loaded, request reached the core, policy matched, and outbound connection succeeded. Seeing an entry on the configuration page doesn't mean it's active; seeing the core running doesn't mean an app is using it. Open the connections page, send a recognizable request, and find it by destination and time. If it isn't there, check the app's proxy settings and the system entry point. If it appears under the wrong policy, check the mode, rule order, and group selection. If the policy is right but the request fails, check DNS, the destination's response, and the upstream connection. For HTTPS certificate warnings, check the system clock, destination, and trust settings; don't dismiss the warning just to test whether the proxy works.
02 / CLIENTS
Choosing a client: platform, architecture, and requirements
Choose for your device first, then filter by essential features
Being installable is only the first requirement. Start with your operating system, processor architecture, and whether you can change network settings. Then list the features you need: importing a subscription and selecting groups manually, editing overrides, inspecting individual connections, or capturing apps that ignore system proxy settings. For platforms where Clash Plus is available, it's our first recommendation; on Linux, start by comparing Clash Verge Rev. If you already have a configuration, check that its core, rule providers, and protocols are supported. Even when two clients display the same proxy groups, a particular setting may be editable in one but only adjustable through configuration or overrides in another.
| Platform | Clients on the downloads page | What to check before choosing a package |
|---|---|---|
| Windows | Clash Plus, Clash Verge Rev, FlClash, Clash Nyanpasu, Clash for Windows (archived) | Operating system and installation permissions |
| macOS | Clash Plus, Clash Verge Rev, FlClash, ClashX Meta (archived) | Apple silicon or Intel |
| Android | Clash Plus、Clash Meta for Android、FlClash、Surfboard | Supported app architecture for your device |
| iOS | Clash Plus | System requirements listed in the store |
| Linux | Clash Verge Rev、FlClash | Distribution, package format, and architecture |
Check the architecture and package format; don't guess from the device's appearance
On Windows, check Settings → System → About for your system type, and distinguish x64 from ARM64. Even if a type of app can run through emulation, that doesn't mean its network driver or background service will work. On macOS, check About This Mac for the chip or processor. Choose the Apple silicon package for an Apple chip, or the Intel package for an Intel processor. If Android doesn't show the architecture in its settings, check the device manufacturer's specifications for the app ABI. A 64-bit processor doesn't guarantee that the operating system can install 64-bit apps. If the downloads page lists a universal package for your chosen client, check its supported devices first.
On Linux, check which package format your distribution supports, then choose the matching architecture. A Debian-family .deb package can't be used with an RPM-based distribution just by changing its file extension. Run uname -m to check the system architecture: x86_64 usually means AMD64, and aarch64 means ARM64. Confirm the package manager and requirements listed by your distribution and on the downloads page. The standalone mihomo core listed there is suited to servers or routers that need service management—for example, where you need to manage the configuration directory, service account, and startup order yourself. It isn't a replacement package for a desktop GUI client, and it shouldn't share a listening port with a core bundled in a client.
Before switching clients, check what you need to preserve
If you already use a client, save the original configuration and any local overrides, and note the active profile, operating mode, and manually selected policies. First import the same configuration into the new client and inspect it without making changes; then create one connection to compare. Don't copy the entire application data directory: it may contain startup tasks, system permission state, or files specific to the old client. Keep archived clients mainly for reference in existing setups, not as the default choice for a new installation. If your configuration relies on a client-specific subscription converter or script extension, check those steps separately. A successful import only confirms that the file was read—not that extensions came along with it.
If you don't have a preference yet, use the client comparison to choose one, then check the platform details on the downloads page. Establish a working baseline with one client first. If you want to compare another, fully quit the first one and note the configuration and entry point used by each. Otherwise, port conflicts, changing system proxy settings, or competition over a virtual interface can look like differences between the clients themselves.
03 / INSTALLATION
Installation: start the core and verify the local listener
Install the app first, then review network permissions
For desktop clients, select the right package on the downloads page, then follow the system prompts to run the installer. For a disk image, move the app to Applications before launching it. The first time you open it, verify the app's source and review any system prompts before granting permission; you don't need to disable system security to install it. If the system reports an architecture mismatch, go back and choose a different package. If the installer opens but the client reports that a background component failed to start, distinguish installation from runtime issues: installation problems usually involve permissions, package format, or the destination folder; runtime problems usually involve app logs, service status, or listening ports.
When installing Android apps from a selected source, the system may ask you to allow the current browser or file manager to install apps. You can revoke that permission afterward. On iOS, open the app's store listing from the downloads page and follow the store's requirements. The first time you enable a tunnel on mobile, the system will usually ask for VPN permission; check which app is making the request. If your device already uses a work-managed VPN or an always-on VPN, follow your device policy rather than removing it without authorization. A VPN icon only shows that a related network session is active. Verify that the apps you care about are actually connecting as configured.
Verify the listener first; don't redirect all system traffic yet
After starting a desktop client for the first time, find the local proxy port in its settings and check the logs for a successful listener startup. Don't assume a common port number is fixed: desktop clients may override the configuration at startup, and other apps on the same machine may already be using it. The following standalone configuration is for a direct-connection test with mihomo. Import and activate it as a separate local profile; don't overwrite an existing subscription. Leave the system proxy and TUN off, and first test a request that explicitly uses the local entry point. This test file contains no upstream proxy and needs no subscription.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- MATCH,DIRECT
mixed-port accepts both HTTP proxy and SOCKS requests on the same listening port. In this example, allow-lan: false prevents other devices on the local network from accessing the proxy. Replace the port in the commands below with the actual listening port shown in the client. Run the two commands separately: the first bypasses any explicit proxy as a baseline; the second clears the proxy bypass list for this request and explicitly uses the local HTTP proxy. If Windows resolves curl as an alias, use curl.exe. The -I option fetches only response headers, so choose a destination that should be directly reachable. The key check is whether the client shows the second request.
curl -I --noproxy "*" https://example.com/
curl -I --noproxy "" --proxy http://127.0.0.1:7890 https://example.com/
When startup fails, distinguish the entry point from the outbound connection
If the port connection is refused, check the core status, address, and port first—not the subscription. If the logs say the address is already in use, quit other proxy apps and any leftover background processes, then restart the core. If you need a different port, change it in the client settings and repeat the comparison using the new value. If the local port is reachable but the core logs show a timeout to the destination, the entry point is working; check whether the current network can reach the test site directly. If both commands time out, the second command failing alone doesn't prove the client is at fault. If the second command reports an authentication error, check whether authentication is enabled for the local proxy in the client. Don't weaken access controls on a shared device just to run a test.
After testing, note the actual port, core name, and whether system settings remain in place when you quit the client. Restore any settings you changed. Don't enable autostart until the installation is verified; otherwise, restarting may change the environment before you know what worked. When running the core independently on Linux, observe the logs in the foreground before configuring it as a service. If it starts in the foreground but not as a service, compare the working directory, configuration permissions, and environment for each launch method. You don't need to run the entire app with elevated privileges as a first step.
04 / PROFILES
Importing a subscription: download, parse, and activate
Distinguish local files, remote subscriptions, and providers
The configuration page usually offers two ways to add a profile: import a YAML file or add a remote subscription. A local file is a static copy and won't change when its source changes unless another mechanism updates it. A remote subscription keeps its update URL, allowing the client to fetch updates and replace its local cache. A complete configuration can define listening ports, proxy groups, rules, and DNS. Within a complete configuration, proxy-providers and rule-providers reference other resources. A file containing only a rule list may not be a complete configuration that can be activated; a subscription containing only connection entries may not be YAML that the current core can read directly. Confirm the output format with the provider before choosing an import method in the client.
A remote URL may contain access credentials. Treat it like a password: don't post it on public forums, in log screenshots, to online conversion services, or in support requests. Even if the interface hides the end of the URL, exported configurations and diagnostic bundles may still include the original value. If the subscription source is unfamiliar, inspect it in a local text editor first for remote rules, overrides, or settings that expose a local listener. If your network is managed by an organization, confirm which configuration sources and connection methods are allowed. Being able to import a file doesn't mean it's an authorized network setup.
Import the profile on the configuration page, then activate it manually
Open Configuration, Subscriptions, or Profiles, then add a remote URL or select a local file. For a remote subscription, run a manual update first and check the status and logs. Once the client reports a successful download, select the profile and choose Enable or Apply. Check that the expected group names appear on the proxy page and that the logs show no load errors. Some interfaces only preview a profile when you select it; you have to apply it separately. Others activate new entries automatically. Confirm the active status in the interface and create a new connection rather than guessing from the order of files in the list. Disable automatic updates during the first switch so new content doesn't overwrite the troubleshooting state later.
If import fails with an indentation or mapping error, note the line number and message, then check the block just above it. YAML list items must be aligned at the same level; don't use tabs for indentation. Use a standard colon followed by a space between keys and values. Full-width punctuation is fine in comments or text where it's needed, but not as YAML syntax. If a policy can't be found, check the group name for spaces and matching capitalization, and verify that the third item in the rule refers to an existing group. The client may also have downloaded a login page instead of YAML. The status might look successful, but the content starts with webpage markup. Check the URL and service status rather than trying to turn the webpage into valid YAML.
If an update fails, fall back to the last working copy
When an update fails, first determine whether the client couldn't fetch the subscription or fetched it but couldn't parse it. For fetch failures, check timeouts, authentication, and the server response. For parse failures, check the line number and core fields in the logs. Whether background updates use the system proxy depends on the client. If updates depend on the active configuration and that configuration is broken, use the client's offline import option to restore a known-good local copy before troubleshooting the subscription. Don't delete the only usable cache to test the remote URL, and don't keep retrying until useful log clues are overwritten.
A remote subscription isn't the right place for long-term manual changes; a refresh may overwrite them. If the client supports overrides or merges, put local rules and preferences there, then inspect the merged active configuration. If you need to edit independently, make a local copy and note that it won't automatically track remote changes. For multi-device setups, record the entry point and port for each device. A subscription working on desktop doesn't guarantee the same permissions, DNS handling, or background update behavior on mobile.
05 / MODES
Proxy modes: rules, global, and direct
Identify the traffic entry point before switching modes
System proxy settings direct apps that follow them to a local port. Rule, global, and direct modes determine how the core handles connections that have already entered it. For an initial desktop test, enable only the system proxy or configure a single app manually; don't turn on TUN at the same time. Choose a request you can identify on the connections page, then check its matched policy and final selected member in the client. If the request doesn't appear there at all, don't keep switching modes. First check whether the test app uses the system proxy, is excluded by the system bypass list, or is reusing an existing connection.
| Mode | How captured connections are handled | What to verify |
|---|---|---|
| Rule | Select a policy based on rule order | Check the matched rule and actual outbound policy |
| Global | Use the policy currently selected in the global group | Temporarily test a specific outbound route |
| Direct | The core connects directly to the destination | Distinguish an upstream failure from a local entry-point failure |
Rule mode is best for routing configurations you've already verified. When using global mode for a quick comparison, check which member the global group currently selects. It may include a direct option or default to a member left selected during migration. Switching to global doesn't automatically mean a particular upstream proxy is selected. Direct mode may still pass through the local core, so it's normal to see a connection in the client. To confirm that an app bypasses the client entirely, disable the relevant system proxy or TUN, or run a single test command that explicitly bypasses the proxy. Note the system entry-point state during the test.
Run three comparisons against the same destination
Start in rule mode and choose a site that works over a direct connection and through the selected outbound route. Send a new request and note the time, destination, and policy in the connection log. Then switch to global mode, select a known-good member, close the existing connection, and repeat the request. Finally, switch to direct mode and create another new connection. A browser tab may reuse an existing connection, so refreshing doesn't always trigger a new decision. If needed, use a separate command process or close the relevant connection in the client, as long as it won't disrupt other activity. When you're done, restore your usual mode so the diagnostic global selection isn't left on the device.
If rule mode fails but global mode works, the request can at least reach the same core. Focus on the matched rule, default rule, and selected group member. If both rule and global modes fail but direct mode works, check the upstream route they have in common. If they actually use different members, the difference can't be attributed to the mode alone. If all three modes fail, recheck the entry point, DNS, and destination site. If the browser shows a certificate warning, don't use it as a shortcut for testing the upstream route. See how to troubleshoot HTTPS certificate errors to distinguish the possible causes.
Check the app's own proxy bypass settings
If an app still bypasses the proxy after you set the system proxy, check whether it has options such as Use system settings, Manual proxy, or Don't use a proxy. Browser extensions, terminal environment variables, and developer tools can use their own proxies, sending requests from the same device through different entry points. Change just one setting at a time and compare the connection logs before and after. Video calls, file sync, and update tasks may keep old connections open, so don't shut down all traffic to test. Choose a low-impact destination and time instead.
If you only need a few proxy-aware tools to use a specific route, point those tools to the local port and leave other apps' system settings alone. Go to the TUN chapter only if you have a clear need to capture traffic from apps that can't be configured manually. If switching modes hides the groups or you can't select one, use the client interface guide to find the mode settings, proxy groups, and logs.
06 / ROUTING
Routing rules: syntax, order, and verification
Start with the target, match condition, and policy
In Rule mode, mihomo checks rules from top to bottom and uses the first match. DOMAIN matches an exact domain, DOMAIN-SUFFIX matches a domain suffix and its subdomains, and IP-CIDR matches an IPv4 range. MATCH handles everything else. Rules aren't automatically sorted by length or scope. If an exact domain and a broader suffix need different policies, put the exact match first. When a destination is shown only as an IP address, there may not be enough domain information for a domain rule to match. Check the domain and destination address in the connections page.
The following standalone local test configuration uses the listener setup from the installation chapter. It doesn't depend on remote rules or proxy nodes. Import it as a new test file, then use the second command from the installation chapter to test through the local port: example.com should connect directly, while a deliberate test request to example.org should be rejected. If the client overrides the port, use the actual listening port. After testing, switch back to your usual configuration; don't use this example as a day-to-day blocklist.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- DOMAIN,example.com,DIRECT
- DOMAIN-SUFFIX,example.org,REJECT
- IP-CIDR,192.0.2.0/24,REJECT,no-resolve
- MATCH,DIRECT
How address rules relate to DNS resolution
The address range in this example is a documentation-only IPv4 range. no-resolve prevents the IP rule from triggering a DNS lookup just to match it. It doesn't mean DNS is disabled for the entire configuration. If the connection already has a destination IP that can be matched, the address rule may still apply. IPv6 requires a corresponding rule type, such as IP-CIDR6. For corporate IP ranges or internal domains, check the authorized scope carefully so an overly broad condition doesn't affect shared addresses, remote access, or organization-provided DNS.
When the configuration contains proxy groups, use the exact group name in the rule. Even if two groups have the same name, their selected members may differ. A merged configuration may also add a rule higher up in the list. For each test, note the match condition, the group targeted by the rule, and the final policy in the connection details. A site's login and media requests may use different domains. A homepage matching the expected rule doesn't mean subsequent requests do too. Identify the failing connection first, then decide whether to add a specific rule or adjust a broader policy. For a fuller comparison of rule order, see custom rule syntax and matching priority.
Keep local exceptions somewhere easy to review
To maintain rule order, start with a small number of explicit exceptions, then add a verified rule set, and finish with a clear default rule. Add a comment to each exception explaining its purpose, affected apps, and when it can be removed. Before adding rules, copy the active configuration to a test file. After making changes, test one destination that should match and another that shouldn't, then compare the results with the active configuration. If the client merges additional rules after MATCH, those rules won't take effect. Adjust the merge position instead of duplicating the rules across multiple files.
Before adding RULE-SET, check that the core supports the rule provider's format and that the referenced name matches its definition. If a remote resource fails to download, the interface may still show an older item saved on disk. A rule matching successfully doesn't prove that the latest update worked. Use the logs to distinguish local loading, remote refresh, and format parsing. The more dynamic lists you add, the harder issues are to reproduce. Verify the behavior with a small set of local rules first, then split out resources that need frequent maintenance to help isolate problems to a specific file.
07 / TUN & DNS
TUN and DNS: traffic capture and resolution paths
Confirm you need traffic capture, then establish a baseline
TUN is a virtual network interface in the operating system. The core can receive traffic routed through it, including traffic from some apps that ignore system proxy settings. But TUN isn't a path for all traffic: system routes, exclusions, other VPNs, and device management policies can all affect what it captures. On desktop, it's usually enabled under Settings → TUN mode; some clients require service mode first. On mobile, the system VPN interface typically carries the traffic. Follow the client documentation and device management requirements when prompted for permission, and don't start TUN alongside an existing tunnel until you've checked that it's safe to do so.
Before enabling TUN, note the current entry point, local proxy port, directly reachable test sites, and any local network resources you need to keep accessible. Turn off the system proxy and test the baseline, then enable only TUN and retry the same destinations. Check whether apps that previously bypassed the system proxy appear on the connections page, and verify that local network and work services still work as expected. If enabling TUN cuts off internet access, turn it off in the client first and check whether system routes and DNS were restored. If they weren't, quit the client and restore the previous settings using a system-approved method. Return to the baseline before analyzing logs; don't pile on more settings while the network is broken.
Understand DNS modes and what they capture
dns.enable turns on the core's DNS features. nameserver sets the default upstream resolver, but other DNS policies may override it for specific queries. enhanced-mode: fake-ip returns an internal mapped address for eligible queries. When the core receives a connection to that address through the relevant entry point, it can use the mapping to recover the domain. This depends on the query and connection forming a recognizable chain. redir-host uses real DNS results; in shared-IP scenarios, whether the domain is preserved also depends on the entry point and configuration. Don't copy a Fake-IP address to another device as a fixed connection target; it isn't the service's actual public IP address.
If a particular device discovery feature or local service requires real addresses, first verify which resolver handles internal and external domains. Then consider adding confirmed domains to fake-ip-filter. Switching back to real addresses won't automatically select the right resolver for internal domains, or fix a local network route accidentally captured by TUN. dns-hijack is a TUN option that redirects DNS traffic matching the configuration to the core. It doesn't detect encrypted DNS sent by apps over HTTPS. An app's secure DNS setting, the system resolver, and the core's resolver may all be in use at once. For details on these options, see the DNS configuration field guide.
Identify the settings in the active configuration
When checking the active configuration, first confirm that tun.enable matches the interface toggle. Then check whether auto-route lets the core manage routes automatically. stack selects the TUN protocol stack; keep the client default unless logs or a comparison test point to a specific issue. Don't paste a full example from another platform into your configuration: the client may manage its own interface, routes, and DNS, and the imported YAML may not reflect what's actually running. When changing upstream DNS, use a resolver that's reachable and allowed on your network. For corporate networks, follow the required method for resolving internal domains.
If only domain-based requests fail, first test DNS resolution and an HTTPS connection to a directly reachable site, then test an internal domain you're authorized to access. A command-line DNS lookup usually only shows what the system or specified resolver returned; it may not reflect the queries made by the browser or core. If DNS succeeds but HTTPS times out, keep checking routes and policies rather than labeling it a DNS failure. After changes, create new test connections. If needed, clear DNS caches created during testing as described by the client, and note which results came from before TUN was enabled.
08 / MAINTENANCE
Maintenance: updates, rollbacks, and troubleshooting notes
Treat the app, core, and configuration as three separate updates
A client update changes the interface and startup components; a core update changes configuration parsing and connection behavior; a subscription update changes groups, proxies, rules, and other content. Some clients bundle a core, while others let you update it separately. Read the release notes and change one layer at a time. If you upgrade the client, change the core, and refresh the subscription on the same day, it'll be hard to tell which change caused a problem. A safe update cycle is: make a backup, apply the change, check the startup logs, and repeat a familiar set of requests. If everything behaves as expected, record the new state as a working baseline.
A backup should include more than the subscription. Keep at least one configuration you can import directly, any essential local overrides, the active group selection, and a written record of the entry-point settings. Store everyday configurations separately from rollback copies, and label them with their purpose and save date. Keep configurations with credentials in a controlled location, not in a public shared folder. A new client version may migrate the data directory and write it in a new format on first launch. Before upgrading, confirm that your export is complete. An old installer still opening doesn't guarantee that it can restore your configuration and services.
Choose the connections page or logs based on the symptoms
If every app loses connectivity, first check whether the system still points to the local listener, TUN is enabled, and the core is running. If only a particular category of site fails, find its domain on the connections page and check the rule and policy. If only subscription updates fail, keep the active configuration and check the remote response and refresh permissions separately. If the problem starts after waking from sleep or switching networks, recheck the system entry point, local address, and network sign-in status. If a mobile app disconnects only in the background, consider the operating system's background behavior and the client's session state. One successful foreground test isn't enough to diagnose it.
Use logs to find the first abnormal event, not to collect everything. Before temporarily increasing the log level, note its current setting and the steps that reproduce the issue. Collect logs only for the necessary time window, then restore the previous level. The time, destination, matched rule, policy, and error type are usually enough to build a timeline. Capture just the relevant screen area or copy a small amount of text, then remove credentials, internal domains, usernames, and local file paths that could identify you. If the issue occurs only on a particular Wi-Fi network, the network is a factor, but that doesn't prove the upstream route is at fault. Repeat the same tests on an authorized network.
Roll back the most recent change instead of clearing the data directory
If you just changed an override, disable that override first. If you just refreshed the subscription, switch back to the local copy. If you just enabled TUN, turn it off and check the system state. Roll back one recent change at a time, then create a new connection to confirm the result. If the system proxy still points to a port that no longer has a listener after you quit the client, check which proxy settings the device should use and restore them. Don't assume every device should use automatic proxy detection or direct connections. Clear app data only after confirming that files are damaged, normal imports have failed, and a backup is available—and follow the client's instructions.
When maintaining several devices, use one checklist to record the operating system, client, core, active configuration, entry point, mode, and time of the issue. Write a problem report in three parts: what changed, what you expected, and what actually happened. If only one device is affected, compare its permissions and overrides. If all devices are affected after a subscription update, check the shared configuration first. If you can't find the right section, continue with the FAQ for core concepts, installation and configuration, usage tips, and troubleshooting before collecting more detailed logs.
09 / NEXT STEPS
Advanced setup: policy groups, configuration tests, and standalone cores
Choose policy groups for specific needs instead of making one group do everything
After you're comfortable selecting members manually, configure automatic groups to meet specific needs. select keeps the choice explicit, making it easy to compare two routes. url-test selects a policy based on how its members reach a test URL; fallback is better for checking members in a configured order until one is available. A successful test only means the member can reach the specified resource under the test conditions. It doesn't guarantee that all traffic uses the same route or that it's equally reliable for every task. Use a lightweight URL that members can reach and that permits periodic requests. Choose a test interval based on how quickly you need to switch, not by making it as short as possible.
This standalone mihomo practice configuration uses only the built-in direct policy as a group member. With the command from the installation chapter, you can see a connection match the default rule, then use the LAB group to select DIRECT. Save this file as a practice configuration, separate from your real subscription. Once you're familiar with policy chains, add defined and authorized members to a test copy of your own configuration and compare how manual and automatic selection appear in the interface and logs. A group can't reference itself, and groups shouldn't reference each other in a cycle.
mixed-port: 7890
allow-lan: false
mode: rule
proxy-groups:
- name: LAB
type: select
proxies:
- DIRECT
rules:
- MATCH,LAB
Test configuration syntax, loading, and behavior separately
If you have a standalone mihomo executable, you can check a configuration in a test directory where you have write access. Save the practice configuration above as lab.yaml in the current directory. This example assumes mihomo is available on your command search path and uses the current directory as its working directory. Don't run tests in the data directory of an active client. Use the same core branch and check client overrides to reduce the chance of a command-line test succeeding while the GUI still reports an error. If an option differs, check the local executable's help output first.
mihomo -t -d . -f ./lab.yaml
A successful command means the core accepted the configuration check. It doesn't mean a GUI client will use the same entry point or overrides, and it doesn't guarantee that every remote resource or outbound route is reachable. For the second layer, load the configuration in an isolated environment and check the listener logs. Only then move on to the third layer: send requests with clear expected outcomes. For each change, record four things: the old rule, the new rule, requests that should be affected, and requests that shouldn't. If you later add DNS or TUN, test each separately using the same approach. Don't generalize one test result to every operating system.
From a single-machine test to a maintainable service
If you need a standalone core to run continuously, plan the service account, configuration directory, and log location before connecting it to system service management. Limit listeners to the intended access scope, and give management interfaces access only to the people or services that need them. Don't expose proxy ports and control interfaces to the internet just to manage the service remotely. A service and a GUI client can be configured separately, but they shouldn't compete for the same listening port or manage the same system routes at the same time. Before deployment, arrange a local management path and a rollback plan. This is especially important when changing routes on a remote device: don't rely solely on a session that the change itself could disconnect.
The advanced workflow is repeatable: define the boundaries for rules and policy groups first, then decide whether you need automatic testing, remote providers, or a standalone service. Each time you add a mechanism, keep a minimal test that doesn't depend on it so you can diagnose failures. Extract settings into a shared configuration only if you use them frequently and genuinely need centralized maintenance. Keep platform-specific and account-specific settings in each device's controlled configuration. Look up unfamiliar fields in the glossary before testing them one at a time. To establish a baseline quickly on a new device, return to the quick start guide.