Skip to content

🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。

License

Notifications You must be signed in to change notification settings

DreamFerry/clash-rules

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 

Repository files navigation

规则文件地址及使用方式

使用方式

要想使用本项目的规则集,只需要在 Clash 配置文件中添加如下 rule-providersrules

Rule Providers 配置方式

rule-providers:
  fakeip-filter:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/fakeip-filter.mrs"
    path: ./ruleset/fakeip-filter.mrs
    interval: 86400

  reject:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/reject.mrs"
    path: ./ruleset/reject.mrs
    interval: 86400

  icloud:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/icloud.mrs"
    path: ./ruleset/icloud.mrs
    interval: 86400

  apple:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/apple.mrs"
    path: ./ruleset/apple.mrs
    interval: 86400

  google:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/google.mrs"
    path: ./ruleset/google.mrs
    interval: 86400

  proxy:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/proxy.mrs"
    path: ./ruleset/proxy.mrs
    interval: 86400

  direct:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/direct.mrs"
    path: ./ruleset/direct.mrs
    interval: 86400

  private:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/private.mrs"
    path: ./ruleset/private.mrs
    interval: 86400

  gfw:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/gfw.mrs"
    path: ./ruleset/gfw.mrs
    interval: 86400

  tld-not-cn:
    type: http
    format: mrs
    behavior: domain
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/tld-not-cn.mrs"
    path: ./ruleset/tld-not-cn.mrs
    interval: 86400

  telegramcidr:
    type: http
    format: mrs
    behavior: ipcidr
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/telegramcidr.mrs"
    path: ./ruleset/telegramcidr.mrs
    interval: 86400

  cncidr:
    type: http
    format: mrs
    behavior: ipcidr
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/cncidr.mrs"
    path: ./ruleset/cncidr.mrs
    interval: 86400

  lancidr:
    type: http
    format: mrs
    behavior: ipcidr
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/lancidr.mrs"
    path: ./ruleset/lancidr.mrs
    interval: 86400

  applications:
    type: http
    format: text
    behavior: classical
    url: "https://raw.gitmirror.com/DreamFerry/clash-rules/release/applications.list"
    path: ./ruleset/applications.list
    interval: 86400

白名单模式 Rules 配置方式(推荐)

  • 白名单模式,意为「没有命中规则的网络流量,统统使用代理」,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户。
  • 以下配置中,除了 DIRECTREJECT 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 proxiesproxy-groups 中的 name。如你直接使用下面的 rules 规则,则需要在 proxiesproxy-groups 中手动配置一个 namePROXY 的 policy。
  • 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由 DIRECT 改为 PROXY,以此类推,举一反三。
  • 如你不希望进行 DNS 解析,可在 GEOIP 规则的最后加上 ,no-resolve,如 GEOIP,CN,DIRECT,no-resolve
rules:
  - RULE-SET,applications,DIRECT
  - DOMAIN,clash.razord.top,DIRECT
  - DOMAIN,yacd.haishan.me,DIRECT
  - RULE-SET,private,DIRECT
  - RULE-SET,reject,REJECT
  - RULE-SET,icloud,DIRECT
  - RULE-SET,apple,DIRECT
  - RULE-SET,google,PROXY
  - RULE-SET,proxy,PROXY
  - RULE-SET,direct,DIRECT
  - RULE-SET,lancidr,DIRECT
  - RULE-SET,cncidr,DIRECT
  - RULE-SET,telegramcidr,PROXY
  - GEOIP,LAN,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,PROXY

黑名单模式 Rules 配置方式

  • 黑名单模式,意为「只有命中规则的网络流量,才使用代理」,适用于服务器线路网络质量不稳定或不够快,或服务器流量紧缺的用户。通常也是软路由用户、家庭网关用户的常用模式。
  • 以下配置中,除了 DIRECTREJECT 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 proxiesproxy-groups 中的 name。如你直接使用下面的 rules 规则,则需要在 proxiesproxy-groups 中手动配置一个 namePROXY 的 policy。
rules:
  - RULE-SET,applications,DIRECT
  - DOMAIN,clash.razord.top,DIRECT
  - DOMAIN,yacd.haishan.me,DIRECT
  - RULE-SET,private,DIRECT
  - RULE-SET,reject,REJECT
  - RULE-SET,tld-not-cn,PROXY
  - RULE-SET,gfw,PROXY
  - RULE-SET,telegramcidr,PROXY
  - MATCH,DIRECT

致谢

About

🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。

Resources

License

Stars

Watchers

Forks

Packages

No packages published