How Clash Works
Clash/Mihomo reads a YAML configuration and handles traffic in three stages: an inbound listener accepts a connection, rules select a policy, and an outbound sends the traffic to a proxy or directly to its destination.

Inbound
An inbound is a local HTTP, SOCKS, mixed, redirect, TProxy or TUN interface. Applications or the operating system send traffic to it. See inbound settings.
Outbound
An outbound can be a direct connection, a proxy node or a policy group. Policy groups let you choose nodes manually or automatically. See outbound settings.
Rule-based routing
The rules list is evaluated in order. A rule has a type, a value and a target policy, for example DOMAIN-SUFFIX,example.com,Proxy. The first matching rule determines the route; a final MATCH rule handles remaining traffic. See rules.
