Rule Basics
Rule
A Rule matches connections using conditions such as domain names or IP addresses, then specifies an action. Rules are generally checked in order; once an earlier rule matches, later rules may not apply. Save a copy of the configuration before adding a rule, and check whether a broader condition earlier in the list takes precedence.
Exact Domain
DOMAIN
DOMAIN matches an exact domain, for example DOMAIN,example.com,DIRECT. It does not automatically cover every subdomain just because the names are related. To include subdomains, consider DOMAIN-SUFFIX rather than stacking ambiguous keywords.
Domain Suffix
DOMAIN-SUFFIX
DOMAIN-SUFFIX matches a domain and its subdomains, for example DOMAIN-SUFFIX,example.com,PROXY. It matches at domain boundaries, not by searching for an arbitrary string. A service may use multiple domains, so one suffix rule may not cover all of its requests.
Domain Keyword
DOMAIN-KEYWORD
DOMAIN-KEYWORD matches connections whose domain contains a specified keyword, for example DOMAIN-KEYWORD,example,PROXY. It generally covers more than an exact-domain or suffix match. A short keyword can affect unrelated domains, so define the intended scope before using one.
IP Address Ranges
IP-CIDR / IP-CIDR6
IP-CIDR is for IPv4 ranges; IP-CIDR6 is for IPv6 ranges. The prefix length after the slash defines the address range. For example, IP-CIDR,192.168.0.0/16,DIRECT sends that private address range to DIRECT. An IPv4 rule alone does not also cover IPv6.
IP Geolocation
GEOIP
GEOIP matches against an IP geolocation database, not a page’s language or domain suffix. The database may not be fully up to date, and the same domain can resolve to addresses in different regions. If the result is unexpected, check the actual resolved IP rather than relying on the site name.
Fallback Rule
FINAL
FINAL assigns a fallback action to connections not matched by earlier rules, for example FINAL,DIRECT. It is usually placed at the end; otherwise, later conditions may never take effect. When troubleshooting unexpected direct or proxy connections, check both the matching rule and the FINAL action.
Rule Actions
PROXY / DIRECT / REJECT
PROXY means use a proxy, DIRECT means connect directly, and REJECT means reject the connection. These uppercase terms are rule actions, distinct from the Proxy and Direct modes in Global Routing. Changing a rule action affects a connection only when the current mode uses the relevant rules.