Rule Patterns
This page is automatically synced from
docs-en/rules/patterns.md. Language: English | 中文
Rule Matching Patterns
Section titled “Rule Matching Patterns”Rule patterns match requests by domain, IP, wildcard, path, regex, and negation.
example.comexample.com/api*.example.com**.example.com/pattern/i!*.internal.example.comPrefer the simplest pattern that expresses the target. Use regex only when domain, path, or wildcard matching is insufficient.
⚠️ Negation (
!) is non-functional at runtime (verified, 0.0.96).matches_host()for a!Xpattern always returnsfalse, so a standalone!-prefixed rule (e.g.!www.example.com host://127.0.0.1) matches no request and forwards nothing. UseexcludeFilter://to subtract a subset from a positively matched set instead — e.g.svc.test host://127.0.0.1 excludeFilter:///account(verified:/accountfalls through to the real backend, other paths forward).