The first matching rule decides the policy
Rule mode checks conditions from top to bottom and stops at the first match. Put specific domain exceptions before broader rules, then use a fallback rule for connections that do not match. Unlike setting one proxy address just for a browser, FlClash can select an outbound for each request that reaches the core. After changing the order, create a new connection and check which rule matched. If the destination is correct but the outbound is not, check which member the policy group currently selects. This example illustrates matching order only; both rules use Direct.
mode: rule
rules:
- DOMAIN-SUFFIX,example.org,DIRECT
- MATCH,DIRECT
Capture traffic from apps that ignore the system proxy
The system proxy depends on apps choosing to use it. A virtual network interface routes traffic to the core instead. If only one app is affected, first enable TUN with the default settings and confirm system authorization, then check whether the app’s new connections appear. If another VPN is running, test each one separately to avoid both changing the same route. Adjust tun.stack only after confirming a network-stack compatibility issue, and note the results before and after the change.
tun:
enable: true
auto-route: true
Full profiles and proxy providers
A full subscription profile can include proxies, policy groups, and rules. In a profile, proxy-providers defines proxy sources that the core loads independently, and policy groups need to reference the relevant providers with use. Providers let you update proxy sources separately instead of listing every proxy in one local file. After updating, make sure the intended profile is enabled, then check that the provider fetched successfully and populated its policy groups. A successful import does not guarantee an available outbound.
proxy-providers:
local-nodes:
type: file
path: ./providers/local-nodes.yaml
Check outbound results with a new connection
Rule mode selects an outbound based on matching rules, Global mode uses the selected global policy, and Direct mode attempts to connect captured traffic straight to its destination. Switching modes temporarily is a better way to check whether routing rules are causing a problem than changing rules one by one. Note the original mode and policy, then switch and create a new request; existing connections may continue using their previous route. If Global works but Rule does not, check the matching rule and its referenced group. Restore the original settings when testing is complete.
mode: global
Rules travel with the profile; permissions stay on the device
Desktop and Android versions can reuse compatible mihomo profiles. When migrating, keep proxy names, policy group names, and rule references intact. Reusing a profile makes it easier to compare why the two devices match different rules than rebuilding each one by hand. Local paths, port conflicts, and system permissions are device-specific, however. Import the profile on the new device and verify basic connectivity first, then migrate custom settings one at a time. If the profile references files available only on the old device, copy them over or update their paths.
# Local port shared by HTTP and SOCKS
mixed-port: 7890