06 / Matching & outbounds
Routing
When reading routing rules, check the match criteria first, then the outbound. Domain lists, IP ranges, and the default route each serve different purposes; some requests include only an IP address and can't match a domain rule directly.
Traffic routing selects how requests are handled based on their characteristics, sending them directly, through a proxy, or blocking them. For example, local services and other requests can use different outbounds, but only if the requests have reached the client. To check whether routing worked, see which rule matched the request rather than just whether the system proxy is enabled.
A routing rule links matching criteria such as domain names, IP addresses, and ports to a specified outbound. In configurations that use the first matching rule, a broad rule near the top can override more specific rules below it. When troubleshooting, check the actual generated rule order, then confirm what information was available to match when the request reached the core.
In routing configurations, GeoIP usually refers to labeled collections of IP ranges that rules can match against. Matching a label means the destination address belongs to a range in the data file; it doesn't reveal the server's physical location. A domain may match different ranges as its resolved address changes, so check the address returned at the time of the request.
GeoSite is a collection of domain matches organized by category or service. A routing rule can reference multiple related domains through it. It differs from GeoIP in what it matches: domains versus IP ranges. Different data files may contain different labels and domains, so confirm the target environment includes a label before migrating a rule.
FakeDNS assigns a temporary virtual IP to a queried domain and keeps the mapping so later traffic handling can recover the domain name. This can let the core route traffic by its original domain even when captured traffic contains only an IP address. A virtual IP isn't the real address of the remote server, so it can't tell you who owns the server or measure direct latency to it.
The default outbound handles requests that don't match any routing rule. In V2Ray-family cores, the first outbound listed in the core configuration is usually used when no rule matches. Some clients instead generate a catch-all rule at the end, which requests then match. To determine where unclassified traffic goes, check both the outbound order and the final rule.