Skip to main content

Rule Subscriptions

A rule subscription is a remote set of rules. Each line in the file must use a rule syntax supported by Loon.

https://raw.githubusercontent.com/Loon0x00/LoonExampleConfig/master/Rule/ExampleRule.list,PROXY

Performance

Loon supports hundreds of thousands of rules and caches recent results with an LRU cache. A cache hit takes close to 0 ms.

The results below were measured on an iPhone 15 Pro with Loon 3.2.0 (712). Actual times vary with device state and concurrent requests and can be viewed in the request details.

Rule typeTimeCountTest rules
DOMAIN, DOMAIN-SUFFIXUnder 1 ms200,000Rules 1, Rules 2
IP-CIDRUnder 1 ms100,000China IP
IP-CIDR61–2 ms4,000China IP
IP-ASNUnder 1 ms5,000Mainland China ASN

The performance of DOMAIN, DOMAIN-SUFFIX, IP-CIDR, IP-CIDR6, GEOIP, IP-ASN, port rules, and protocol rules changes little with rule count. DOMAIN-KEYWORD, USER-AGENT, and URL-REGEX take longer as the number and complexity of expressions increase, so prefer the first group when possible.