The Best Ad Blocking Method in a Package

Now that I’ve configured DNSmasq in my newly installed Linux, it’s natural to revisit The Best Ad Blocking Method again. The reason it took me so long to do so is because I’m doing it in an entirely new approach this time.

This time I’m armed with a lethal weapon, and the damage is fatal — the time it takes for someone to setup the best ad blocking method has been hatched down from the previously over an hour to just a few minutes this time — because I’ve now packed the whole solution into a Debian package. I’ve requested for sponsor for it already, so hopefully it will come down from the pipe soon.

Here is the preview of how to use the package. It’s called dbab, which stands for Dnsmasq-Based Ad-Blocking.

Continue reading

The Best Ad Blocking Method

Most people uses the browser’s adblock-plus extension to block ads. Fewer of them think over how it works internally. Here is an overview of Adblock Plus from a thousand mile high [1] — whenever the browser needs to load something, the extension kicks in and do a thorough pattern matching of all known ad urls using regular expressions, then hectically replace all found ad urls with something else. This is done on every page, every load, and every component of the web page, using JavaScript. Thus it is by nature slow and CPU intensive, at least inefficient. There are other alternatives to this, e.g., privoxy, but they use the same concept.

Is there any smarter ways for ad blocking? Yes, by using DNSmasq + Pixelserv:

Continue reading