Skip to content

zydou/domain-list-community-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

简介

本项目用于将 v2ray 官方社区维护的各域名列表@v2fly/domain-list-community转换成以下规则集 (RULE-SET), 使用 GitHub Actions 每日自动构建,保证规则最新。

此外,对于具有属性的域名(如@cn, @ads),还会额外生成对应的域名列表,以便于用户自行使用。例如对于apple服务,在生成apple.yml的同时,还会额外生成apple@ads.ymlapple@cn.yml

使用说明

Clash

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

Clash Premium 各版本下载地址

使用方式

在 Clash 配置文件中添加 rule-providersrules字段:

rule-providers:
  ads:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/zydou/domain-list-community-converter/clash/category-ads-all.yml"
    path: ./ruleset/category-ads-all.yml
    interval: 86400
  google:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/zydou/domain-list-community-converter/clash/google.yml"
    path: ./ruleset/google.yml
    interval: 86400
  microsoft:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/zydou/domain-list-community-converter/clash/microsoft.yml"
    path: ./ruleset/microsoft.yml
    interval: 86400
  cn:
    type: http
    behavior: domain
    url: "https://raw.githubusercontent.com/zydou/domain-list-community-converter/clash/cn.yml"
    path: ./ruleset/cn.yml
    interval: 86400
rules:
  - RULE-SET,ads,REJECT
  - RULE-SET,google,PROXY
  - RULE-SET,microsoft,DIRECT
  - RULE-SET,cn,DIRECT
  • 以上配置中,除了 DIRECTREJECT 是默认存在于 Clash 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 proxies 或 proxy-groups 中的 name。如你直接使用上面的 rules 规则,则需要在 proxies 或 proxy-groups 中手动配置一个 name 为 PROXY 的 policy。
  • 如你希望添加更多域名列表,可以点击此处查询所有列表并添加到rule-providers字段中,然后在rules字段中添加规则,格式为 RULE-SET,name,policy,其中 namepolicy 可以自定义。

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

SurgeShadowrocket

Shadowrocket 兼容 Surge 配置文件格式,以下只介绍 Surge 的使用方法,Shadowrocket 可以使用和 Surge 相同的配置。

⚠️ 注意:

  • DOMAIN-SET 同时适用于 Surge for Mac v3.5.1 及更新的版本、Surge for iOS v4.2.2 及更新的版本,拥有比 RULE-SET 更优秀的匹配效率。
  • RULE-SET 同时适用于 Surge for Mac v3.0 及更新的版本、Surge for iOS v3.4 及更新的版本。
  • DOMAIN-SET相比于RULE-SET的缺点是不支持 eTLD 后缀(如 .github.io 无法匹配 example.github.io ). 详见官方文档

使用方式

在 Surge 配置文件中添加如下规则:

DOMAIN-SET:

[Rule]
DOMAIN-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-domain-set/category-ads-all.txt,REJECT
DOMAIN-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-domain-set/google.txt,PROXY
DOMAIN-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-domain-set/microsoft.txt,DIRECT
DOMAIN-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-domain-set/cn.txt,DIRECT

RULE-SET:

[Rule]
RULE-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-rule-set/category-ads-all.txt,REJECT
RULE-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-rule-set/google.txt,PROXY
RULE-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-rule-set/microsoft.txt,DIRECT
RULE-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-rule-set/cn.txt,DIRECT
  • 以上配置中,除了 DIRECTREJECT 是默认存在于 Surge 中的 policy(路由策略/流量处理策略),其余均为自定义 policy,对应配置文件中 [Proxy][Proxy Group] 中的代理名称。如你直接使用上面的 [Rule] 规则,则需要在 [Proxy][Proxy Group] 中手动配置一个名为 PROXY 的 policy。
  • 如你希望添加更多DOMAIN-SET域名列表,可以点击此处查询所有列表,并在[Rule]字段中添加规则,格式为 DOMAIN-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-domain-set/name.txt,policy,其中 namepolicy 可以自定义。
  • 如你希望添加更多RULE-SET域名列表,可以点击此处查询所有列表,并在[Rule]字段中添加规则,格式为 RULE-SET,https://raw.githubusercontent.com/zydou/domain-list-community-converter/surge-rule-set/name.txt,policy,其中 namepolicy 可以自定义。

更多关于 Surge 使用方式,请查看官方文档

致谢

About

Community managed domain list for Clash, Shadowrocket, Surge

Topics

Resources

License

Stars

Watchers

Forks

Languages