Routing & DNS
Routing rules
Routing rules select an outbound based on domains, IP addresses, ports, inbound tags and other criteria. This is commonly called traffic routing. Rules are usually checked from top to bottom, and the first match determines where the connection goes, so put specific rules before broad ones.
Within a rule, different condition fields generally all need to match; multiple values in the same field are usually alternatives. Also verify the default behavior when no rule matches, not just the matching cases.
View routing rules →
Routing & DNS
GeoIP
GeoIP classifies IP address ranges for routing, with entries such as geoip:private. The actual ranges depend on the data file in use; a label does not perform a live geolocation lookup.
When a destination starts as a domain name, whether an IP rule can match it also depends on the resolution strategy. Changes to the database or resolved IP can make the same rule produce different results.
Routing & DNS
GeoSite
GeoSite classifies domain groups for routing, with entries such as geosite:cn. The difference from GeoIP is what each matches: GeoSite matches domains, while GeoIP matches IP address ranges.
Available labels and the domains they cover depend on the data source and version. Check which data file the client loads before using a label. For a specific site, use a more precise domain rule rather than relying on a whole category.
Routing & DNS
DNS and domainStrategy
DNS resolves domain names to addresses. routing.domainStrategy determines when routing attempts to resolve a domain during rule matching. For example, with IPIfNonMatch, IP rules are checked using the resolved address only if no domain rule matches.
This field does not mean that every app uses the core's DNS. The operating system, browser and proxy core may each perform their own lookups. Fields with similar names in outbounds should also be understood in their specific context.
View DNS configuration →
Routing & DNS
FakeDNS
FakeDNS maps synthetic addresses to domain names so the destination domain can be recovered for a later connection. These addresses are mainly for internal mapping, not the destination website's real public IP address.
FakeDNS depends on coordination between the DNS entry point, traffic interception and domain recovery; adding a configuration object alone may not be enough. After switching modes, check both the cache and actual traffic path if old DNS results are still being used.
Routing & DNS
DNS leak
A DNS leak occurs when queries are sent to a resolver outside the expected resolution path. It describes a routing deviation; the resolver's name or location alone doesn't establish whether a leak occurred.
Check system DNS, encrypted DNS in the browser, the client's traffic interception and the core's DNS outbound separately. Proxying a web request does not mean the preceding DNS lookup followed the same route.