This repository offers a Python script that combines and processes various blocklists, host files, and domain lists to produce an AdBlock filter list. A sorted list of domains in AdBlock syntax format is produced after the script eliminates duplicates and redundant rules.
- Combines multiple blocklists, host files, and domain lists into a single AdBlock filter list
- Removes duplicate entries
- Removes redundant rules that are covered by existing domain rules
- Generates a header with the date, time, domain count, and the number of duplicates and redundant rules removed
- Allows customization of blocklist sources through a configuration file
This project combines the following filter lists by default:
- hagezi/dns-blocklists (multi.txt)
- quidsup/notrack-blocklists (trackers.hosts)
- oisd/blocklist-big (big.oisd.nl)
- hBlock/blocklist (hosts_adblock.txt)
You can easily add your own filter lists by creating a config.json
file and updating the blocklist_urls
array with the URLs of your custom filter lists.
- Clone the repository or download the source code.
- Create a
config.json
file and add or remove blocklist URLs in theblocklist_urls
array. - Run the
adblock_filter_compiler.py
script. This will generate theblocklist.txt
file with the combined filter list in AdBlock syntax format.
This repository uses GitHub Actions to automate the filter generation process. The workflow runs every day and updates the blocklist.txt
file if there are any changes.
- Python 3.x
- requests
Feel free to open an issue or submit a pull request if you have any improvements or suggestions.
This project is licensed under the MIT License. See the LICENSE file for details.