CONFIG / RULE
Rule types and policies
Rules determine how a request should be handled. Open the active configuration in Config and check its rules and their order. To use rule-based routing, first set Global Routing to Config. Rules are generally checked from top to bottom, and the policy for the first match is applied. Put more specific conditions before broader ones, and place FINAL at the end to handle requests that did not match earlier rules.
Match by domain, address, or request characteristics
DOMAIN matches a specific domain; DOMAIN-SUFFIX matches a domain suffix and its subdomains; DOMAIN-KEYWORD matches a keyword in the domain. IP-CIDR and IP-CIDR6 describe IPv4 and IPv6 address ranges, respectively. GEOIP matches using IP geolocation data. USER-AGENT depends on request information being available, so it does not work for all traffic and should not be treated as a universal way to identify apps.
Keep policies separate from rule types: PROXY routes through a proxy, DIRECT connects directly, and REJECT blocks a request. A reject rule may affect page resources, sign-in, or notifications. After adding a rule, test the affected features instead of checking only whether the home page loads.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
DOMAIN-KEYWORD,example,DIRECT
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,DIRECT
This is a syntax example, not a complete configuration file. The first rule matches example.com and its subdomains, so those requests will not be evaluated by the DOMAIN-KEYWORD rule below it. FINAL,DIRECT means unmatched requests connect directly; it is not the right default for every use case. Keep a copy of the original file, change one condition at a time, and check connection logs to confirm which rule matched.
Check rule keywords in the quick reference →