Routing rules
Routing Rules
Routing rules select an outbound for a connection based on conditions such as domain, IP, port or inbound. Rules are commonly checked from top to bottom, and the first match usually determines where the connection goes. Put specific exceptions before broader rules, and check the default outbound for traffic that matches no rule. This helps prevent a local change from affecting unrelated connections.
Read the routing guide
GeoIP
IP Address Sets
In routing configurations, GeoIP usually refers to IP address sets that can be referenced by tag. geoip:private identifies private or reserved address ranges; the exact scope depends on the data file in use. These rules match IP addresses. If the input is a domain name, whether it must be resolved first also depends on the routing domainStrategy setting.
Related: domainStrategy
GeoSite
Domain Name Sets
GeoSite is a collection of domains organized by tags, used to match groups of domains in routing rules. geosite:category-ads-all is a category reference, not a real domain. The data provider defines what each collection contains. Even when names match, check the source and update status of the data file; domain categories do not replace checking which rules actually match in the logs.
Related: Routing rules
domainStrategy
Routing Domain Strategy
domainStrategy is a routing field that determines when domains are resolved for IP-based rule matching. AsIs, IPIfNonMatch and IPOnDemand specify different resolution timings. It is not a DNS server address and does not directly select proxy or direct routing. If the same field name appears in another configuration object, interpret it in the context of that object.
Related: DNS resolution
Outbound tag
Outbound Tag
An outbound tag is a name assigned to an outbound in the configuration; routing rules refer to it using outboundTag. direct, proxy and block are common naming conventions, not built-in capabilities of the tags themselves. When copying a rule, confirm that the target tag exists and that its outbound protocol and purpose match your expectations.
Related: Rule matching and routing