AdguardTeam / HostlistsRegistry

Known hosts blocklists that are made available to the users of AdGuard products
https://adguard-dns.io/
GNU General Public License v3.0
196 stars 71 forks source link
adguard adguard-dns adguard-home

AdGuard Host Lists Registry

This repository contains the known hosts blocklists that are made available to the users of AdGuard products (AdGuard DNS, AdGuard Home, etc).

Some of these blocklists are automatically converted to the rules format that AdGuard product understand better.

Where Blocklists Are Published

What Blocklists Can Be Added Here

How to add a filter list

To add a new filter, you need to:

  1. Go to the filters folder.
  2. Go to the category to which the new filter will belong.
  3. Create a new folder with the name filter_(id)_(filter name).
  4. Create two files in this folder: configuration.json and metadata.json. The contents of these files are described below.
  5. In the file locales/en/filters.json add an object with the name and description of the filter according to the example added above.

The files /assets/filters.json and /assets/filters-dev.json must not be edited manually.

Filters Metadata

Tags

Every filter can be marked by a number of tags. Every tag metadata listed in /tags/metadata.json.

Example ```json { "tagId": 1, "keyword": "purpose:ads" } ```

Possible tags:

How to add a blockable service

To add a new blocked service, a new .yml file must be added to the services directory, the contents of the directory and the resulting services.json file are described in the next section.

Services Metadata

The services.json file combines information about services received from separate .yml files located in the services directory. The services.json file is generated by a script, so there is no need to modify it manually.

WARNING!

Service metadata includes id, name, rules, icon_svg:

Service examples services.json - wechat object ```json { "id": "wechat", "name": "WeChat", "rules": ["||wechat.com^", "||weixin.qq.com^", "||wx.qq.com^"], "icon_svg": "" } ``` wechat.yml ```yml id: wechat name: WeChat rules: - '||wechat.com^' - '||weixin.qq.com^' - '||weixin.qq.com.cn^' - '||weixinbridge.com^' - '||wx.qq.com^' icon_svg: ```

SVG icon requirements:

Safe Search Filters

How to Build

yarn install

Run the following command:

yarn run compose

The build result can be found in the assets directory.

Localizations

Blocklist names, descriptions, and tags' names are translated via crowdin.

/locales contains translations for filters, groups, and tags.

Base language strings:

In order to prepare these files run yarn run locales:prepare. This script will scan filters meta and add filters names, descriptions, and tags meta to the base language files.