Rules combine matching conditions with the policy to apply when a request matches, and are checked in order. The examples use example.com for illustration only; they do not provide servers or subscriptions.
[Rule]
[Rule]
DOMAIN,example.com,PROXY
DOMAIN-SUFFIX,example.org,PROXY
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,DIRECT
This example routes the specified domain through PROXY, sends local network addresses through DIRECT, and uses FINAL,DIRECT as a fallback for other requests. Before using it, select the configuration containing these rules and set Global Routing to Config.
PROXY
DIRECT
REJECT
DOMAIN
Rule Type
Matches an exact domain. For example, DOMAIN,example.com,PROXY applies only to that domain; it does not automatically include subdomains. Use it when you want to handle a single hostname. Don’t include a URL path or protocol prefix. If a service uses multiple domains, check which hostname each request actually uses.
DOMAIN-SUFFIX
Rule Type
Matches a specified domain and its subdomains. For example, DOMAIN-SUFFIX,example.com,PROXY covers example.com and api.example.com. It matches by domain hierarchy, not by searching for an arbitrary string. This is simpler than listing each subdomain, but make sure the entire domain range should use the same policy.
DOMAIN-KEYWORD
Rule Type
Checks whether a domain contains a specified keyword, for example DOMAIN-KEYWORD,example,PROXY. This can match a broader range than DOMAIN or DOMAIN-SUFFIX, including domains you did not intend to handle. Use it only when keyword-based matching is needed, and check real requests for unintended matches.
GEOIP
Rule Type
Matches according to an IP geolocation database, for example GEOIP,CN,DIRECT. A database classification does not tell you the language of a website or who operates it; CDN use and address changes can also affect results. If an earlier domain rule matches, a later GEOIP rule will not select a different policy for that request.
IP-CIDR / IP-CIDR6
Rule Type
Matches destinations using IPv4 or IPv6 address ranges. The number after the slash is the network prefix length. For example, IP-CIDR,192.168.0.0/16,DIRECT covers the corresponding private address range. This matches IP addresses, not domain text. For domain requests, also consider the resolved address and whether an earlier rule has already matched.
USER-AGENT
Rule Type
Matches recognizable User-Agent content, for example USER-AGENT,ExampleApp*,DIRECT. This does not route traffic by application process. Requests from the same app may use different identifiers, and other programs may use the same one. The relevant content may not be visible in encrypted requests, so don’t assume this rule covers all traffic from an app.
FINAL
Fallback
Set a fallback policy for requests that match no earlier rules, usually as the last line in the Rule section. FINAL,DIRECT sends the rest directly; FINAL,PROXY sends the rest through a proxy. These produce very different default behavior. When troubleshooting why a domain used a proxy, check both the specific matching rule and FINAL.
PROXY
Policy
A policy keyword in a rule that sends matching requests to a proxy policy; it does not specify a particular protocol. Whether a request succeeds also depends on the selected server, authentication, and connection state. This differs from the Proxy mode in Global Routing: PROXY is the result of an individual rule, while Proxy sets the overall traffic handling mode.
DIRECT
Policy
Connects matching requests directly to their destination without forwarding them through a proxy server. DIRECT rules can still apply in Config mode, so an active connection does not mean these requests use a proxy. Direct connections depend on the local network, DNS resolution, and destination service; the policy name does not guarantee availability.
REJECT
Policy
Rejects matching requests to prevent them from connecting. Define the match carefully: an overly broad domain keyword or address range may disrupt normal functionality. If a page is missing content, first check whether its requests match REJECT and then narrow the rule if needed, rather than changing all policies.