Skip to content

定制适合 Clash 内核和 sing-box 内核的 ruleset&geodata 规则集文件

License

Notifications You must be signed in to change notification settings

lateautumn2/ruleset_geodata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

写在前面:

2024-08-21

近日发现DustinWin佬更新了规则生成方式,似乎是影响了dns、router rule部分,更新后发现singbox1.10版本之下不再支持,具体影响为rule_set中的version参数,尝试修改convert.sh方法回退为version:1 发现,引入规则文件后singbox内核依旧闪退;由于本人只需要使用router rule,对dns部分并无依赖,于是本fork将所有代码回退到上一版本,并继续对router rule部分进行维护,dns部分由于代码已脱离,后续无任何更新。

  1. 此fork版在 DustinWin 的版本基础上修改了clash_ruleset的规则方式,丢弃了clash通配符方式,使用classical方式,兼容更多软件的引用。
  2. 如果你有新的规则,请在addList中添加你想要添加的规则名字,并在template中新增你的规则文件,请注意格式(可见emby示例),并将workflows中的add_download_url修改为你的项目地址,配置完成后等待action完成后会自动生成文件。

请注意!如果你想使用本仓库fork的clash_ruleset list,但又是一键复制(DustinWin)的模板文件,请将behavior类型从domian修改为classical,并将url换成本仓库clash_ruleset分支的url

