GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dgaard/adblockptimize/README.md at master · slundi/dgaard

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
44 lines (31 loc) · 1.95 KB
/

README.md

Copy path

File metadata and controls

44 lines (31 loc) · 1.95 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Adblockptimize

CLI tool to separate network blocking from browser blocking (CSS, JS, HTML).

Result is sorted and deduplicated.

Usage

adblockptimize <FILES or URLs>
# split in 2 files: network_blocking.txt (domain format by default) and browser_blocking.txt

adblockptimize --no-browser --format=dnsmasq <FILES or URLs>
adblockptimize --no-network <FILES or URLs>
adblockptimize --network-file=custom.txt --browser-file=ublock_origin.txt <FILES or URLs>

Targets

Software Domain Blocking Wildcard Blocking Regex Support Whitelisting
Pi-hole ✅ Yes ✅ Yes ✅ Yes (PCRE) ✅ Native
AdGuard Home ✅ Yes ✅ Yes ✅ Yes ✅ Native
Dnsmasq ✅ Yes ✅ Yes (address=/.../) ❌ No* ⚠️ Limited
Unbound ✅ Yes ✅ Yes ❌ No* ⚠️ Limited
  • Pi-hole & AdGuard Home: These have a dedicated "allowlist" database that takes precedence over blocklists automatically.
  • Dnsmasq: address=/example.com/0.0.0.0, it automatically blocks sub.example.com and deep.sub.example.com.
  • Unbound: It uses local-zone and local-data directives. Setting a zone to always_null or always_nxdomain acts as a wildcard block. For whitelisting, we must manage the exclusion by ensuring the whitelist entry is more specific than the block entry.

Quick start

cargo install adblockptimize

# split a list into network and browser files
adblockptimize https://example.com/list.txt local-list.txt

# dnsmasq format, network rules only
adblockptimize --no-browser --format=dnsmasq https://example.com/list.txt

# custom output file names
adblockptimize --network-file=dns.txt --browser-file=ublock.txt https://example.com/list.txt
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.