yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] tdhite:
I'm not convinced you need quite so many DNS tools, but for sure you are not obtaining best performance. Just setting the android properties "e.g., setprop net.dns1 ..." does nothing for tethered operations, nor any of the entirety of the Linux system. However, DnsQache does properly setup IPTABLES rules so that all outbound (doesn't matter *what* interface) requests headed for port 53 are rerouted to it's underlying dnsmasq server. The only allowed outbound requests on port 53 must specifically originate from 127.0.0.1, otherwise they'll get redirected to DnsQache.

In any event, if you really want the cascading DNS settings, you'll need to significantly increase your IPTABLES rules. I'd have to see the output of the following to comment furtherr:

iptables -L -v -n -t filter

iptables -L -v -n -t nat

From there, we can at least see how DNS traffic is rerouting.

As for polipo, DnsQache specifically turns disk caching off. I can add an option if it's really needed -- but normally writing flash heavily, as can happen with caching, is frowned on. There are only so many writes that can occur on a flash system and, though many, any decrease in that potential unless truly understood and desired would not be something I'd just 'throw' on people using DnsQache.

Let me know if disk caching is truly interesting after you take a look at flash life in general. For polipo, DnsQache sets up appx. 24MB of in-memory cache, chunked by 4096 bytes per 'object' stored. I could allow increasing the settings to set that if it's interesting and would add value.

Let me know if there's any help you need.
[Android Apps and Games] tdhite:
DnsQache indeed sets IPTABLES (firewall) rules for the purpose of redirecting DNS traffic to itself and for allowing itself (and only itself) to make queries on the DNS servers. So it seems afwall+ is creating conflicting rules.

If you could enable both, and send me the output of the commands I give below, I can determine why you're having troubles (run the commands in a terminal and send me the output -- or if you are familiar with adb, you can use 'adb shell' to run them as well:

iptables -L -v -n -t filter

iptables -L -v -n -t nat
[Android Apps and Games] tdhite:
The Berkeley Internet Name Daemon (otherwise known as BIND) is unquestionably a world class server for DNS. However, it is serious overkill for a phone or other 'personal' use (like linux laptops or similar). The vast majority of personal use systems go with dnsmasq, and some with pdnsd, because they are targeted as that as opposed to enterprise level DNS management.

I'd implement BIND if I could find a way it would add value, but I'm not seeing that. Have an idea that led you to look into BIND?
[Android Apps and Games] killoid:
actually nothing special.i was just researching a bit about it.but have no idea to implement it somehow.
[Android Apps and Games] tdhite:
For now, you can use custom DNS settings, but I really need to add an editor that allows you to add to the list in the drop downs. I'll work on that for another release.

As for adding root zone caching -- not sure what you're thinking. We aren't setting up zones on personal (phone / laptop) machines as they really don't do DNS inbound service handling (other than for redirection / caching). Is there some feature you were thinking here? Happy to consider, but I'm not quite sure where you're headed in regards to "dns server software advanced."
[Android Apps and Games] avd:
In in the preliminary stages of trouble shooting, but is it possible that a phone running dnsqache services connected to the internet over Wi-Fi would not be able to send MMS message? Looks like when the phone turns on data something routes wrong.
[Android Apps and Games] lemon567:
Im sorry if i have wasted your time i upgraded from 0.83 to 0.84 and it seems to work atm without fail and i dont know why. I ran the commands you posted and uploaded them just in case. Again sorry for wasting your time and keep up the great work love this app.
[Android Apps and Games] antonyitunamaku:
Yeah, i'm only need how make polipo and pdnsd work with android.

It is much more better i think. Need lightweight binary for android (because it is phone not heavy system i think)

I attachment my iptables rule and screenshot android firewall rules.

Btw other day i wanna to make ad-blocking with Polipo. Use easy list ad-blocking for alternative host. Until now i can't solved to how to make complete shell script to work. I'm not linux expert LOL :)

The example shell script is

httxs://svn.torproject.org/svn/incognito/trunk/adblockplusfilter2polipo.sh

I can execute manual adblockplusfilter2polipo.sh in terminal but can't get working complete list to make polipo read that file. Only have result but i can't dump log to other log file.

Sorry for my bad English and thank you for help me
[Android Apps and Games] tdhite:
It's hard to imagine MMS not working if other apps work. What you would see if somehow the DnsQache service failed to start properly is no access at all. Not that the internet would be broken, rather no sites would get resolved to an IP address to which to connect.

Do other applications work properly when DnsQache is active.

For the record, I run DnsQache almost 100% of the time and use MMS without problems.

Now one thing could throw a wrench in things. If you're cell provider has special DNS records that only it would resolve and it does not propagate those host names, then using Google's DNS servers, for instance, would not resolve those names since only you cell provider's DNS servers would know about them.
[Android Apps and Games] tdhite:
No problem -- I'm glad it worked out -- looking at the firewall rules, I'd have needed another run (the nat rules aren't there). No worries -- let it run and enjoy!
[Android Apps and Games] tdhite:
Regarding the iptables rules you sent -- the DnsQache rules do not appear at all, so either your firewall blew them away (that's pretty invasive) or you didn't enable the DnsQache service. If the service *is* started, you're not using DnsQache's DNS caching at all -- the iptables rules you have will never let a packet reach DnsQache's dnsmasq server.

I can't fix that for you -- your firewall solution needs to read and understand what already exists, and incorporate that. Alas, too many programmers take the lazy way out and just clear everything out so they can start with their own rules and not have to worry about anything else.

As for polipo, if all you wanted to do was mess with that and not use DnsQache, just 'steal' the polipo binary from /data/data/com.tdhite.dnsqache/bin/polipo. I build that as part of standard DnsQache builds, and it is open source so you are free to use it under the terms of polipo's license. The source code and build (as a JNI build under Android SDK/NDK setup) is also on GitHub with the rest of DnsQache.

Anyway -- I'm not sure how to help you -- the scripts you are running are nice, but they assume there's nothing else out that (e.b., DnsQache or other similar apps) that also need to modify the system pursuant to the application's needs, but here's some ideas:

1) Remove your firewall and scripts totally for a few minutes, and reboot if necessary (so the system is clean);

2) Run and enable DnsQache;

3) run the iptables -L -v -n -t nat command and see the OUTPUT rule that jumps (-j in iptables) to the newly created dnsqache chain;

4) given those rules, adjust your firewall to support that same scheme -- I don't know your firewall, so can't really help there;

5) look in /data/data/com.tdhite.dnsqache/conf/polipo.conf for some starter configuration for a purely custom polipo run for yourself.

Frankly -- I'm not sure tweaking polipo further than DnsQache sets it up will make dramatic differences for you. Remember this, though -- polipo *never* deletes files from the cache, so your disk usage will grow without bound if you're not careful and add regular disk cleanings of the cache.
[Android Apps and Games] antonyitunamaku:
Honestly i don't use DnsQache yet. But i'll try to use it and try the tips too.

It will be more nice if DnsQache have capability to automatically running when data internet on/off (that will make my life much easier LOL)

May be i'm too lazy to build/compiler binary for android. But i want to feel respected for all of the hard work that they do :D

Thank you again and happy new year for you :)

Yeah, that almost true. Some cell provider in here too...

Use Local ISP DNS Provider faster for speed internet/ping/resolve website but alot website are blocking :crying:
[Android Apps and Games] lemon567:
Im sorry to bother you agian, but dnsqache and afwall+ are somehow conflicting again and i cant figure out why. I love this app and would really like to use it in combination with afwall+. I would really appreciate if you could take a look at the attachments. Thanks in advance.
[Android Apps and Games] tdhite:
Your firewall is rejecting port 5353, which is what DnsQache uses to redirect all requests to port 53 (DNS) to itself. You need to (minimally) allow all traffic from any interface to 127.0.0.1:5353. Also, the only interface that needs to get allowed output from port 53 is 127.0.0.1 (localhost). DnsQache sets that rule up, but I notice your firewall is also trying to mess with port 53. We'll have to see if they conflict once you let port 5353 flow.
[Android Apps and Games] lemon567:
Looks like i have to create a customscript rule in afwall+ to make it work or allow traffic for all root apps. Well i figure something out, anyway thank you for your help i really appreciate it and keep up the good work.
[Android Apps and Games] famewolf:
2 questions.....will this app work with USB tether in addition to wifi tether? The second question is have you considered at all incorporating a client to use opendns's dns encryption service? The client (mine runs on my tomato router) sets up a local dns server on port 40 which sets an encrypted connection to opendns to get dns lookups....seems like you could just point polipo to the client (if a version exists for android) in theory.

