Skip to content

Repository files navigation

Rules

Sync Rules Platforms

个人自用规则仓库:维护自定义规则,拉取并整合上游数据,自动生成多个客户端的规则文件。

客户端不要引用 main,请使用对应的产物分支。

产物

客户端 分支 格式
Surge surge .list
Quantumult X quanx .list
Egern egern .yaml
sing-box sing-box .srs
mihomo mihomo .mrs

URL 格式:

https://raw.githubusercontent.com/KuGouGo/Rules/{branch}/{domain|ip}/{name}.{extension}

示例:

https://raw.githubusercontent.com/KuGouGo/Rules/surge/domain/cn.list
https://raw.githubusercontent.com/KuGouGo/Rules/quanx/domain/emby-cn.list
https://raw.githubusercontent.com/KuGouGo/Rules/sing-box/domain/fakeip-filter.srs
https://raw.githubusercontent.com/KuGouGo/Rules/mihomo/ip/google.mrs

常用规则包括 cngeolocation-cngeolocation-!cngoogletelegramemby-cnembyfakeip-filter。域名规则以 domain-list-community 源码树为主源,保留 include、affiliation 和属性派生;默认 cn / geolocation-cn 排除 @ads@!cngeolocation-!cn 排除 @ads@cn,同时继续生成对应属性列表。该策略参考 domain-list-custom,但不重复克隆或反解析其 geosite.dat

china-list 独立包含 felixonmars/dnsmasq-china-list 的 accelerated domains,仅用于有特殊需求的中国大陆 DNS 分流,不合并进 cngeolocation-cn,也不建议作为路由规则使用。ruleset.skk.moe 用于补充 cn 中可在中国大陆直连的 domestic 域名,以及 AI、Apple 中国服务/CDN、Microsoft 中国 CDN、apple-intelligenceicloudprivaterelaycategory-game-platforms-download 和 Apple 服务 IP;上游固定标记域名会在规范化阶段统一剔除。其中国 IP 列表因边际覆盖较低不默认引入,语义混合的 direct、宽泛的 global/reject、动态测速、通用 CDN 与下载大集合也不会默认引入。同时使用 emby-cnemby 时,应先加载范围较小的 emby-cn

添加自定义规则

  • 域名规则:sources/custom/domain/*.list
  • IP 规则:sources/custom/ip/*.list
  • 内置稳定规则:sources/builtin/(例如无需远端下载的特殊用途网络)
  • 文件名使用小写字母、数字和连字符。
DOMAIN,api.example.com
DOMAIN-SUFFIX,example.com
DOMAIN-KEYWORD,example
DOMAIN-REGEX,^(.+\.)?example\.com$
IP-CIDR,192.0.2.0/24
IP-CIDR6,2001:db8::/32

不同文件可以按策略需要重叠;同一文件内不要保留重复或被更宽规则覆盖的条目。

本地检查

需要 Bash 5+、Python 3.11+、GNU Make 和 Git。

make check              # 日常快速检查
make validate           # 完整测试
make build-custom-text  # 预览自定义文本产物
make clean              # 清理生成文件

更多维护命令见 docs/DEVELOPMENT.md。推送到 main 后,GitHub Actions 会自动构建并更新五个平台分支;每天也会定时同步一次上游。

声明

规则按现状提供,上游内容可能随时变化,请自行确认使用策略并保留回退版本。仓库代码使用 MIT License;第三方内容仍遵循各自条款,来源见 THIRD_PARTY_NOTICES.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages