The Android ad blocker and I.

Hi! My name is Sava Georgiev and I'm a developer and security researcher living in Munich, Germany.

By 2015 - ads, viruses, malware, key loggers, tracking cookies, spam, phishing and porn make more than 80% of the content on the Internet. Web pages are loading slower than they used to 5 years ago and it is really starting to feel like the good content on the web is getting buried deeper and deeper with one purpose only - making money off of us by selling our personal data, hacking our credit cards and pestering us with ads everywhere to the point where the only thing you see now is advertisements. I started the development of "Block This" in June 2015 as I was hoping to reduce all the junk we have to deal with on the Internet - at least on our mobile phones as a start.

In order achieve this quite ambitious goal I had to get out of the box of traditional ad blockers for Android and go one step further. So I came to the idea to incorporate an old and forgotten approach for blocking internet requests - blocking by DNS.

In July 2015 I set up our first highly scalable DNS (Domain Name Server). My initial tests were quite good - the blacklist worked perfectly, battery consumption was very low compared to standard android ad blockers using hosts files, but what surprised me the most was the huge reduction in data traffic and battery consumption. Browsing speed for many websites improved by more than 100%.

What is DNS?

Under the hood, in order to find where stuff is, the Internet works the so called IP addresses. For example, the ip address for this website is: 172.245.209.248. As this is hard for humans to remember, and it would be a pain to enter those numbers in our browser as URL, we refer to websites by their Domain names (e.g. "block-this.com"). This creates the need of a central registry where all domain names and addresses are kept. Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses. For every request, your browser uses a DNS to find the correct IP address and to be able to download and render the website onto your screen.

Having that in mind, take a look at the workflow introduced by Block This DNS below.

You begin navigating to a website with your Android device.

You enter the name of the website (e.g. https://block-this.com) into your browser.

The browser makes a DNS request for the IP address of the machine that serves up this website.

The DNS request is received by an Block This DNS server.

Block This DNS looks up the matching filtering and security settings.

If the website IS NOT in the blacklist, Block This DNS returns the IP address (e.g. 172.245.209.248).

in the blacklist, Block This DNS returns the IP address (e.g. 172.245.209.248). If the website IS in the blacklist, Block This DNS the local loop back address (127.0.0.1).

in the blacklist, Block This DNS the local loop back address (127.0.0.1). Your browser receives the IP address and attempts to render the page on your screen.

If the address it received is 127.0.0.1, the browser stops rendering immediately and shows blank screen, otherwise continues to render normally.

While rendering, the browser makes additional DNS requests to Block This DNS in order to load the ads, images, videos and other resources on that web page.

The additional DNS requests are received by an Block This DNS server and depending if they are in the blacklist or not, they start rendering too.

If all of the requests to ads and other malware were in the blacklist of Block This DNS servers, you get a nice looking web and secure web page with 0 ads and no viruses. In most cases this also prevents tracking and safeguards your personal information.

By not loading any of the ads, malware and tracking, you the rendering of the web page finishes much faster, saving you data traffic and battery.

But why the VPN then?

The only problem with this approach is, that for Android there are strict rules about who and how DNS can be changed. Normally changing the DNS directly needs ROOT access (i.e. your android device to be rooted). In order to work around this issue, "Block This" for Android creates, what I call a local VPN (Virtual Private Network) and all of your apps/browser traffic is routed through this VPN. This VPN is carefully configured to only modify the DNS settings of your network, while preserving your internet speed and not sending out any traffic to external VPN servers.

Block This is also Open source, which means that anyone can look at, read and suggest improvements to the code base. If you are a developer you can contribute by creating a pull request to our GitHub repository here: https://github.com/ggsava/block-this

For any further questions, suggestions or assistance, please join our Forums. Hope this helps.