Giter VIP home page Giter VIP logo

clash-pro-rules's Introduction

clash pro rules简介

规则转自:Loyalsoldier,在此基础上修改添加

本项目生成适用于 Clash Premium 的规则集(RULE-SET)。

说明

本项目的规则集(RULE-SET)主要来源于项目 @Loyalsoldier/v2ray-rules-dat@v2fly/domain-list-communityAppleGoogle 列表里的部分域名来源于项目 @felixonmars/dnsmasq-china-list;**大陆 IPv4 地址数据使用 @17mon/china_ip_list

本项目的规则集(RULE-SET)只适用于 Clash Premium 版本。Clash Premium 相对于普通版,增加了 TUN 增强模式,能接管设备所有 TCP 和 UDP 流量,类似 Surge for Mac 的增强模式。更多高级特性请看官方 wiki

Clash 各版本下载地址

规则文件地址及使用方式

在线地址(URL)

无法访问 raw.githubusercontent.com的解决方法

  • 方法一,修改系统hosts文件,添加151.101.108.133 raw.githubusercontent.com (备注,这是我的IP查询出来的,请自行按照自己网络查询)
    查询解析的IP地址:https://ipaddress.com/website/raw.githubusercontent.com
  • 方法二,如果raw.githubusercontent.com无法链接,请使用备选链接cdn.jsdelivr.net

cdn.jsdelivr.net 无法刷新缓存解决方法

  • 将 cdn.jsdelivr.net中的cdn改为 purge
  • git bash中执行
    curl https://purge.jsdelivr.net/gh/username/reponame@latest/file.***
  • 浏览器直接访问
    https://purge.jsdelivr.net/gh/snapei/clash-pro-rules@release/xxx.txt

以下地址填写在 Clash 配置文件里的 rule-providers 里的 url 配置项中。

使用方式

关于 Clash Premium 使用方式,请查看官方文档Lancellc's GitBook

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

Rule Providers 配置方式

rule-providers:
  reject:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/reject.txt"
    path: ./ruleset/reject.yaml
    interval: 86400

  icloud:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/icloud.txt"
    path: ./ruleset/icloud.yaml
    interval: 86400

  apple:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/apple.txt"
    path: ./ruleset/apple.yaml
    interval: 86400

  google:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/google.txt"
    path: ./ruleset/google.yaml
    interval: 86400

  proxy:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/proxy.txt"
    path: ./ruleset/proxy.yaml
    interval: 86400

  direct:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/direct.txt"
    path: ./ruleset/direct.yaml
    interval: 86400

  cncidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/cncidr.txt"
    path: ./ruleset/cncidr.yaml
    interval: 86400

  lancidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/lancidr.txt"
    path: ./ruleset/lancidr.yaml
    interval: 86400

  youtube:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/youtube.txt"
    path: ./ruleset/youtube.yaml
    interval: 86400
    
  netflix:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/netflix.txt"
    path: ./ruleset/netflix.yaml
    interval: 86400
    
  netflixcidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/netflixcidr.txt"
    path: ./ruleset/netflixcidr.yaml
    interval: 86400

  gfw:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/gfw.txt"
    path: ./ruleset/gfw.yaml
    interval: 86400

  greatfire:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/greatfire.txt"
    path: ./ruleset/greatfire.yaml
    interval: 86400

  tld-not-cn:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/tld-not-cn.txt"
    path: ./ruleset/tld-not-cn.yaml
    interval: 86400

  telegramcidr:
    type: http
    behavior: ipcidr
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/telegramcidr.txt"
    path: ./ruleset/telegramcidr.yaml
    interval: 86400

  tiktok:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/snapei/clash-pro-rules/release/tiktok.txt"
    path: ./ruleset/tiktok.yaml
    interval: 86400


Rules 配置方式

  • 以下配置中的 PROCESS-NAME 规则类型只能ClashX Pro 中使用,其余版本均不能使用,需要手动删除。
  • 如果希望使用 DNS 来解析未命中域名类型规则的域名,而不是直接走代理,请删除 cncidr 行尾的 ,no-resolve
  • 以下配置中,除了 DIRECTREJECT 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 proxiesproxy-groups 中的 name。如你直接使用下面的 rules 规则,则需要在 proxiesproxy-groups 中手动配置一个 namePROXY 的 policy。
  • 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由 DIRECT 改为 PROXY,以此类推,举一反三。
rules:
  - PROCESS-NAME,v2ray,DIRECT
  - PROCESS-NAME,Surge%203,DIRECT
  - PROCESS-NAME,ss-local,DIRECT
  - PROCESS-NAME,privoxy,DIRECT
  - PROCESS-NAME,trojan,DIRECT
  - PROCESS-NAME,trojan-go,DIRECT
  - PROCESS-NAME,naive,DIRECT
  - PROCESS-NAME,Thunder,DIRECT
  - PROCESS-NAME,DownloadService,DIRECT
  - PROCESS-NAME,qBittorrent,DIRECT
  - PROCESS-NAME,Transmission,DIRECT
  - PROCESS-NAME,fdm,DIRECT
  - PROCESS-NAME,aria2c,DIRECT
  - PROCESS-NAME,Folx,DIRECT
  - PROCESS-NAME,NetTransport,DIRECT
  - PROCESS-NAME,uTorrent,DIRECT
  - PROCESS-NAME,WebTorrent,DIRECT
  - RULE-SET,lancidr,DIRECT,no-resolve
  - RULE-SET,cncidr,DIRECT,no-resolve
  - RULE-SET,reject,REJECT
  - RULE-SET,icloud,DIRECT
  - RULE-SET,apple,DIRECT
  - RULE-SET,google,GOOGLE
  - RULE-SET,youtube,YOUTUBE
  - RULE-SET,netflix,NETFLIX
  - RULE-SET,netflixcidr,NETFLIX,no-resolve
  - RULE-SET,gfw,PROXY
  - RULE-SET,greatfire,PROXY
  - RULE-SET,tld-not-cn,PROXY
  - RULE-SET,telegramcidr,PROXY,no-resolve
  - RULE-SET,tiktok,PROXY
  - RULE-SET,proxy,PROXY
  - RULE-SET,direct,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,PROXY

致谢

clash-pro-rules's People

Contributors

snapei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.