Skip to content

Repository files navigation

Rules

Sync Rules Platforms

本仓库维护面向 Surge、Quantumult X、Egern、sing-box 与 mihomo 五种客户端的域名与 IP 规则集。构建流水线自动拉取多个上游来源的数据,经规范化、去重、分类与格式转换后生成规则产物,并发布至各客户端对应的产物分支。

  • 持续构建:每次推送 main 自动重新构建并发布全部产物分支。
  • 定时同步:每日定时同步上游数据,保持规则时效。
  • 可复现构建:构建工具(sing-box、mihomo)版本固定并校验归档与二进制哈希,保证同一提交产出一致的规则文件。

Important

订阅应使用产物分支main 分支为构建源,不提供可直接订阅的规则文件。


目录


快速开始

按客户端选择对应的产物分支订阅:

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

订阅地址格式:https://raw.githubusercontent.com/KuGouGo/Rules/{分支}/{domain|ip}/{名字}.{后缀}

各客户端配置示例

Surge

[Rule]
RULE-SET,https://raw.githubusercontent.com/KuGouGo/Rules/surge/domain/cn.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/KuGouGo/Rules/surge/ip/cn.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/KuGouGo/Rules/surge/domain/geolocation-!cn.list,PROXY

Quantumult X

[filter_remote]
https://raw.githubusercontent.com/KuGouGo/Rules/quanx/domain/cn.list, tag=CN-DOMAIN, force-policy=direct, enabled=true
https://raw.githubusercontent.com/KuGouGo/Rules/quanx/ip/cn.list, tag=CN-IP, force-policy=direct, enabled=true
https://raw.githubusercontent.com/KuGouGo/Rules/quanx/domain/geolocation-!cn.list, tag=GFW-DOMAIN, force-policy=proxy, enabled=true

Egern

rules:
  - rule_set:
      match: "https://raw.githubusercontent.com/KuGouGo/Rules/egern/domain/cn.yaml"
      policy: DIRECT
  - rule_set:
      match: "https://raw.githubusercontent.com/KuGouGo/Rules/egern/ip/cn.yaml"
      policy: DIRECT

sing-box

{
  "route": {
    "rule_set": [
      { "tag": "cn", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/KuGouGo/Rules/sing-box/domain/cn.srs" },
      { "tag": "cn-ip", "type": "remote", "format": "binary", "url": "https://raw.githubusercontent.com/KuGouGo/Rules/sing-box/ip/cn.srs" }
    ]
  }
}

mihomo

rule-providers:
  cn:
    type: http
    behavior: domain
    format: mrs
    url: https://raw.githubusercontent.com/KuGouGo/Rules/mihomo/domain/cn.mrs

规则集说明

列表 内容 典型用途
cn 中国大陆直连域名 国内网站直连
geolocation-cn 按地理语义归集的中国域名 cn 二选一或搭配使用
geolocation-!cn 非中国大陆域名 走代理
google Google 域名与 IP 单独控制 Google
telegram Telegram 域名与 IP 单独控制 Telegram
apple Apple 域名与 IP Apple 服务分流
apple-apns APNs 官方域名 推送通知分流(仅域名规则)
emby / emby-cn Emby 相关域名 媒体库分流
fakeip-filter 需要直连的域名 Fake-IP 模式下放行
china-list 中国大陆 DNS 分流域名 特殊 DNS 需求,不建议作为路由规则
private 内网与保留地址 兜底直连

各产物分支还包含 cloudflareawsfastly 等按服务划分的列表,可按需订阅。

Note

embyemby-cnapple-apns 由本仓库在 sources/custom/ 维护;fakeip-filter 同步自 ShellCrash 上游。完整上游配置见 config/upstreams.json


使用注意

  • cn / geolocation-cn 默认剔除 @ads@!cngeolocation-!cn 默认剔除 @ads@cn;需要原始列表时,可订阅 xxx@adsxxx@cn
  • embyemby-cn 同时使用时,应先加载 emby-cn
  • china-list 仅建议用于 DNS 分流,不宜作为路由规则。
  • 产物分支在每次发布时整批覆盖更新;如需固定版本,可锁定提交 SHA。

许可与声明

仓库自有代码以 MIT License 授权;第三方数据及其派生内容遵循各自的版权与许可条款,来源与声明见 THIRD_PARTY_NOTICES.mdNOTICE。上游内容可能随时变化,使用者应自行评估策略并保留可回退版本。

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages