MCPcopy Index your code
hub / github.com/5-whys/adh-rules

github.com/5-whys/adh-rules @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
33 symbols 71 edges 3 files 0 documented · 0% updated today202607071419 · 2026-07-07★ 32
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

5whys-Ad-list-processing Last Run License: MIT 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

Download Links

Tier AdGuard Home Hosts dnsmasq Unbound uBlock Origin Domains
Super (599k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Full (576k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Medium (267k) raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn raw | cdn
Min (158k) 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

Core symbols most depended-on inside this repo

remove
called by 3
main.go
ExtractDomains
called by 2
dns_filter.go
IsPurednsInstalled
called by 2
dns_filter.go
IsMassdnsInstalled
called by 2
dns_filter.go
LoadFormatsConfig
called by 1
format_converter.go
ToHosts
called by 1
format_converter.go
ToDnsmasq
called by 1
format_converter.go
ToUnbound
called by 1
format_converter.go

Shape

Function 30
Struct 3

Languages

Go100%

Modules by API surface

dns_filter.go18 symbols
format_converter.go10 symbols
main.go5 symbols

For agents

$ claude mcp add adh-rules \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact