chore: add SUB-RULE demo

This commit is contained in:
gVisor bot 2022-10-02 20:47:43 +08:00
parent a3a9fbd283
commit c180c7e4c1

View file

@ -538,3 +538,19 @@ rules:
- DOMAIN-KEYWORD,google,ss1
- IP-CIDR,1.1.1.1/32,ss1
- IP-CIDR6,2409::/64,DIRECT
- SUB-RULE,((NETWORK,TCP)),sub-rule-name1 # 当满足条件是 TCP 流量时,使用名为 sub-rule-name1 当规则集
- SUB-RULE,((AND,((NETWORK,UDP)))),sub-rule-name2
# 定义多个子规则集,规则将以分叉匹配,使用 SUB-RULE 使用
# google.com (not match) --> baidu.com(match)
# / |
# / |
# https://baidu.com -->rule1-->rule2-->sub-rule-name1(match tcp) 使用 DIRECT
#
sub-rules:
sub-rule-name1:
- DOMAIN,google.com,ss1
- DOMAIN,baidu.com,DIRECT
sub-rule-name2:
- IP-CIDR,1.1.1.1/32,REJECT
- IP-CIDR,8.8.8.8/32,ss1
- DOMAIN,dns.alidns.com,REJECT