Coder Social home page Coder Social logo

julian-klode / dns66 Goto Github PK

View Code? Open in Web Editor NEW
2.1K 79.0 197.0 821 KB

DNS-based Host Blocker (and lightweight ad blocker) for Android

Home Page: https://jak-linux.org/projects/dns66/

License: GNU General Public License v3.0

Java 100.00%
android blocker adblock ad-blocker java gradle gplv3 fdroid

dns66's Introduction

DNS-Based Host Blocking for Android

This is a DNS-based host blocker for Android. In the default configuration, several widely-respected host files are used to block ads, malware, and other weird stuff.

codecov Build Status

Installing

Get it on F-Droid

You can either install it via F-Droid, using the official F-Droid repository, or you can use my personal repository at https://jak-linux.org/fdroid/repo which gets updates ASAP.

You can also download apk files in GitHub's download section. Currently, these are the same files as in my personal F-Droid repository, but that might change in the future.

XDA: Discussions and preview builds

There is a thread at XDA, where DNS66 can be discussed and I occasionaly post preview builts of the git repository:

https://forum.xda-developers.com/android/apps-games/app-dns66-source-host-ad-blocker-root-t3487497

Using it

On the first start, you must manually update the hosts files (using the refresh button) before the service can work correctly (issue #1); and you must also update the hosts files yourself regularly for now (issue #2).

Items in the hosts and DNS servers lists can be moved around and removed) of the list using standard RecyclerView interactions (long press makes the entry movable, swipe to either side removes it). For hosts, a later entry overrides a previous entry; for DNS servers, the first server is preferred.

