-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] 让 SUB-RULE 支持 MATCH #1787
Comments
此功能,无必要。 |
我把我的用例说得再明白些。
rules:
# 实际用例比下面的更复杂,穿插大量auto-proxy、DIRECT,且顺序重要
- GEOSITE,category-ads-all,REJECT
- DOMAIN,cdn.gotraffic.net,auto-proxy
- GEOSITE,youtube,auto-proxy
- DOMAIN-SUFFIX,dev,auto-proxy
- DOMAIN-SUFFIX,steamstatic.com,DIRECT
- DOMAIN-SUFFIX,steamcontent.com,DIRECT
- DOMAIN-SUFFIX,steamserver.com,DIRECT
- DOMAIN-SUFFIX,steamserver.net,DIRECT
- SUB-RULE,(GEOSITE,geolocation-!cn),auto-proxy
- GEOSITE,CN,DIRECT
- SUB-RULE,(DST-PORT,0-65535),auto-proxy
sub-rules:
auto-proxy:
# 如有 IP,先匹配 IP
- IP-ASN,13335,proxy1,no-resolve
- IP-ASN,209242,proxy1,no-resolve
# 减少 DNS 查询
- GEOSITE,cloudflare,proxy1
- GEOSITE,poe,proxy1
- GEOSITE,sci-hub,proxy1
- GEOSITE,google,proxy2
- GEOSITE,wikimedia,proxy2
- GEOSITE,youtube,proxy2
- GEOSITE,dropbox,proxy2
- GEOSITE,microsoft,proxy2
- GEOSITE,github,proxy2
- GEOSITE,amazon,proxy2
- GEOSITE,akamai,proxy2
- GEOSITE,reddit,proxy2
- GEOSITE,apple,proxy2
- GEOSITE,facebook,proxy2
- DOMAIN,cdn.jsdelivr.net,proxy2
# 有 DNS 查询
- IP-ASN,13335,proxy1
- IP-ASN,209242,proxy1
- IP-ASN,399566,proxy1
- MATCH,proxy2
|
依然逻辑错误。 子规则的本意是条符合了某个条件,再用第二条件(多个)进行分流。若第一条件无限制,就相当于没有,这就是主规则了。 |
验证步骤
描述
增加对以下语法之一的支持,即无条件按
some-sub-rule
进一步匹配。之所以不把some-sub-rule
的内容直接贴到rules
末尾,是因为还有其他多处使用some-sub-rule
。目前的临时解决方案是
The text was updated successfully, but these errors were encountered: