Code Monkey home page Code Monkey logo

domain-list-community-converter's Introduction

简介

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

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

使用说明

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 使用方式,请查看官方文档

致谢

domain-list-community-converter's People

Contributors

zydou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.