CompositeRule allows for complex traffic routing logic by combining multiple individual rules using boolean operators. It supports nested expressions, enabling highly granular control over how network sessions are matched to specific proxy targets.
Supported Operators
AND: All sub-expressions must evaluate to true for the composite rule to match.OR: At least one sub-expression must evaluate to true for the composite rule to match.NOT: Inverts the result of the single sub-expression provided. Note that NOT requires exactly one sub-expression.
Expression Syntax
Expressions must be wrapped in parentheses. Sub-expressions are also wrapped in parentheses and separated by commas.
Example: AND with nested OR
To match a specific domain where the network is either UDP or TCP:
((DOMAIN,example.com),(OR,((NETWORK,UDP),(NETWORK,TCP))))
Example: OR with multiple domains
((DOMAIN,a.com),(DOMAIN,b.com),(DOMAIN,c.com))
Example: NOT operator
To match everything except a specific domain:
((DOMAIN,baidu.com))