adh-rules

command module
v0.0.0-...-8d586ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 12 Imported by: 0

README

5whys-Ad-list-processing Last Run Go Version Updates Rules GitHub Stars

5whys Adblock Home Rules

Adblock rules for China regions (Mainland China, Hong Kong, Taiwan, Macau). Updated 3 times daily.

中國地區廣告封鎖規則(中國大陸、香港、台灣、澳門)。每日更新 3 次。


Features

Feature Description
Multi-source Consolidates 30+ filter lists for China regions
Multi-format AdGuard Home, hosts, dnsmasq, Unbound, uBlock Origin, domain-only
4 Tiers Super, Full, Medium, Min
DNS Filtering Removes dead domains using puredns + massdns
Transparency Dead domains list published for review

Tier AdGuard Home Hosts dnsmasq Unbound uBlock Origin Domains
Super (650k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Full (614k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Medium (261k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Min (190k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Additional Resources
List URL
Dead Domains dead_domains.txt

Format Description

Format Example Use Case
AdGuard Home ||ads.example.com^ AdGuard Home, AdGuard DNS
Hosts 0.0.0.0 ads.example.com Pi-hole, /etc/hosts
dnsmasq address=/ads.example.com/# OpenWrt, dnsmasq
Unbound local-zone: "ads.example.com" NXDOMAIN Unbound DNS resolver
uBlock Origin ||ads.example.com^ Browser extensions
Domain-only ads.example.com Custom implementations

DNS NXDOMAIN Filtering

Uses puredns with massdns to verify domain existence. Dead domains (NXDOMAIN responses) are removed to reduce file size and improve performance.

  • Dead domains logged in rules/dead_domains.txt
  • DNS cache valid for 24 hours
  • Stale cache entries removed after 7 days

Usage

Pi-hole

https://raw.githubusercontent.com/5-whys/adh-rules/main/rules/output_full_hosts.txt

dnsmasq (OpenWrt)

https://raw.githubusercontent.com/5-whys/adh-rules/main/rules/output_full_dnsmasq.txt

Unbound

https://raw.githubusercontent.com/5-whys/adh-rules/main/rules/output_full_unbound.txt

AdGuard Home

https://raw.githubusercontent.com/5-whys/adh-rules/main/rules/output_full.txt

Tier Guide

Tier Description Recommended For
Min Essential ad blocking for China Minimal blocking, basic protection
Medium Balanced protection for China Most users in China regions
Full Comprehensive blocking worldwide Users requiring extensive blocking
Super Maximum blocking Advanced users only (may cause false positives)

Acknowledgments


License

MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL