Domain matching
DOMAIN / DOMAIN-SUFFIX
DOMAIN matches the specified exact domain, while DOMAIN-SUFFIX matches that domain and its subdomains. For example, DOMAIN-SUFFIX for example.com also covers www.example.com, but not every domain that happens to contain those characters. To match a single hostname only, check whether the more precise DOMAIN rule is appropriate.
Text matching
DOMAIN-KEYWORD
DOMAIN-KEYWORD checks whether a domain contains the specified text; the text doesn’t have to appear at the end. A short keyword can match many domains you didn’t intend to include. If you see unexpected matches, first check whether the keyword is too broad, then consider using DOMAIN or DOMAIN-SUFFIX instead.
Address range matching
IP-CIDR / IP-CIDR6
IP-CIDR describes an IPv4 address range; IP-CIDR6 describes an IPv6 address range. The prefix length after the slash determines the range. For example, 10.0.0.0/8 represents a range, not a single host. Whether a domain request matches an address rule also depends on its resolved address and the configuration’s DNS behavior.
IP geolocation matching
GEOIP
GEOIP matches a destination based on IP geolocation data, not the language of a webpage or text in a domain name. Results depend on the database, the resolved destination address, and how the service is hosted. If routing differs from what you expect, check the actual destination IP instead of guessing from the website name.
Fallback rule
FINAL
FINAL sets the policy used when none of the preceding rules match and is usually placed at the end of the rule list. It does not mean “highest priority”; placing it too early can prevent later rules from being checked. To find out why a request follows the default route, first check whether any earlier rule matched, then review the policy after FINAL.
Policies
PROXY / DIRECT / REJECT
PROXY routes a request through a proxy, DIRECT connects directly, and REJECT denies the request. These are keywords in rule text, not protocol types or server names. After confirming a request matches a rule, check that its policy specifies the intended handling and that the connection used by the proxy route is available.
How matching works
Rule order
Rules are evaluated in order, and the first match determines the policy for a request. Put precise exceptions before broader rules. Adding a rule after FINAL usually won’t produce the expected result. Before changing the order, keep a copy of the original file, then change one thing at a time so you can trace the effect.