Are you an LLM? You can read better optimized documentation at /en\document\rule.md for this page in Markdown format
Rules
Nodes (proxy servers) forward the traffic, while rules decide which node performs the forwarding.
Match priority
Rules of type url-rehex cost some performance, so they are only matched after no rule of another type has matched. Rules of the other types follow the order in the configuration file: a rule listed earlier has higher priority than one listed later. At the same time local rules > subscription rules > rules inside plugins. When no rule matches, Final is used.
The matching algorithm was adjusted in 3.0.3:
- GeoIP rules usually live in the local rules, several subscriptions mix in IP based rules, and some of those IP rules do not set
no-resolve— which produces a large amount of unnecessary DNS queries. So when the destination of a request is a domain name, Loon matches domain based rules first: if a domain rule matches, no IP rule is evaluated; if no domain rule matches, Loon resolves the domain locally and then matches IP rules against that result. - Apart from the priority between domain rules and IP rules, every rule type follows the order in the configuration file: a rule listed earlier has higher priority than one listed later. At the same time local rules > rules inside plugins > subscription rules. When no rule matches,
Finalis used.