Nice concept!
[Android Apps and Games] tdhite:
The app will work with any form of networking. It completely takes over DNS activity and points all interfaces' outbound requests for DNS to itself.

As for using secure connections, I assume you're talking about OpenDNS's DNSCrypt service. Thought many times about putting that in to DnsQache, but given it's only OpenDNS, I've had some (I think reasonable) trepidation. When I want secure communications, I setup an OpenVPN connection to my own Tomato router -- which keeps not just DNS, but everything secure. That way, DNScrypt remains a game at the tomato router and my phone need not concern itself.

If there's a better way -- let me know, I'll see if we can't fit it in. Security enhancements are topmost concerns.
[Android Apps and Games] famewolf:
Using a vpn is nice when it's available but that's not always the case...for example I'm cell phone only and the cell phone provides internet to my house. (I have an old grandfathered truly unlimited internet plan I'm holding onto with both hands and both feet). I already have dns-crypt being used by my router which handles all traffic to the pc the phone is tethered to but if dns-crypt was on the front end it would be one less thing to worry about. As for the concerns about only opendns providing that service....those are certainly valid concerns but I'd think if you made enabling the dns-crypt optional then the user could determine if they want to assume those risks or not. With all the things I'm seeing google start to do I'm not sure giving THEM my dns is actually any safer....just more metadata they can tie to my other google services.
[Android Apps and Games] smeejaytee:
Have you had any thoughts on making an entropy app dnsqache is awesome keep up the good work also does dnqache use dnsproxy2 as crossbreeder seems to talk about it allot I just wondered thanks for your work
[Android Apps and Games] tdhite:
Hi, to be honest, the Holidays took me away for a bit and recently work has been busy. I'm back to building some updates soon.

I've not spend much time on the entropy yet, will get there.

As for a dnsproxy (2 or otherwise), that's already taking place. DnsQache presents DNS on port 5353 and therefore any app can use that as a proxy. Ultimately it turns around and calls out to your selected DNS provider on port 53. Not sure what value dnsproxy2 would provide.
[Android Apps and Games] tdhite:
Time for Feature Requests

All,

I'm about to update the apk with some basic fixes. With that said -- it's time to chime up for whatever features you think are interesting. Some I'm thinking about (other than the obvious -- which is add a real icon and switch to holo style for the interface):

1) Adding a full featured configuration set for polipo (sorely missing, imho);

2) Taking out tinyproxy -- waste of space?

But honestly -- I use this thing all the time and it just works, and as the author -- have have a slew of ideas that are technically cool, but as users, you have a better idea of what we need.

Chime in as you see fit. I'll add what is doable.
[Android Apps and Games] killoid:
[MENTION=4988866]tdhite[/MENTION] i think you shouldn't remove any feature as it is all well on my side. other than your to-do list is good! but if possible,make the app automaically trigger itself when we connect to internet.it will be of very useful as it is so annoying to repeatedly go to this app & turn on.

EDIT: how about putting an option to bypass ISP?
[Android Apps and Games] lemon567:
How about a widget to quickly turn dns on and off if needed, and an option to disable the DQ notification symbol.
[Android Apps and Games] esgie:
Hello,

