Skip to content
Projetos

fordes123/ad-filters-subscriber

Ver no GitHub

Sobre

广告过滤规则订阅器,整合不同来源的规则,帮助你快速构建属于自己的规则集 | Ad Filter Rule Subscriber, integrating rules from various sources to help you quickly build your own rule set

Segurança e privacidade

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
+1
em 15 dias
+1
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

AD Filter Subscriber

Verify Version License

本项目用于聚合不同来源、不同格式的广告过滤规则,并按目标格式完成筛选、去重与转换。

  • adblock (adguard、ubo、abp)
  • dns
  • dnsmasq
  • mihomo (classical、domain、ipcidr)
  • smartdns
  • sing-box
  • hosts

[!WARNING]

  • 并非所有类型规则之间都可以进行转换,且无法精确转换的规则,默认不允许扩大或缩小匹配范围。
  • 规则有效性检测基于域名解析,仅适用于可提取确定域名的规则。

快速开始

CLI

从 Releases 获取二进制程序:

# 使用默认配置构建
adfs

# 使用指定配置构建
adfs -c path/to/application.yml

未指定 -c/--config 时,依次查找程序目录的 application.yaml、config/application.yaml,使用第一个存在的文件。

GitHub Actions

  1. Fork 仓库并修改 config/application.yaml。
  2. 在 Actions 页面启用工作流。
  3. 运行 Update Filters,或等待每 8 小时自动执行。

产物默认提交至 release 分支。手动运行时可通过 release-branch 指定目标分支。

https://raw.githubusercontent.com/<owner>/ad-filters-subscriber/release/<file>

示例配置

adfs:
  # 输入规则源;可配置多个
  input:
    - name: upstream                        # 唯一的规则源名称
      path: https://example.org/filter.txt  # HTTP、HTTPS 或本地文件路径
      type: adblock                         # 规则格式 adblock、dns、hosts、dnsmasq、smartdns、mihomo、sing-box
      dialect: ubo                          # Adblock 方言:core(默认)、abp、adguard、ubo

  output:
    - name: easylist.txt                    # 输出文件名
      type: adblock                         # 输出格式 adblock、dns、hosts、dnsmasq、smartdns、mihomo、sing-box
      dialect: ubo                          # Adblock 方言:core(默认)、abp、adguard、ubo

    - name: hosts
      type: hosts

    - name: clash.yaml
      type: mihomo
      dialect: domain                       # Mihomo 方言:classical(默认)、domain、ipcidr

    - name: sing-box.json
      type: sing-box

  config:
    output-dir: rule                        # 输出目录,默认为 rule

完整配置见 config/application.yaml。

License

MIT

Explore projetos relacionados

Carregando…