Rules
rules
Rules determine whether a connection is handed to a proxy policy, connected directly, or rejected based on its domain, IP, process, or rule set. This differs from Global mode, which generally sends most connections to one policy, while Rule mode evaluates them individually. When troubleshooting a routing result, check the rule order, target type, and final proxy group together.
DOMAIN-SUFFIX
DOMAIN-SUFFIX,example.com,DIRECT
DOMAIN-SUFFIX matches a target by domain suffix. For example, example.com will usually also cover its subdomains, making it suitable for applying one policy to an entire site family. To match only one exact domain, use the narrower DOMAIN rule.
IP-CIDR
IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
IP-CIDR matches target IP addresses using CIDR notation. The trailing no-resolve option means the rule will not actively trigger domain resolution for matching, reducing unnecessary DNS queries. The prefix length determines the matching range, so verify the network prefix before saving it.
GeoIP
GEOIP,CN,DIRECT
GeoIP applies rules according to the target IP's location in a geographic database. It is useful for connections whose IP address is already known, but the database result does not identify the service operator or guarantee the actual access experience. Accuracy can be affected by the database version, IP reassignment, and resolution results.
GEOSITE
GEOSITE,category-ads-all,REJECT
GEOSITE organizes large collections of domains by region or purpose, allowing a configuration to reference an entire category with one rule. It matches domain information, unlike GeoIP, which classifies IP addresses. The domains included in a category may change when the rule set is updated.
MATCH
MATCH,PROXY
MATCH is a common fallback at the end of a rule list for connections not matched earlier. Because it catches all remaining traffic, placing it in the middle prevents later rules from matching. When reviewing a configuration, make sure no ordinary rules that still need to apply appear after MATCH.