① Clash 内核(已修改) - 注:以下只是节选,请酌情套用
proxy-groups:
  - {name: 🚀 节点选择, type: select, proxies: [🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇰🇷 韩国节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点]}
  - {name: 🐟 漏网之鱼, type: select, proxies: [🚀 节点选择, 🎯 全球直连]}
  - {name: 📈 网络测试, type: select, proxies: [🎯 全球直连, 🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇰🇷 韩国节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点]}
  - {name: 🤖 人工智能, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点]}
  - {name: 🎮 游戏服务, type: select, proxies: [🎯 全球直连, 🚀 节点选择]}
  - {name: Ⓜ️ 微软服务, type: select, proxies: [🎯 全球直连, 🚀 节点选择]}
  - {name: 🇬 谷歌服务, type: select, proxies: [🎯 全球直连, 🚀 节点选择]}
  - {name: 🍎 苹果服务, type: select, proxies: [🎯 全球直连, 🚀 节点选择]}
  - {name: 🎥 奈飞视频, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 📽️ 迪士尼+, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 🎞️ Max, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 🎬 Prime Video, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 🍎 Apple TV+, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 📹 油管视频, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 🎵 TikTok, type: select, proxies: [🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 📺 哔哩哔哩, type: select, proxies: [🎯 全球直连, 🚀 节点选择, 🇭🇰 香港节点, 🇯🇵 日本节点, 🇸🇬 新加坡节点]}
  - {name: 🇨🇳 直连域名, type: select, proxies: [🎯 全球直连, 🚀 节点选择]}
  - {name: 🇨🇳 直连 IP, type: select, proxies: [🎯 全球直连, 🚀 节点选择]}
  - {name: 🪜 代理域名, type: select, proxies: [🚀 节点选择, 🎯 全球直连]}
  - {name: 📲 电报消息, type: select, proxies: [🚀 节点选择]}
  - {name: 🖥️ 直连软件, type: select, proxies: [🎯 全球直连]}
  - {name: 🔒 私有网络, type: select, proxies: [🎯 全球直连]}
  - { name: ❤️ Emby公益服, type: select, proxies: [🎯 全球直连, 🇭🇰 香港节点, 🇹🇼 台湾节点, 🇯🇵 日本节点, 🇰🇷 韩国节点, 🇸🇬 新加坡节点, 🇺🇸 美国节点] }
  - {name: 🛑 广告拦截, type: select, proxies: [REJECT]}
  - {name: 🎯 全球直连, type: select, proxies: [DIRECT]}

rule-providers:
  ads:
    type: http
    behavior: classical
    format: text
    path: ./rules/ads.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/ads.list"
    interval: 86400

  applications:
    type: http
    behavior: classical
    format: text
    path: ./rules/applications.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/applications.list"
    interval: 86400

  private:
    type: http
    behavior: classical
    format: text
    path: ./rules/private.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/private.list"
    interval: 86400

  microsoft-cn:
    type: http
    behavior: classical
    format: text
    path: ./rules/microsoft-cn.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/microsoft-cn.list"
    interval: 86400

  apple-cn:
    type: http
    behavior: classical
    format: text
    path: ./rules/apple-cn.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/apple-cn.list"
    interval: 86400

  google-cn:
    type: http
    behavior: classical
    format: text
    path: ./rules/google-cn.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/google-cn.list"
    interval: 86400

  games-cn:
    type: http
    behavior: classical
    format: text
    path: ./rules/games-cn.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/games-cn.list"
    interval: 86400

  netflix:
    type: http
    behavior: classical
    format: text
    path: ./rules/netflix.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/netflix.list"
    interval: 86400

  disney:
    type: http
    behavior: classical
    format: text
    path: ./rules/disney.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/disney.list"
    interval: 86400

  max:
    type: http
    behavior: classical
    format: text
    path: ./rules/max.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/max.list"
    interval: 86400

  primevideo:
    type: http
    behavior: classical
    format: text
    path: ./rules/primevideo.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/primevideo.list"
    interval: 86400

  appletv:
    type: http
    behavior: classical
    format: text
    path: ./rules/appletv.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/appletv.list"
    interval: 86400

  youtube:
    type: http
    behavior: classical
    format: text
    path: ./rules/youtube.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/youtube.list"
    interval: 86400

  tiktok:
    type: http
    behavior: classical
    format: text
    path: ./rules/tiktok.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/tiktok.list"
    interval: 86400

  bilibili:
    type: http
    behavior: classical
    format: text
    path: ./rules/bilibili.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/bilibili.list"
    interval: 86400

  ai:
    type: http
    behavior: classical
    format: text
    path: ./rules/ai.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/ai.list"
    interval: 86400

  networktest:
    type: http
    behavior: classical
    format: text
    path: ./rules/networktest.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/networktest.list"
    interval: 86400

  proxy:
    type: http
    behavior: classical
    format: text
    path: ./rules/proxy.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/proxy.list"
    interval: 86400

  cn:
    type: http
    behavior: classical
    format: text
    path: ./rules/cn.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/cn.list"
    interval: 86400

  netflixip:
    type: http
    behavior: classical
    format: text
    path: ./rules/netflixip.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/netflixip.list"
    interval: 86400

  telegramip:
    type: http
    behavior: classical
    format: text
    path: ./rules/telegramip.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/telegramip.list"
    interval: 86400

  privateip:
    type: http
    behavior: classical
    format: text
    path: ./rules/privateip.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/privateip.list"
    interval: 86400

  cnip:
    type: http
    behavior: classical
    format: text
    path: ./rules/cnip.list
    url: "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/cnip.list"
    interval: 86400
  emby:
    type: http
    behavior: classical
    format: text
    path: ./rules/emby.list
    url: 'https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/clash-ruleset/emby.list'
    interval: 86400

rules:
  - RULE-SET,ads,🛑 广告拦截
  - RULE-SET,applications,🖥️ 直连软件
  - RULE-SET,private,🔒 私有网络
  - RULE-SET,microsoft-cn,Ⓜ️ 微软服务
  - RULE-SET,apple-cn,🍎 苹果服务
  - RULE-SET,google-cn,🇬 谷歌服务
  - RULE-SET,games-cn,🎮 游戏服务
  - RULE-SET,netflix,🎥 奈飞视频
  - RULE-SET,disney,📽️ 迪士尼+
  - RULE-SET,max,🎞️ Max
  - RULE-SET,primevideo,🎬 Prime Video
  - RULE-SET,appletv,🍎 Apple TV+
  - RULE-SET,youtube,📹 油管视频
  - RULE-SET,tiktok,🎵 TikTok
  - RULE-SET,bilibili,📺 哔哩哔哩
  - RULE-SET,ai,🤖 人工智能
  - RULE-SET,networktest,📈 网络测试
  - RULE-SET,emby,❤️ Emby公益服
  - RULE-SET,proxy,🪜 代理域名
  - RULE-SET,cn,🇨🇳 直连域名
  - RULE-SET,netflixip,🎥 奈飞视频,no-resolve
  - RULE-SET,telegramip,📲 电报消息,no-resolve
  - RULE-SET,privateip,🔒 私有网络,no-resolve
  - RULE-SET,cnip,🇨🇳 直连 IP
① Sing-box 内核(已修改) - 注:以下只是节选,请酌情套用
  "outbounds": [
    { "tag": "🚀 节点选择", "type": "selector", "outbounds": [ "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "📈 网络测试", "type": "selector", "outbounds": ["🎯 全球直连",  "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "🤖 人工智能", "type": "selector", "outbounds": ["🚀 节点选择",  "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "🎮 游戏服务", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "Ⓜ️ 微软服务", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "🧱 谷歌服务", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "🍎 苹果服务", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "🎥 奈飞视频", "type": "selector", "outbounds": ["🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "📽️ 迪士尼+", "type": "selector", "outbounds": ["🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "📹 油管视频", "type": "selector", "outbounds": ["🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "🎵 TikTok", "type": "selector", "outbounds": ["🚀 节点选择", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"] },
    { "tag": "❤️ Emby公益服","type": "selector","outbounds": ["🚀 节点选择", "🎯 全球直连", "🇭🇰 香港节点", "🇹🇼 台湾节点", "🇯🇵 日本节点", "🇰🇷 韩国节点", "🇸🇬 新加坡节点", "🇺🇸 美国节点"]},
    { "tag": "📺 哔哩哔哩", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "🇨🇳 直连域名", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "🇨🇳 直连 IP", "type": "selector", "outbounds": ["🎯 全球直连", "🚀 节点选择"] },
    { "tag": "🪜 代理域名", "type": "selector", "outbounds": ["🚀 节点选择", "🎯 全球直连"] },
    { "tag": "📲 电报消息", "type": "selector", "outbounds": ["🚀 节点选择"] },
    { "tag": "🖥️ 直连软件", "type": "selector", "outbounds": ["🎯 全球直连"] },
    { "tag": "🔒 私有网络", "type": "selector", "outbounds": ["🎯 全球直连"] },
    { "tag": "🛑 广告拦截", "type": "selector", "outbounds": ["block"] },
    { "tag": "🎯 全球直连", "type": "selector", "outbounds": ["direct"] },
    { "tag": "🐟 漏网之鱼", "type": "selector", "outbounds": ["🚀 节点选择", "🎯 全球直连"] },
    { "tag": "block", "type": "block" },
    { "tag": "direct", "type": "direct" },
    { "tag": "dns-out", "type": "dns" },
  ],
  "route": {
    "rules": [
      {
        "geosite": "category-ads-all",
        "outbound": "block"
      },
      {
        "outbound": "dns-out",
        "protocol": "dns"
      },
      {
        "clash_mode": "direct",
        "outbound": "🎯 全球直连"
      },
      {
        "clash_mode": "global",
        "outbound": "🚀 节点选择"
      },
      {
        "geoip": ["cn", "private"],
        "outbound": "🎯 全球直连"
      },
      {
        "geosite": "cn",
        "outbound": "🎯 全球直连"
      },
      { "rule_set": ["ads"], "outbound": "🛑 广告拦截" },
      { "rule_set": ["applications"], "outbound": "🖥️ 直连软件" },
      { "rule_set": ["private"], "outbound": "🔒 私有网络" },
      { "rule_set": ["microsoft-cn"], "outbound": "Ⓜ️ 微软服务" },
      { "rule_set": ["apple-cn"], "outbound": "🍎 苹果服务" },
      { "rule_set": ["google-cn"], "outbound": "🧱 谷歌服务" },
      { "rule_set": ["games-cn"], "outbound": "🎮 游戏服务" },
      { "rule_set": ["netflix"], "outbound": "🎥 奈飞视频" },
      { "rule_set": ["disney"], "outbound": "📽️ 迪士尼+" },
      { "rule_set": ["youtube"], "outbound": "📹 油管视频" },
      { "rule_set": ["tiktok"], "outbound": "🎵 TikTok" },
      { "rule_set": ["bilibili"], "outbound": "📺 哔哩哔哩" },
      { "rule_set": ["ai"], "outbound": "🤖 人工智能" },
      { "rule_set": ["networktest"], "outbound": "📈 网络测试" },
      { "rule_set": ["proxy"], "outbound": "🪜 代理域名" },
      { "rule_set": ["cn"], "outbound": "🇨🇳 直连域名" },
      { "rule_set": ["netflixip"], "outbound": "🎥 奈飞视频" },
      { "rule_set": ["telegramip"], "outbound": "📲 电报消息" },
      { "rule_set": ["privateip"], "outbound": "🔒 私有网络" },
      { "rule_set": ["cnip"], "outbound": "🇨🇳 直连 IP" },
      { "rule_set": ["emby"], "outbound": "❤️ Emby公益服" }
    ],
    "final": "🐟 漏网之鱼",
    "rule_set": [
      {
        "tag": "fakeip-filter",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/fakeip-filter.srs"
      },
      {
        "tag": "ads",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/ads.srs"
      },
      {
        "tag": "applications",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/applications.srs"
      },
      {
        "tag": "private",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/private.srs"
      },
      {
        "tag": "microsoft-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/microsoft-cn.srs"
      },
      {
        "tag": "apple-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/apple-cn.srs"
      },
      {
        "tag": "google-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/google-cn.srs"
      },
      {
        "tag": "games-cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/games-cn.srs"
      },
      {
        "tag": "netflix",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/netflix.srs"
      },
      {
        "tag": "disney",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/disney.srs"
      },
      {
        "tag": "youtube",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/youtube.srs"
      },
      {
        "tag": "tiktok",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/tiktok.srs"
      },
      {
        "tag": "bilibili",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/bilibili.srs"
      },
      {
        "tag": "ai",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/ai.srs"
      },
      {
        "tag": "networktest",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/networktest.srs"
      },
      {
        "tag": "proxy",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/proxy.srs"
      },
      {
        "tag": "cn",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/cn.srs"
      },
      {
        "tag": "netflixip",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/netflixip.srs"
      },
      {
        "tag": "telegramip",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/telegramip.srs"
      },
      {
        "tag": "privateip",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/privateip.srs"
      },
      {
        "tag": "cnip",
        "type": "remote",
        "format": "binary",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/cnip.srs"
      },
      {
        "tag": "emby",
        "type": "remote",
        "format": "source",
        "url": "https://raw.githubusercontent.com/lateautumn2/ruleset_geodata/sing-box-ruleset/emby.json"
      }
    ]
  }
}


以下为原文档

特别说明:sing-box rule_set 规则集适配了 v1.9.0+ 版本内核新增的 domain_suffix 特性:"domain_suffix": "baidu.com"(可匹配 baidu.combaike.baidu.com),与 mihomo 内核一致了。原特性仅有 "domain_suffix": ".baidu.com"(仅匹配 baike.baidu.com 而无法匹配 baidu.com),详见:domain_suffix 不完整匹配二级域名。如需使用本规则集,请尽快升级内核!

一、 geodata 规则集文件说明

1. 文件类型

Clash geodata 规则集文件,包括:geosite.dat、geoip.dat、Country.mmdb 和 geoip.metadb、ASN.mmdb(仅限 mihomo 内核)等
sing-box geodata 规则集文件,包括:geosite.db 和 geoip.db 等

2. 数据源

① 每天凌晨 2 点半(北京时间)自动构建,根据 Loyalsoldier/v2ray-rules-datLoyalsoldier/geoip 进行深度定制,可点击查看包含的域名列表IP 段列表
geosite,fakeip-filter,📌 fakeip 过滤 源采用 ShellCrash/public/fake_ip_filter.list(sing-box 内核专用,可参考《ShellCrash 使用 sing-box PuerNya 版内核进行 DNS 分流教程-geodata 方案》)
geosite,ads,🛑 广告拦截 源采用 privacy-protection-tools/anti-AD
geosite,private,🔒 私有网络 源采用 v2fly/domain-list-community/privateblackmatrix7/ios_rule_script/Lan(仅域名)和 TrackersList(仅域名)组合,并添加主流 Clash dashboard 在线面板域名(clash.razord.topclash.metacubex.oneyacd.haishan.meyacd.metacubex.oned.metacubex.one
geosite,microsoft-cn,Ⓜ️ 微软服务 源采用 v2fly/domain-list-community/microsoft@cn
geosite,apple-cn,🍎 苹果服务 源采用 v2fly/domain-list-community/apple@cn
geosite,google-cn,🇬 谷歌服务 源采用 v2fly/domain-list-community/google@cn
geosite,games-cn,🎮 游戏服务 源采用 v2fly/domain-list-community/category-games@cnblackmatrix7/ios_rule_script/SteamCNblackmatrix7/ios_rule_script/GameDownloadCN 组合
geosite,netflix,🎥 奈飞视频 源采用 blackmatrix7/ios_rule_script/Netflix
geosite,disney,📽️ 迪士尼+ 源采用 blackmatrix7/ios_rule_script/Disney
geosite,max,🎞️ Max 源采用 blackmatrix7/ios_rule_script/HBO
geosite,primevideo,🎬 Prime Video 源采用 blackmatrix7/ios_rule_script/PrimeVideo
geosite,appletv,🍎 Apple TV+ 源采用 blackmatrix7/ios_rule_script/AppleTV
geosite,youtube,📹 油管视频 源采用 blackmatrix7/ios_rule_script/YouTube
geosite,tiktok,🎵 TikTok 源采用 blackmatrix7/ios_rule_script/TikTok
geosite,bilibili,📺 哔哩哔哩 源采用 blackmatrix7/ios_rule_script/BiliBili
geosite,ai,🤖 人工智能 源采用 blackmatrix7/ios_rule_script/OpenAIblackmatrix7/ios_rule_script/Copilotblackmatrix7/ios_rule_script/Geminiblackmatrix7/ios_rule_script/Claude 组合
geosite,networktest,📈 网络测试 源采用 v2fly/domain-list-community/speedtestblackmatrix7/ios_rule_script/Speedtest 和 IPv6 测试域名关键字(keyword,包括:ipv6-testtest-ipv6ipv6testtestipv6)组合
geosite,proxy,🪜 代理域名 源采用 cokebar/gfwlist2dnsmasq 生成的 gfwlistv2fly/domain-list-community/geolocation-!cn(删除了带有 @cn@ads 的域名,并新增了 v2fly/domain-list-community/cn 中带有 @!cn 的域名)和 blackmatrix7/ios_rule_script/Global 组合
geosite,cn,🇨🇳 直连域名 源采用 v2fly/domain-list-community/cn(删除了带有 @!cn@ads 的域名,并新增了 v2fly/domain-list-community/geolocation-!cn 中带有 @cn 的域名)和 blackmatrix7/ios_rule_script/ChinaMax(仅域名)
geoip,netflix,🎥 奈飞视频 源采用 GeoLite2/netflix.txtblackmatrix7/ios_rule_script/Netflix(仅 IP)组合
geoip,telegram,📲 电报消息 源采用 GeoLite2/telegram.txtTelegram IP 段blackmatrix7/ios_rule_script/Telegram(仅 IP)组合
geoip,private,🔒 私有网络 源采用 GeoLite2/private.txtblackmatrix7/ios_rule_script/Lan(仅 IP)和 TrackersList(仅 IP)组合
geoip,cn,🇨🇳 直连 IP 源采用 GeoLite2/cn.txt17mon/china_ip_listgaoyifan/china-operator-ipblackmatrix7/ios_rule_script/ChinaIPsAPNIC/CN 组合

3. 文件下载

规则集文件包含的规则和下载地址对应关系如下表:

规则集文件名称 包含规则 GitHub 源 jsDelivr 源 GitHub Proxy 源
geosite-all.dat fakeip-filteradsprivatemicrosoft-cnapple-cngoogle-cngames-cnnetflixdisneymaxprimevideoappletvyoutubetiktokbilibiliainetworktestproxycn 点此下载 点此下载 点此下载
geosite-all.db 点此下载 点此下载 点此下载
geosite-all-lite.dat fakeip-filteradsprivatemicrosoft-cnapple-cngoogle-cngames-cnnetflixdisneymaxprimevideoappletvyoutubetiktokbilibiliainetworktestproxycn 点此下载 点此下载 点此下载
geosite-all-lite.db 点此下载 点此下载 点此下载
geosite.dat fakeip-filteradsprivatemicrosoft-cnapple-cngoogle-cngames-cnainetworktestproxycn 点此下载 点此下载 点此下载
geosite.db 点此下载 点此下载 点此下载
geosite-lite.dat fakeip-filteradsprivatemicrosoft-cnapple-cngoogle-cngames-cnainetworktestproxycn 点此下载 点此下载 点此下载
geosite-lite.db 点此下载 点此下载 点此下载
geoip-all.dat 点此查看 点此下载 点此下载 点此下载
Country-all.mmdb 点此下载 点此下载 点此下载
geoip-all.metadb 点此下载 点此下载 点此下载
geoip-all.db 点此下载 点此下载 点此下载
Country-ASN-all.mmdb cloudflarecloudfrontfacebookfastlygooglenetflixtelegramtwitter,具体可点此查看 点此下载 点此下载 点此下载
geoip.dat netflixtelegramprivatecn 点此下载 点此下载 点此下载
Country.mmdb 点此下载 点此下载 点此下载
geoip.metadb 点此下载 点此下载 点此下载
geoip.db 点此下载 点此下载 点此下载
geoip-lite.dat netflixtelegramprivatecn 点此下载 点此下载 点此下载
Country-lite.mmdb 点此下载 点此下载 点此下载
geoip-lite.metadb 点此下载 点此下载 点此下载
geoip-lite.db 点此下载 点此下载 点此下载
Country-ASN.mmdb netflixtelegramprivatecn,具体可点此查看 点此下载 点此下载 点此下载

4. 文件导入

### ① 导入到 Linux 端(以 [ShellCrash](https://github.com/juewuy/ShellCrash) 导入 geosite.dat、geosite.db、geoip.dat、Country.mmdb、geoip.metadb、ASN.mmdb 和 geoip.db 为例) 连接 SSH 后执行如下命令: ``` # 适用于 Clash 内核 curl -o $CRASHDIR/GeoSite.dat -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/geosite.dat curl -o $CRASHDIR/GeoIP.dat -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/geoip.dat curl -o $CRASHDIR/Country.mmdb -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/Country.mmdb # 适用于 mihomo 内核 curl -o $CRASHDIR/geoip.metadb -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/geoip.metadb curl -o $CRASHDIR/ASN.mmdb -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/Country-ASN.mmdb # 适用于 sing-box 内核 curl -o $CRASHDIR/geosite.db -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/geosite.db curl -o $CRASHDIR/geoip.db -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@sing-box/geoip.db $CRASHDIR/start.sh restart ```
### ② 导入到 Windows 端(以 [Clash Verge](https://github.com/clash-verge-rev/clash-verge-rev) 导入 geosite.dat、geoip.dat、Country.mmdb、geoip.metadb 和 ASN.mmdb 为例) 以管理员身份运行 CMD 命令提示符,执行如下命令: ``` taskkill /f /t /im "Clash Verge*" taskkill /f /t /im Clash-Verge* taskkill /f /t /im clash-meta* curl -o %APPDATA%\io.github.clash-verge-rev.clash-verge-rev\geosite.dat -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/geosite.dat curl -o %APPDATA%\io.github.clash-verge-rev.clash-verge-rev\geoip.dat -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/geoip.dat curl -o %APPDATA%\io.github.clash-verge-rev.clash-verge-rev\Country.mmdb -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/Country.mmdb curl -o %APPDATA%\io.github.clash-verge-rev.clash-verge-rev\geoip.metadb -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/geoip.metadb curl -o %APPDATA%\io.github.clash-verge-rev.clash-verge-rev\ASN.mmdb -L https://cdn.jsdelivr.net/gh/DustinWin/ruleset_geodata@clash/Country-ASN.mmdb ```

二、 ruleset 规则集文件说明

1. 文件类型

① Clash ruleset 规则集文件,格式为 .yamlformat: yaml)和 .listformat: text
② sing-box ruleset 规则集文件,格式有 .srs"format": "binary")和 .json"format": "source"

2. 数据源

① 每天凌晨 2 点半(北京时间)自动构建,根据 Loyalsoldier/clash-rulesLoyalsoldier/geoip 进行深度定制,可点击查看包含的域名列表IP 段列表
rule-set,fakeip-filter,📌 fakeip 过滤 源采用 ShellCrash/public/fake_ip_filter.list(sing-box 内核专用,可参考《ShellCrash 使用 sing-box PuerNya 版内核进行 DNS 分流教程-ruleset方案》)
rule-set,ads,🛑 广告拦截 源采用 privacy-protection-tools/anti-AD
rule-set,applications,🖥️ 直连软件 源采用 blackmatrix7/ios_rule_script/DownloadLoyalsoldier/clash-rules/applications.txt 组合
rule-set,private,🔒 私有网络 源采用 v2fly/domain-list-community/privateblackmatrix7/ios_rule_script/Lan(仅域名)和 TrackersList(仅域名)组合,并添加主流 Clash dashboard 在线面板域名(clash.razord.topclash.metacubex.oneyacd.haishan.meyacd.metacubex.oned.metacubex.one
rule-set,microsoft-cn,Ⓜ️ 微软服务 源采用 v2fly/domain-list-community/microsoft@cn
rule-set,apple-cn,🍎 苹果服务 源采用 v2fly/domain-list-community/apple@cn
rule-set,google-cn,🇬 谷歌服务 源采用 v2fly/domain-list-community/google@cn
rule-set,games-cn,🎮 游戏服务 源采用 v2fly/domain-list-community/category-games@cnblackmatrix7/ios_rule_script/SteamCNblackmatrix7/ios_rule_script/GameDownloadCN 组合
rule-set,netflix,🎥 奈飞视频 源采用 blackmatrix7/ios_rule_script/Netflix(仅域名)
rule-set,disney,📽️ 迪士尼+ 源采用 blackmatrix7/ios_rule_script/Disney
rule-set,max,🎞️ Max 源采用 blackmatrix7/ios_rule_script/HBO
rule-set,primevideo,🎬 Prime Video 源采用 blackmatrix7/ios_rule_script/PrimeVideo
rule-set,appletv,🍎 Apple TV+ 源采用 blackmatrix7/ios_rule_script/AppleTV
rule-set,youtube,📹 油管视频 源采用 blackmatrix7/ios_rule_script/YouTube
rule-set,tiktok,🎵 TikTok 源采用 blackmatrix7/ios_rule_script/TikTok
rule-set,bilibili,📺 哔哩哔哩 源采用 blackmatrix7/ios_rule_script/BiliBili
rule-set,ai,🤖 人工智能 源采用 blackmatrix7/ios_rule_script/OpenAIblackmatrix7/ios_rule_script/Copilotblackmatrix7/ios_rule_script/Geminiblackmatrix7/ios_rule_script/Claude 组合
rule-set,networktest,📈 网络测试 源采用 v2fly/domain-list-community/speedtestblackmatrix7/ios_rule_script/Speedtest 和 IPv6 测试域名关键字(keyword,包括:ipv6-testtest-ipv6ipv6testtestipv6)组合
rule-set,proxy,🪜 代理域名 源采用 cokebar/gfwlist2dnsmasq 生成的 gfwlistv2fly/domain-list-community/geolocation-!cn(删除了带有 @cn@ads 的域名,并新增了 v2fly/domain-list-community/cn 中带有 @!cn 的域名)和 blackmatrix7/ios_rule_script/Global 组合
rule-set,cn,🇨🇳 直连域名 源采用 v2fly/domain-list-community/cn(删除了带有 @!cn@ads 的域名,并新增了 v2fly/domain-list-community/geolocation-!cn 中带有 @cn 的域名)和 blackmatrix7/ios_rule_script/ChinaMax(仅域名)
rule-set,netflixip,🎥 奈飞视频 源采用 GeoLite2/netflix.txt(仅 IP)和 blackmatrix7/ios_rule_script/Netflix(仅 IP)组合
rule-set,telegramip,📲 电报消息 源采用 GeoLite2/telegram.txtTelegram IP 段blackmatrix7/ios_rule_script/Telegram(仅 IP)组合
rule-set,privateip,🔒 私有网络 源采用 GeoLite2/private.txtblackmatrix7/ios_rule_script/Lan(仅 IP)和 TrackersList(仅 IP)组合
rule-set,cnip,🇨🇳 直连 IP 源采用 GeoLite2/cn.txt17mon/china_ip_listgaoyifan/china-operator-ipblackmatrix7/ios_rule_script/ChinaIPsAPNIC/CN 组合

About

定制适合 Clash 内核和 sing-box 内核的 ruleset&geodata 规则集文件

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%