Tried to use your app on Samsung Galaxy Note 10.1, Jelly Bean 4.1.2 stock-based Samsung rom. Not interested in thethering, just caching the DNSes... I set up the DNS (tried both 200 / 1000 values of cache size, as well as different ones, like 10 000 etc), I do not touch any options related to thethering (no proxy selected); then I start the service. Everything seems to work fine, getprop net.dns1 returns 127.0.0.1.

BUT after some time (something like 20 mins...), I can no longer connect to Google Play store using Play Store app. It says "No connection" and button "Try again" (and clicking it does not help... please note that I am not sure if the above messages sound exactly the same, as I am running non-english version of GPlay)

Regular browsing using Chrome as well as the connection in other apps that I use, still seems to work fine. But not in the Play Store.

This is strange to me.

More, after reboot, the problem still exist. But - the Play store becomes available again immediately after disabling DQ service...

The issue exists on every type of connection (3G/HSDPA/Wi-Fi).

Btw I am using AdAway app to create hosts file ad filters, however disabling it (ie. reverting to stock, empty hosts file) seems to have no influence on the above issue.

Would be very glad if u know the solution.

Thank you.
[Android Apps and Games] tdhite:
The key to me is this: "Regular browsing using Chrome as well as the connection in other apps that I use, still seems to work fine. But not in the Play Store."

Given everything appears to work *but* the Play app, well, that is very strange. Don't worry about AdAway -- has nothing to do with DnsQache and won't affect it other than a quicker hosts lookup for addresses in AdAway's hosts file.

As for the problem -- without more, I can't suggest a remedy. Here's what I need to see what's up:

1) Start DnsQache like normal;

2) Get a log of all processes on the system (e.g., open a terminal or "adb shell" and execute "ps >/sdcard/processes_first.log";

3) Use the phone until GPlay stops working;

4) Go back into the terminal or adb shell and do this:

ps >/sdcard/processes_second.log

su

iptables >>/sdcard/processes_second.log

exit

exit

5) That last exit will exit the terminal/adb shell.

Then post the two log files here.

I doubt this is a DnsQache issue, but something obviously is up and hopefully we can find it.

Another thing to do -- instead of using any of the built-in DNS providers, set a custom provider to point at your normal carrier's DNS servers. That way we can see if something is up with their services -- like trying to force you to go to a proxied Play store or something strange like that.
[Android Apps and Games] esgie:
@up

Hi,

Well, first, sorry for late answer; I have no possibility of posting logs atm, I will try to post them as soon as it will be possible.

Edit:

Written a long post but deleted it as it was all wrong.

Solved the problem.

Seems I had a one corrupted line in /etc/hosts, right after the localhost entry. Dnsqache logs stated so. Deleting the line, leaving only stock entry, solved the problem. Since hour (previous max was about 20min or so) gplay is working fine, which hadnt occured previously. Even when rebooting etc

Will give feedback if something messes up.

Sorry for bothering you and hope ill have a good time with the app.
[Android Apps and Games] smeejaytee:
hi been using your app since the day you first released it i to be honest i now swear by it cant wait to see some updates have you had any thoughts on entropy still think it would be good to see some new options on this i have never returned to crossbreeder not that it isnt a great concept but i always used to get problems like overheating and adblocker not working and entropy stopping im now using various apps to perform the same tasks your app covers the networking brilliantly how about porting more stuff from that it uses lots of scripts im sure you could work some magic using it as a guide i.e memory management battery saving youve done wonders with dnscache keep up the awsome work and thank you i dont think ill ever uninstall it even if you discontinue
[Android Apps and Games] tdhite:
Thanks for the kind words -- and not to worry -- I don't plan to discontinue at all, I *need* DnsQache myself. LOL -- necessity is the mother of all invention, right? Lately I've had significant work at my 'day job' and also needed to take some time to build a newer version of TWRP for our devices (Sprint HTC One) due to a recent OTA that folks were troubled with. I'm absolutely headed back to DnsQache soon. Promises! I think i'm spread too thin ;).

The updates I'm on are a UI overhaul (it could use it :); deeper configuration options for Polipo as you can't even set any right now, and adding an 'update' facility that will pull new DNS providers from the net (as opposed to having those built in to the app). That will dramatically help folks overseas I believe. I

