03 · Rule keywords and policies
Match conditions and outcomes
Rules answer, “What condition does this request meet?” Policies answer, “What happens when it matches?” The examples below illustrate syntax only. example.com is a sample domain, not a real connection service.
Rule
A rule usually consists of a match type, match value, and policy, for example DOMAIN-SUFFIX,example.com,DIRECT. In common first-match configurations, requests are checked in order, and an earlier match affects subsequent handling. If Global Routing is not set to Config, changes to rules may not behave as expected. Check the routing mode first.
DOMAIN / DOMAIN-SUFFIX
DOMAIN matches an exact domain; DOMAIN-SUFFIX matches the specified domain and its subdomains. For example, setting the latter to example.com can match api.example.com. Both match domain names, not complete URLs, so do not include paths, query parameters, or a protocol prefix in a domain condition.
DOMAIN-KEYWORD
DOMAIN-KEYWORD matches a keyword appearing in a domain name and is useful when you need to cover a group of related names. A short keyword may also match unrelated domains. Before applying a reject policy, check actual request records. If you only need to match one specific domain, use a more precise condition.
IP-CIDR / IP-CIDR6
IP-CIDR matches IPv4 ranges, while IP-CIDR6 matches IPv6 ranges. The number after the slash is the network prefix length. For example, IP-CIDR,192.168.0.0/16,DIRECT describes a private IPv4 address range. Whether domain requests are resolved and included in address matching also depends on configuration options; an IP range rule is not a domain suffix rule.
GEOIP
GEOIP matches destination addresses using an IP geolocation database; it does not use webpage language or the user's location. Geolocation results may change with database contents and network deployment, and do not directly indicate where a website operator is based. If a domain resolves to different addresses, matching may also change. Check the current resolution results.
FINAL
FINAL handles requests that match none of the preceding rules and is usually placed at the end of the rule list. FINAL,PROXY sends those remaining requests to the PROXY policy; it does not prove that every request uses a proxy. When checking the fallback policy, also look for an earlier rule with an overly broad match.
PROXY / DIRECT / REJECT
PROXY, DIRECT, and REJECT are uppercase rule policy keywords for proxying, direct connections, and rejecting requests. The connection used by PROXY depends on the current configuration and selection. REJECT blocks matching requests; an overly broad condition may affect sign-ins, images, or app APIs. It is not the same as comprehensively filtering a category of content.
DNS
DNS resolves domain names to addresses and is an important step before accessing a destination. DNS resolution and request routing are related, but use different settings. A domain resolving successfully does not guarantee that the subsequent connection will work. When troubleshooting, distinguish a resolution failure from an unexpected address or a connection failure, then check the configured DNS server and rule behavior.
URL Rewrite
URL Rewrite rewrites URLs or handles requests according to configured match conditions. Unlike routing rules that match a domain and select a policy, its effect on a request depends on the request type, visible information, and configuration conditions. Before enabling it, understand the match scope and keep a copy of the original configuration. It does not guarantee that every page or app will behave differently.