Hacker News new | ask | show | jobs
by jay_kyburz 740 days ago
Question: Is it possible to run ad blocking at the OS level rather than in the browser? Requests to ad servers just never leave your PC? traffic from ad servers just never arrives at the browser?
4 comments

A common approach is to mess around with name resolution. Many operating systems have a hosts file that can be modified. You can do DNS on your own computer. Piholes are a variation on this where people usually use a separate machine to handle DNS requests for their entire network. If you cannot change the DNS for your computer/device, some people use a VPN. I believe this is how things are currently handled on Android.

This approach is less flexible than the filtering you can get from a web browser. On the other hand, it can be used to filter DNS requests from all software. With something like a Pihole, you can configure the Pihole and (maybe) your router, and it will work for all devices on your network.

On Android there is AdGuard which runs a VPN locally to block ads. It can also parse SSL traffic if one installs an SSL certificate but I don't like the idea very much. In the end I just use it as a light adblock for unencrypted traffic when I don't use Firefox.
You can use the hosts file to block ads.

https://winhelp2002.mvps.org/hosts.htm

Look up technitium dns