I admit I've not run to kernel tweaks (e.g., entropy) because those tend to be very device specific as to their efficacy. I still don't rule it out, as DnsQache has a full-fledged scripting facility built-in, so I'll ponder it and how the interface would work. That's probably the biggest issue -- how to get folks to understand how the Linux kernel deals with the settings.

Anyway -- hang with me, I'll free up soon.
[Android Apps and Games] killoid:
why don't you use this app for entropy?

http://xdaforums.com/showthread.php?t=1987032

i dont think this app should be mixed up with entropy.people are already using many tweaks & mods which have entropy enabled.if you are not using them,then use the apk that i linked.people will get confused if dns & entropy is binded in one app specially the newbies.let the app stay standalone. just my two cents. :)
[Android Apps and Games] tdhite:
Coming ... you hit the nail on the head with a feature I'm working on -- dynamically updated lists. I was thinking download from a web service I'm creating on Google's app engine, but we could make it a file, optionally, as well.
[Android Apps and Games] smeejaytee:
Ive used seeder before at the moment I'm using sefix it seems better than seeder it handles entropy in a different way witch is less heavy on resources witch is why I put the idea in here we were asked to give suggestions for next release and that was mine this guy is a very good dev and I thought he might be able to work some new magic
[Android Apps and Games] esgie:
Because it's unefficient (well, to be honest, there are doubts if it is not placebo at all since it's release...) when compared to newer solutions (crossbreeder's haveged and especially frandom).

Let me say that since using it for the first time, I cannot imagine running Android without frandom entropy generator - and the community comments about this one are much more enthusiastic than those related to Seeder... However, it requires frandom kernel module to be included/loaded in the system's kernel (and the module has to be kernel-specific, unfortunately; there is no universal workaround or so...) - in my opinion, this is pointless to adding it's support to this app, as if the dev included frandom.ko in one's kernel, then he also probably included an easy way to enable it (by kernel control app, by downloadable init script...)

Well, Crossbreeder's haveged can be an option, too, however I find crossbreeder written in too ugly and chaotic manner, also it's a pain to control it and don't want to install it on my device (however, I cannot say it doesn't work - of course it does plus it is a great piece of software, but...). The effectiveness of haveged is also discussive in my opinion, especially when compared to frandom.

My advice: ask your kernel's dev to include frandom in next release / compile it as a module - this may be extremely more profitable than asking about it here.

I absolutely agree.

Entropy and dns caching are absolutely different and unrelated things.

Crossbreeder's tweaking both because the author decided so basing on his own experiences and choices (he could as well combine dns caching with, for example, overclocking or minfree modifications...). It is pointless (and also may be considered as a thievery of an idea...) to copy this combination - guess, it's better to contcentrate on polishing THIS app as it is a little, unique jewel PLUS the dev's know what he's doing, which guarantees a good quality.

It's also true that entropy tweaks, as well as many other tweaks - which of course, CAN be added to any app, but is it necessary? - may differ extremely between individual users' needs (for example, entropy tweaking may be aimed at increasing ui responsiveness, but only to the level in which it doesnt affect battery life, or otherwise, it may be aimed to increase ui latency to the limit, in the cost of reducing battery life in a significant manner, depending on the user's preferences or intended device's usage), but also relies heavily on such a factors as device's hardware (frequently: producer-specific), technical parameters, other tweaks related to kernel or memory, etc...

There are many devs on xda who can share their experience (and work!) with you in a matter of "standard" performance tweaks, switching a lot of parameters, modding properties - including entropy.

There are however only a few who can do the same in the context of implementing full, additional networking mechanisms, compiled and configured for android from scratch.

Won't be good to waste it.

We shall not waste their
[Android Apps and Games] smeejaytee:
Response to your post of frandom is implemented into a kernel does it run automatically or do you need an app to start it I have asked my kernel dev if it would be possible but I don't know much about frandom only that is apparently the most effective way to generate entropy thanks