GithubHelp home page GithubHelp logo

misakamikoto-35c5 / generate-rule Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 5.0 52 KB

将 AdBlock 规则转换成 Quantumult 的分流规则和正则规则

License: GNU General Public License v3.0

Python 100.00%
adblock quantumultx surfboard gfwlist adblock-quantumult

generate-rule's Introduction

generate-rule

将 AdBlock 规则转换成 Quantumult 的分流规则和正则规则片段,也能同时生成 Surfboard 的规则。

Features

  • 支持 HOSTS / Adblock Plus / GFWlist 规则转 Quantumult / QuantumultX 规则片段。
  • 支持从生成的规则片段组合成 Surfboard 的完整规则(或许 Surge 之类的也可以用)。
  • (针对完整规则生成)片段化的组合模式,可以自行拼接想要的规则列表。

使用方法

生成规则列表

配置好 配置文件 以后直接运行 generate_list.py

默认的配置文件已经配置好生成 EasyPrivacy、EasyList、GFWlist 等规则,参考配置文件可以做出自己需要的规则。

这个项目附加了一份规则列表,涵盖了一部分公共规则列表中没有涵盖的部分,点击这里可以看到列表详情。如果这部分规则列表导致上网异常,请 新建一个 issue

输出文件命名方式

name-hostnames.conf: 只包含域名分流规则或阻止规则的文件
name-rejection.conf: 只包含正则阻止规则的文件
name-unbound_dns.conf: 只包含 Unbound 域名规则的文件

其中,默认配置文件还配置了 surfboard-rules.conf 的输出,包含 EasyPrivacy、EasyList、EasyList CHN、GFWlist 和 AdGuard DNS Filter。

直接引用生成好的规则

大多数用户并不需要自己手动生成规则,因此你可以通过 https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/ 加上你需要的文件名来总是获取最新生成的规则列表,这些规则可以在支持引用外部规则列表的客户端(譬如 Clash Permium, QuantumultX)当中使用,这个项目的规则被设置为每周更新一次。下面是几个常用的地址的样例:

Clash Permium 系列

https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/adguard-dns-clash_reject_hostnames.yaml
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/easylist-clash_reject_hostnames.yaml
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/easylist-chn-clash_reject_hostnames.yaml
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/easyprivacy-clash_reject_hostnames.yaml
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/gfwlist-clash_proxy_hostnames.yaml

Quantumult(X) 系列

https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/adguard-dns-quantumult_hostnames.conf
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/easylist-chn-quantumult_hostnames.conf
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/easylist-quantumult_hostnames.conf
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/easyprivacy-quantumult_hostnames.conf
https://github.com/MisakaMikoto-35c5/generate-rule/releases/latest/download/gfwlist-quantumult_hostnames.conf

generate-rule's People

Contributors

example123 avatar kahosan avatar misakamikoto-35c5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.