[READ-ONLY] Mirror of https://github.com/andrioid/ublproxy. andrioid.github.io/ublproxy
adblock adblock-plus-list adblocker privacy-tools proxy-server self-hosted
Something went wrong. Try again.
Index rules by domain for fast lookup in ShouldBlockRequest master
Partition domain-anchored rules (||domain...) into map[string][]*Rule keyed by domain suffix. At match time, walk up the hostname hierarchy and only check rules for matching domains instead of scanning all rules. Same approach for exceptions. Pre-lowercase URL and context once per request to eliminate redundant strings.ToLower calls in each rule match.
Author Andri Óskarsson Date (Feb 25, 2026, 7:47 PM UTC) Commit 70a366c9 70a366c933e005e91c0078940caff7f004903cdf Parent 8b6d951b 8b6d951b89f6550f48f75cd1fe33a9f908b2c6bd