base on Primary Block Lists <img src="https://raw.githubusercontent.com/blocklistproject/Lists/master/img/logo.webp" height="150px"/> # The Block List Project [![GitHub issues](https://img.shields.io/github/issues/blocklistproject/lists)](https://github.com/blocklistproject/Lists/issues) [![GitHub closed issues](https://badgen.net/github/closed-issues/blocklistproject/Lists?color=green)](https://github.com/blocklistproject/Lists/issues?q=is%3Aissue+is%3Aclosed) [![GitHub contributors](https://img.shields.io/github/contributors/blocklistproject/lists)](https://github.com/blocklistproject/Lists/graphs/contributors) ![GitHub repo size](https://img.shields.io/github/repo-size/blocklistproject/lists) ![GitHub](https://img.shields.io/github/license/blocklistproject/lists?color=blue) ![GitHub Maintained](https://img.shields.io/badge/Open%20Source-Yes-green) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/blocklistproject/lists) ![GitHub last commit](https://img.shields.io/github/last-commit/blocklistproject/lists) ![GitHub Maintained](https://img.shields.io/badge/maintained-yes-green) [![ko-fi](https://badgen.net/badge/Support%20Us/Ko-Fi?color=orange)](https://ko-fi.com/P5P521OPP) [![patreon](https://badgen.net/badge/Support%20Us/Patreon?color=red)](https://www.patreon.com/bePatron?u=8892646) &nbsp; <p align="center"> <a href="https://www.patreon.com/bePatron?u=8892646"><img src="https://i0.wp.com/thelemicunion.com/wp-content/uploads/2018/07/Patreon-Support-Button.png?w=640&ssl=1" width=250></a> <a href="https://discord.com/invite/x9KeVQggkc"><img src="https://discord.com/assets/ff41b628a47ef3141164bfedb04fb220.png" width=250 /></a> </p> &nbsp; ## Table of Contents - [About](#about) - [What's New in v2.0](#whats-new-in-v20) - [Quick Start](#quick-start) - [Available Lists](#available-lists) - [Formats](#formats) - [Contributing](#contributing) - [For Developers](#for-developers) - [License](#license) &nbsp; ## About The Block List Project provides curated domain blocklists for various categories of unwanted content. Our lists are designed to give you control over what gets blocked, rather than an all-or-nothing approach. All lists are: - ✅ **Free and open source** — always will be - ✅ **Regularly updated** — automated builds on every change - ✅ **Available in multiple formats** — Pi-hole, AdGuard, dnsmasq, and more - ✅ **Community maintained** — submit requests via GitHub Issues &nbsp; ## What's New in v2.0 We've completely rebuilt the project infrastructure from the ground up. After 6 months of planning, we're excited to share what's changed. ### Why We Rewrote Everything The old system worked, but it was held together with duct tape. We had a mix of JavaScript and Python scripts that nobody wanted to touch, inconsistent build processes, and no automated testing. When bugs appeared, fixing one thing broke another. We needed something maintainable — not just for us, but for anyone who wants to contribute. ### What Changed **For Users:** Nothing breaks! All your existing URLs continue to work. Same lists, same formats, same locations. We rebuilt the engine without changing the car. **For Contributors:** - New structured issue templates make it easier to request additions or removals - Our triage bot automatically checks if a domain already exists in our lists - Pull requests now get validated automatically — no more waiting for a human to catch simple errors **Under the Hood:** - Replaced 7 JavaScript scripts with a single Python codebase - Added 151 automated tests (yes, really) - Config-driven architecture — all list definitions live in `config/lists.yml` - Proper domain validation catches invalid entries before they ship - TLD verification ensures we don't accidentally block legitimate domains - Critical domain protection prevents catastrophic mistakes (no more accidentally blocking google.com) ### The Technical Bits If you're curious about the architecture: ``` Old System: New System: ───────────── ───────────── 7 JS scripts 1 Python package 0 tests 151 tests Manual validation Automated validation Ad-hoc builds CI/CD pipeline Mixed formats Config-driven formats ``` The new build system runs `pytest` on every change, validates domain syntax, checks TLDs against the public suffix list, and generates all four output formats automatically. Everything flows through a single `build.py` CLI. We wrote about the full rationale in our [archived optimization document](docs/Optimize.md) if you want the deep dive. &nbsp; ## Quick Start ### Pi-hole 1. Copy the link for your desired list from the [Available Lists](#available-lists) section 2. Go to **Group Management** → **Adlists** → Paste URL → **Add** 3. Go to **Tools** → **Update Gravity** ### AdGuard Home 1. Copy the AdGuard format link for your desired list 2. Go to **Filters** → **DNS Blocklists** → **Add blocklist** → **Add a custom list** 3. Paste the URL and click **Save** ### Other DNS Blockers Use the appropriate format for your software: - **Hosts file format**: Use the "Original" links - **Domain-only format**: Use the "No IP" links - **dnsmasq**: Use the "DNSMASQ" links - **AdGuard/AdBlock**: Use the "AdGuard" links &nbsp; ## Available Lists ### Main Lists | List | Original | No IP | DNSMASQ | AdGuard | Description | |------|----------|-------|---------|---------|-------------| | Abuse | [Link](https://blocklistproject.github.io/Lists/abuse.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/abuse-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/abuse-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/abuse-ags.txt) | Deceptive/abusive sites | | Ads | [Link](https://blocklistproject.github.io/Lists/ads.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/ads-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/ads-ags.txt) | Ad servers | | Crypto | [Link](https://blocklistproject.github.io/Lists/crypto.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/crypto-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/crypto-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/crypto-ags.txt) | Cryptojacking/crypto scams | | Drugs | [Link](https://blocklistproject.github.io/Lists/drugs.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/drugs-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/drugs-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/drugs-ags.txt) | Illegal drug sites | | Facebook | [Link](https://blocklistproject.github.io/Lists/facebook.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/facebook-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/facebook-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/facebook-ags.txt) | Facebook/Meta services | | Fraud | [Link](https://blocklistproject.github.io/Lists/fraud.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/fraud-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/fraud-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/fraud-ags.txt) | Fraud sites | | Gambling | [Link](https://blocklistproject.github.io/Lists/gambling.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/gambling-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/gambling-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/gambling-ags.txt) | Gambling sites | | Malware | [Link](https://blocklistproject.github.io/Lists/malware.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/malware-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/malware-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/malware-ags.txt) | Malware hosts | | Phishing | [Link](https://blocklistproject.github.io/Lists/phishing.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/phishing-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/phishing-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/phishing-ags.txt) | Phishing sites | | Piracy | [Link](https://blocklistproject.github.io/Lists/piracy.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/piracy-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/piracy-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/piracy-ags.txt) | Piracy/illegal downloads | | Porn | [Link](https://blocklistproject.github.io/Lists/porn.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/porn-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/porn-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/porn-ags.txt) | Adult content | | Ransomware | [Link](https://blocklistproject.github.io/Lists/ransomware.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/ransomware-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/ransomware-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/ransomware-ags.txt) | Ransomware C2/distribution | | Redirect | [Link](https://blocklistproject.github.io/Lists/redirect.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/redirect-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/redirect-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/redirect-ags.txt) | Malicious redirects | | Scam | [Link](https://blocklistproject.github.io/Lists/scam.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/scam-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/scam-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/scam-ags.txt) | Scam sites | | TikTok | [Link](https://blocklistproject.github.io/Lists/tiktok.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/tiktok-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/tiktok-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/tiktok-ags.txt) | TikTok domains | | Torrent | [Link](https://blocklistproject.github.io/Lists/torrent.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/torrent-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/torrent-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/torrent-ags.txt) | Torrent sites | | Tracking | [Link](https://blocklistproject.github.io/Lists/tracking.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/tracking-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/tracking-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/tracking-ags.txt) | Tracking/analytics | | Twitter | [Link](https://blocklistproject.github.io/Lists/twitter.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/twitter-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/twitter-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/twitter-ags.txt) | Twitter/X domains | ### Beta Lists | List | Original | No IP | DNSMASQ | AdGuard | Description | |------|----------|-------|---------|---------|-------------| | Basic | [Link](https://blocklistproject.github.io/Lists/basic.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/basic-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/basic-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/basic-ags.txt) | Starter protection list | | Smart TV | [Link](https://blocklistproject.github.io/Lists/smart-tv.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/smart-tv-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/smart-tv-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/smart-tv-ags.txt) | Smart TV telemetry | | Vaping | [Link](https://blocklistproject.github.io/Lists/vaping.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/vaping-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/vaping-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/vaping-ags.txt) | Vaping/e-cigarette sites | | WhatsApp | [Link](https://blocklistproject.github.io/Lists/whatsapp.txt) | [Link](https://blocklistproject.github.io/Lists/alt-version/whatsapp-nl.txt) | [Link](https://blocklistproject.github.io/Lists/dnsmasq-version/whatsapp-dnsmasq.txt) | [Link](https://blocklistproject.github.io/Lists/adguard/whatsapp-ags.txt) | WhatsApp domains | &nbsp; ## Formats | Format | Use Case | Example | |--------|----------|---------| | **Original (hosts)** | Pi-hole, hosts file | `0.0.0.0 example.com` | | **No IP (domains)** | Some routers, simple lists | `example.com` | | **DNSMASQ** | dnsmasq DNS server | `server=/example.com/` | | **AdGuard** | AdGuard Home, browser extensions | `\|\|example.com^` | &nbsp; ## Contributing We welcome contributions! Here's how you can help: ### Request a Domain Addition 1. [Open an Add Request](https://github.com/blocklistproject/Lists/issues/new?template=add-request.yml) 2. Fill out the form with the domain and evidence 3. Our bot will check if it's already listed 4. A maintainer will review and add it ### Report a False Positive 1. [Open a Remove Request](https://github.com/blocklistproject/Lists/issues/new?template=remove-request.yml) 2. Explain why the domain should be unblocked 3. A maintainer will review and remove it ### Direct Contributions 1. Fork the repository 2. Edit the appropriate `.txt` file in the root directory 3. Submit a Pull Request 4. Our CI will validate the changes automatically &nbsp; ## For Developers ### Building Locally ```bash # Clone the repository git clone https://github.com/blocklistproject/Lists.git cd Lists # Create virtual environment python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows # Install dependencies pip install -e ".[dev]" # Run tests pytest # Build all lists python build.py # Build specific list python build.py --list ads # Dry run (preview without writing) python build.py --dry-run --verbose ``` ### CLI Commands ```bash python build.py --help # Show all options python build.py list # List available blocklists python build.py stats # Show domain counts python build.py verify # Verify output consistency python build.py --validate # Build with validation ``` ### Project Structure ``` Lists/ ├── *.txt # Source blocklists (hosts format) ├── adguard/ # AdGuard format output ├── alt-version/ # Domain-only format output ├── dnsmasq-version/ # dnsmasq format output ├── config/ │ └── lists.yml # List definitions and settings ├── src/ # Python source code │ ├── config.py # Configuration loader │ ├── normalize.py # Format parsing │ ├── merge.py # Deduplication │ ├── validate.py # Domain validation │ ├── format.py # Output formatters │ └── pipeline.py # Build orchestration ├── tests/ # Test suite └── build.py # CLI entry point ``` &nbsp; ## Sponsors Special thank you to [Cloud 4 SURE](https://www.cloud4sure.net) for their generous donation to help cover infrastructure costs. &nbsp; ## License This project is licensed under the [Unlicense](https://github.com/blocklistproject/Lists/blob/master/LICENSE) — free and open source, no restrictions. &nbsp; <sup>These files are provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, arising from, out of or in connection with the files or the use of the files.</sup> <sub>Any and all trademarks are the property of their respective owners.</sub> ", Assign "at most 3 tags" to the expected json: {"id":"7795","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"