Rule keywords and policies
Rule
Rule refers to the rules section of a configuration. In text configurations, this section is marked [Rule]. Rules are usually checked from top to bottom, and the policy on a matching rule is applied without checking subsequent ordinary rules. Before editing, confirm which Config is in use and keep a copy of the original. Editing a file that is not enabled will not change how current requests are handled.
Rule keywords and policies
DOMAIN
DOMAIN matches an exact domain name. For example, DOMAIN,example.com,DIRECT applies only to that domain. It does not automatically include all subdomains; add separate conditions for subdomains or use an appropriate suffix rule. The domain field should not contain a full webpage URL with a path, since that does not match the rule type.
Rule keywords and policies
DOMAIN-SUFFIX
DOMAIN-SUFFIX matches domain names by suffix and typically covers both the specified domain and its subdomains. The example DOMAIN-SUFFIX,example.com,PROXY shows this scope; it does not search for the same text anywhere in an arbitrary URL. To apply a different policy to a particular subdomain, put a more specific DOMAIN rule before this one.
Rule keywords and policies
DOMAIN-KEYWORD
DOMAIN-KEYWORD checks whether a domain name contains a specified keyword. It usually matches more broadly than an exact domain or suffix rule. A short keyword may appear in unrelated domain names, so it is not a good substitute for a known, exact domain. If a rule affects unexpected requests, check the keyword's scope and its position in Rule, then narrow the condition if needed.
Rule keywords and policies
IP-CIDR / IP-CIDR6
IP-CIDR and IP-CIDR6 match destination addresses against IPv4 and IPv6 ranges, respectively. The prefix length after the slash determines the range. For example, IP-CIDR,192.168.0.0/16,DIRECT specifies an IPv4 range. These rules match addresses, not domain-name text. Whether DNS resolution is needed first depends on the rule parameters and current DNS behavior.
Rule keywords and policies
GEOIP
GEOIP matches destination addresses based on their location in an IP geolocation database, for example, GEOIP,CN,DIRECT. It does not analyze page content, domain suffixes, or the user's location. Database results may also differ from the actual location of a service. To apply a fixed policy to a known domain, use a more specific domain rule before GEOIP.
Rule keywords and policies
FINAL
FINAL is the fallback rule used when none of the preceding rules match, so place it last in the Rule section. For example, FINAL,PROXY sends remaining requests to the PROXY policy. FINAL does not override the results of earlier rules or guarantee that the proxy connection will work. If it appears too early, subsequent rules cannot match as intended.
Rule keywords and policies
PROXY / DIRECT / REJECT
PROXY, DIRECT, and REJECT are policy names in rules: use a proxy policy, connect directly, or reject a request. These uppercase keywords operate at a different level from the Proxy and Direct options in Global Routing. PROXY does not include specific server credentials, and DIRECT does not turn off the entire VPN. Interpret the actual behavior in context of the current mode and configuration.