Currently, there are some minor usability issues:

  • If you change a setting, you must manually restart the vpn service (issue #3)
  • IPv6 servers are not supported (issue #4)

There's also no validation of input, so DNS servers that are not valid IPv4 addresses are not rejected, neither are URLs for DNS server entries (we intend to support URLs in the future, so you can point the app to a remote list of servers).

How it works

The app establishes a VPN service, with routes for all DNS servers diverted to it. The VPN service then intercepts the packages for the servers and forwards any DNS queries that are not blacklisted.

Custom upstream DNS can be configured. If the feature is turned off, the current connection's DNS servers are used. The app ships are pre-defined list of well known (mostly German) non-logging servers courtesy of the Chaos Computer Club.

Privacy Guarantee

Privacy is the most important aspect of DNS66. Currently, DNS66 is strictly data reducing: Running it can only reduce the amount of data leaving your device, not increase it (except for fetching hosts files, obviously), as for each request, we will either allow it to leave your device or not - we will not send other requests or add other information to the request.

While not yet implemented, future versions of DNS66 might have additional features that might share more data than your phone normally would. Among these features are:

  1. Automatic updates. Your phone might periodically contact servers to query for new upstream versions and new host lists. DNS66 will only include as much data as necessary to complete the request.

  2. Debugging. We hope to have a better way to debug program failures than manually running logcat. Such a feature by definition requires sharing debug logs. Debug logs (including logcat) may include personal information, and you should review them before sharing them publicly.

If such a feature is added, you will be presented with the choice to enable it (it will be disabled by default). No such feature will be turned on without your explicit consent (for example, clicking yes in a dialog asking whether you want to have automatic updates).

Contributing

See CONTRIBUTING.md

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Parts of the program are licensed under only version 3 of the license, and some parts might be licensed under the terms of other compatible licenses. See the file copyright for further (machine-readable) information.

Binaries also bundle external libraries. To the best of our knowledge those are licensed under the Apache license, version 2.0, except for pcap4j, which is licensed under the MIT license, and dnsjava, which uses a 3 clause BSD license. See the file copyright.libraries for further (machine-readable) information.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Authors

Julian Andres Klode [email protected]

Parts are derived from https://github.com/dbrodie/AdBuster by Daniel Brodie.

dns66's People

Contributors

antonv6 avatar dandelionsprout avatar expectro avatar farmerbb avatar jjaara avatar julian-klode avatar kevinsj avatar lgtm-migrator avatar madis0 avatar mueller-ma avatar mypolat avatar naofum avatar nbuzovsky avatar ox0000 avatar roptat avatar royschutte avatar thromer avatar tjl73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dns66's Issues

License confusion

Is the application GPL or Apache licensed?
Is there a formerly version that still is licensed unde an apache or mit license?

We could possibly commit stuff than... thats why i ask

Improve accessibility for item status

Currently we just show a circle that is either red, grey, or green. This is bad in two ways:

Red-Green Color blindness

Red-Green color blindness is fairly common, so I think this makes it unnecessarily hard for affected people to see if something is allowed or denied.

Suggested Improvement: Make it more like a switch. So, instead of only having coloured circles, have them positioned in a pill-like oval form. Left=red=denied, Center=grey=ignored, Right=green=allowed.

Vision loss

We don't provide any textual information what that button is, rendering it useless to people with vision loss.

Suggested improvement: Set the standard Android attributes for descriptive texts.

Allow entries with multiple hosts

Sometimes you just want to block a set of hosts, but not have multiple entries. It would be nice to have a multi-line editor for that.

It does not block any ads

The DNS option works fine, but even if I enable all the lists in the settings, ads are still visible.

screenshot_20161023-162436

Integration with AdAway?

Hi, great work here. I help maintain AdAway
which was just updated to support android 7.x and latest root methods (systemless).
It does an incredible job and by the nature of its functionality virtually no battery drain etc. In fact blocking ads will help the device load pages/apps faster, etc.
It's one downside is it requires root. Root is getting more difficult to obtain on more devices. Though dns66 can surely stand on its own, I'm wondering if you'd consider any integration with AdAway? This way the large user base of AdAway, if they move to a device without root, would fall back to this functionality. Basically if AdAway can get root rights it does what it does today, if it can't it'll use this method to block hosts. Same hosts files can be used etc. I feel like it'd be a great integration so users just have a one stop app that will get rid of ads or just unwanted hosts. Could even re-brand AdAway66. Let me know your thoughts, open offer.

Provide new (and round) icons

We currently do not really have a source for the icon that we can modify. It would be great to have an icon with an SVG source that we can actually reasonably modify.

Android 7.1 also introduces round icons, we should have one too.

Slow Connecting & Reconnecting

When I switch on the internet connection DNS66 takes about 25 sec to start is VPN (time checked using timer) . Reconnecting also takes that much time. In between that time gap ads are shown. Try to make it start at the time of switching ON the net connecting on the phone.

Vibrating and pop-up ads

Is there any way to block pop up ads and vibrating ads? I mean when i try to download files from some sites my phone starts vibrating and a pop up will come like saying your phone is in danger or phn got virus scan now/install antivirus or maybe install this app to remove virus from your phone, click here to download games and movies etc like pop up and vibrations.

●DNS66 version : 0.1.3
●Operating system : Android Marshmallow 6.0.1

●Below i listed some of that kind of sites●

https://dropapk.com/munh0ciu8h89

http://ul.to/9mfxlw6x

https://dailyuploads.net/ifsksrv94c1r

https://filescdn.com/fwy5vrgsysq7

https://uplod.ws/ny5w868j53k7

https://userscloud.com/7ww5ltgaf6kt

http://hugefiles.net/4o2sy9b5gxnx

Try to download files from that pages you will get vibrating and pop-up ads

Dns66 not working with proxy on

When I try to use privoxy and dns66 at the same time, to go to a webpage, the VPN goes down and only uses the proxy.

Is it possible to use the vpn and a proxy at the SAME time?

Allow DNS servers on non-standard ports

DNS66 should allow specifying DNS servers with non-standard ports. This would allow it to interact with a DNSCrypt proxy running on the device (which helps #11) without root being required to run the proxy.

additional blocklists if you want more

Privacy

This might be a dumb question: do you "see" the whole traffic my phone passes through the VPN? I know you can't see https traffic.

Documenting colors meaning

Would be nice to know what does green/grey/red dots colors mean! Green seems to mean "enabled" and red "disabled" (and who can be sure of this?), but grey is not obvious.

Add IP Blocking

We should allow not blocking only host names but also IP addresses. That's easy to do: Route the IP into the VPN, and then respond with an ICMP "Destination Unreachable" packet for each packet to the IP address.

Internet speed is showing down when using all DNS filters

I'm on the latest version, the internet connectivity speed is too slow when I enable all the DNS filters. Apps are taking long time to load pages. Browsing died is decreased.
When I enable ISC (US) DNS and disable all other DNS everything is back to normal.

Ask user to download host files on initial run

We should identify when a user initially launches the app and tell them that the hosts files need to be refreshed before they can be used.

For the post initial setup scenario, we should automatically apply changes in the service, see #3, and we should regularly update the lists as discussed in #2.

Reconnecting error with firefox (DNS66 v0.1.3)

DNS66 (v0.1.3) always have 'recconnecting error' when I use firefox with wifi connection. It alway occur when I load a webpage.

(However, DNS66 run normally when I use 4g connection or other web browsers.)

My device is Note5 on Marshmallow.

Unable to turn change from "stopped" on 7.1.1 (Pixel)

Hi,

I was using DNS66 on my previous phone just fine. On Google Pixel, I tried DNS66 0.1.2 and the long press on the power button does nothing. I feel a little vibration with the longpress but it still says "stopped." Same thing with 0.1.2 and 0.1.3 on 7.1.1. I've tried refreshing, activating/reactivating DNS servers and block lists, restoring to default, reinstalling the app, but nothing. Also tried turning off battery optimization in android settings but no luck. If I turn on "start on boot" and restart phone and go into the app it just says "Reconnecting..." without changing; long press again does nothing. Force-close app and it goes back to the normal "stopped" behavior described above.

Visualise current state of on/off button

Thank you for making this app. A VPN connection is the only way I can use alternate DNS servers for whatever odd reason that might be.

However would it be possible to change the power icon to make it easier to determine if the service is running? For example, change the color to green if it is running and red for off?

AdBlocking stops silently

Hi there, thanks for this great piece of software.
I might experience a bug, though.
Every once in a while, ads reappear on websites after a few hours.
A quick manual disconnect followed by a reconnect in your app solves the problem and ads immediately vanish when refreshing the page.

DownloadManager does not work in Nougat with VPN running

So I just spent several hours trying to debug an issue where Play Store wasn't downloading any app, including an hour long phone call with Google's support rep. Turns out, it was DNS66! Disabling it instantly fixed the issue. This is unacceptable. Any ideas why this is happening?

Automatically apply configuration changes in service

Currently the service needs to be restarted manually if the configuration was changed or the host files were refreshed. We should make that more automatic.

DNS server changes

As we re-route the DNS servers currently, we need to restart the service. It might make sense to use to use "virtual" IP addresses again, and then map them on demand instead of overriding routes for the existing servers. This also has the effect of enabling non-DNS packets for those servers again. One disadvantage is that Android might choose to use a non-VPN server under very high latency situations.

Host file changes

Instead of reading all host files into one set, we can read them into multiple sets in threads, and then combine them, and use an atomic reference in the VPN thread. We could also have a queue of changes to be done against the current set, and apply them after poll() returns, but merging in the VPN thread might be too slow.

Show notification

It's just me or show notification flag does not work?
S7 edge 6.0.1
screenshot_20161215-145455

Constant refresh hosts warning on 7.1.1

Nexus 5x, 7.1.1 DP2, tho it happened with DP1. DNS66 will always report the host files need to be downloaded when turning on. Refresh and I see the downloads happening in notifications. Press on, same message.
Most ads are being blocked though fortunately.

Black (AMOLED) theme?

Any chance that one can be implemented?

Also, I do have a question about the name. Why is it called dns66?

Reconnecting error in 0.1.2

Hi,
i am having a bug that was previously reported and closed where starting dns66 gives a recconecting error. I've uninstalled and reinstalled the app but the problem persists.

HTTPS Everywhere Feature

This project seems like the perfect place to implement a HTTPS Everywhere type feature for Android. Thoughts?

Self-update support for github apks

One of the things I hear from time to time is a wish for the apks on github to include self-updating support. Currently, I am completely not setup for that: The apks here, just like the ones on my personal f-droid repo at http://jak-linux.org/fdroid/repo are built by fdroid (I just manually upload the apks here).

That said, it's something to keep in mind.

App not connecting when DNS66 is enabled

My net gear genie app is not connecting when Dns66 is enabled. When I disable dns66 the app will connect. I tried default settings of dns66 but the result was same.

Below is the screenshot of error message I got when I try to connect .

Dns66 version : Latest build

Screenshot : http://imgur.com/p4W6VTV

Firewall for Apps

Hi,

It would be nice if you can add features like Noroot firewall in it. Actually i wanted to block apps from connecting network.

[FEATURE REQUEST] Must needed features

Ads are blocking successfully, Now it needs some options like,
● different types of filters.
● whitelist option, for whitelisting (particular apps and sites/domains.)
● ad block count,.
● firewall and malware protection.
● One tap button to activate and deactivate.
● advance protection option to block youtube and similar site ads etc.
● And simple UI like adclear.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.