Appearance
mihomo 规则集
why
性能上,规则集相比 classical 常规路由规则(DOMAIN、DOMAIN-SUFFIX、IP-CIDR 等)性能更好。尽量保证 behavior: classical 的规则集内容最少化。
分流粒度上,规则集更加细化,更好获取他人的提供的规则集配合使用,更容易分类管理自定义的部分。
how
主要参考了 DustinWin/ruleset_geodata,其中 release 页面可以下载规则集,README 最底部可以查看规则集的详解及配置方法
what
○ 整体
来自 DustinWin 的规则集:
INFO
因不希望规则集自动更新,配置中没有加上规则提供者的 url
yaml
# config.yaml
rules:
- RULE-SET,privateip,DIRECT,no-resolve
- RULE-SET,applications,国内
- RULE-SET,custom_reject_domain,断连
- RULE-SET,microsoft-cn,国内
- RULE-SET,cn,国内
- RULE-SET,cnip,国内
- RULE-SET,proxy,国外
- MATCH,国内
rule-providers:
privateip:
type: file
behavior: ipcidr
format: mrs
path: ./rules/privateip.mrs
applications:
type: file
behavior: classical
format: yaml
path: ./rules/applications.yaml
custom_reject_domain:
type: file
behavior: domain
format: yaml
path: ./rules/custom_reject_domain.yaml
microsoft-cn:
type: file
behavior: domain
format: mrs
path: ./rules/microsoft-cn.mrs
cn:
type: file
behavior: domain
format: mrs
path: ./rules/cn.mrs
cnip:
type: file
behavior: ipcidr
format: mrs
path: ./rules/cnip.mrs
proxy:
type: file
behavior: domain
format: mrs
path: ./rules/proxy.mrs○ 自定义规则集
# custom_reject_domain.yaml
payload:
- '+.events.data.microsoft.com'
- '+.telemetry.mozilla.org'○ mihomo 自用
MetaCubeX/meta-rules-dat/geo-lite,在 meta 分支
md
内网 ipcidr
https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/private.mrs
https://aubyn-github-io.pages.dev/ruleset/private_ip.mrs
内网 domain
https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geosite/private.mrs
https://aubyn-github-io.pages.dev/ruleset/private_domain.mrs
国内 ipcidr
https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/cn.mrs
https://aubyn-github-io.pages.dev/ruleset/cn_ip.mrs
国外 domain
https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geosite/proxy.mrs
https://aubyn-github-io.pages.dev/ruleset/proxy_domain.mrs
dns domain
https://aubyn-github-io.pages.dev/ruleset/dns_domain.yaml
ads
https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/ads.mrs
https://aubyn-github-io.pages.dev/ruleset/ads.mrs○ sing-box 自用
md
国内 ip 轻量集合(来自 firehol/blocklist-ipsets):
https://aubyn-github-io.pages.dev/ruleset/geolite2_country_cn.srs
国内域名全集(来自 pmkol/easymosdns/tree/rules):
https://aubyn-github-io.pages.dev/ruleset/china_domain_list.srs参考
- firehol/blocklist-ipsets👍,分流规则集,丰富,geolite2_country/country_cn.netset 轻量准确
- wendellouyang/geolite2_china_ip_list,轻量,准确度不错
- pmkol/easymosdns/tree/rules,分流规则集,更新快
- metowolf/iplist
- AdGuardHome规则推荐,精选酷安社区实用广告过滤规则,提升浏览体验