Clash's core working method is rule matching: every connection is checked in order against conditions like domain keywords, domain suffixes, IP ranges, and GEOIP attribution, and once matched it's handed off to the corresponding policy group — proxy, direct, or reject. This mechanism lets local sites connect directly, overseas services route through a proxy, and ad domains get blocked outright, all at the same time, with no manual switching. Rules support subscription-based rule sets (rule-provider), which keep maintenance far lighter than hand-writing every entry — see the rules chapter of the advanced handbook for the exact syntax.
mode: rule