Files
clash-rules/README.md
2025-09-12 07:10:01 +00:00

4.8 KiB
Raw Blame History

Clash Rules 规则仓库

Update Rules ![Last Update](https://img.shields.io/badge/Last%20Update-$(date +'%Y--%m--%d')-blue)

自动同步 Loyalsoldier/clash-rules 规则,每日更新。

📁 文件结构

.
├── README.md           # 本文档
└── ruleset/
    ├── txt/           # 原始文本格式规则
    │   ├── reject.txt
    │   ├── proxy.txt
    │   └── ...
    └── yaml/          # Clash YAML 格式规则
        ├── reject.yaml
        ├── proxy.yaml
        └── ...

📊 规则文件说明

规则名称 类型 描述 文本格式 YAML格式
reject 域名 广告和跟踪域名 txt yaml
icloud 域名 iCloud 域名 txt yaml
apple 域名 Apple 服务域名 txt yaml
google 域名 Google 服务域名 txt yaml
proxy 域名 需要代理的域名 txt yaml
direct 域名 直连域名 txt yaml
private 域名 私有网络域名 txt yaml
gfw 域名 GFW 域名列表 txt yaml
tld-not-cn 域名 非中国顶级域名 txt yaml
telegramcidr IP段 Telegram IP 段 txt yaml
cncidr IP段 中国 IP 段 txt yaml
lancidr IP段 局域网 IP 段 txt yaml
applications 进程 应用程序规则 txt yaml

🚀 使用方法

方式一:远程规则订阅(推荐)

在 Clash 配置文件中添加:

```yaml rule-providers:

广告拦截

reject: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/adminroot/clash-rules@main/ruleset/yaml/reject.yaml" path: ./ruleset/reject.yaml interval: 86400

代理规则

proxy: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/adminroot/clash-rules@main/ruleset/yaml/proxy.yaml" path: ./ruleset/proxy.yaml interval: 86400

直连规则

direct: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/adminroot/clash-rules@main/ruleset/yaml/direct.yaml" path: ./ruleset/direct.yaml interval: 86400

中国IP段

cncidr: type: http behavior: ipcidr url: "https://cdn.jsdelivr.net/gh/adminroot/clash-rules@main/ruleset/yaml/cncidr.yaml" path: ./ruleset/cncidr.yaml interval: 86400

rules:

  • RULE-SET,reject,REJECT
  • RULE-SET,proxy,PROXY
  • RULE-SET,direct,DIRECT
  • RULE-SET,cncidr,DIRECT
  • GEOIP,CN,DIRECT
  • MATCH,PROXY ```

方式二:本地规则文件

  1. 下载所需的规则文件到本地
  2. 在 Clash 配置中引用本地文件:

```yaml rule-providers: reject: type: file behavior: domain path: ./ruleset/reject.yaml ```

🔗 CDN 加速地址

提供多个 CDN 地址,选择最适合你的:

jsDelivr推荐国内可访问

``` https://cdn.jsdelivr.net/gh/adminroot/clash-rules@main/ruleset/yaml/[规则名].yaml https://fastly.jsdelivr.net/gh/adminroot/clash-rules@main/ruleset/yaml/[规则名].yaml ```

GitHub Raw

``` https://raw.githubusercontent.com/adminroot/clash-rules/main/ruleset/yaml/[规则名].yaml ```

Statically

``` https://cdn.statically.io/gh/adminroot/clash-rules/main/ruleset/yaml/[规则名].yaml ```

📈 更新统计

最后更新时间: $(date +'%Y-%m-%d %H:%M:%S UTC')

查看详细更新日志: UPDATE_LOG.md

⚙️ 自动更新

  • 更新频率: 每日自动更新UTC 23:00 / 北京时间 07:00
  • 手动更新: 可在 Actions 页面手动触发
  • 数据来源: Loyalsoldier/clash-rules

📝 许可证

本项目规则文件来自上游项目,仅做格式转换和分发。


如果这个项目对你有帮助,请给个 Star