# dest ip url 127.0.0.1 some.ad.server.com
This entry will redirect all traffic meant for
some.ad.server.com to the server
127.0.0.1, which is your localhost. Entries from different resources are merged. Thus, all requests to typical ad-servers will fail → annoying advertisements won’t be delivered. It’s quite powerful and gives impressive results.
However, I didn’t want to talk about ad-stuff. The cool thing is
AdAway allows for extensions with own hosts files!
You can simply add another link to a file containing further host entries. I created my own AdAway file, uploaded it to https://stuff.lesscomplex.org/adaway.txt and added it to AdAway, as you can see in the figure. The current version contains a few entries for:
- facebook/yahoo/etc: I’m not using facebook or stuff, all these request shouldn’t leave my phone
- captive portal detection: To detect captive portals the phone downloads a few bytes from a google server and checks if it is able to access the real internet or just a captive portal
- swift key: I’m using swift key, but do not want it to communicate to the internet. Thus, I’m blocking a few URLs that swiftkey wants to talk to. As I’m already using a firewall this just adds another layer of privacy.
Feel free to use my “extension”, but I expect it to change over time. :)
This method only works if applications load contents from URLs. As soon as the IPs are hard-coded the hosts file