-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set DNS on boot/IP change #1
Comments
Alternatively, if DNSsetter could remember the DNS servers IPs instead of having to input them each and every time, that would be a start. :-) Applying the changes would then only require the tap of one button. :-) |
The "Set DNS on boot" feature would be useful. |
The app https://github.com/otakuchiyan/DNSman has the feature to survive a reboot and / or a (mobile data) IP change. Probably you could borrow some relevant code snippets, if you like. |
@revuwa This app (DNSman) only work on wifi networks, because of some Android "security" things. I see that on the description of DNS man on F-Droid |
@fullinterest Thanks, but how did you hit on that? I'm using DNSman for my 3G mobile data connection for some weeks now, without any problems. AFAIK to use your own DNS server(s) on Wi-Fi, you could simply set it through the Wi-Fi connection settings and don't need an app for that. So mobile data should be the target in my eyes. But if you travel your connection interrupts very often and resets the DNS servers to the provider default ones. So IMHO, a widget or shortcut doesn't make sense to me. (Just in case you want to use the app for your Wi-Fi DNS instead; but like I said, this shouldn't be the use case, or am I wrong)? |
I don't remember where I saw, but I remember that there's reason that they don't put a setting to change settings on mobile data, unlike wifi networks. And don't know how it work, but currently, on my phone using f-droid 0.96, the description DNS man is "Change the used DNS server for specific wifi networks." I just don't stay for long on WiFi network, so each time I switch on and off, the dns get changed again. |
It should be possible to receive a broadcast intent each time there is a change in connectivity and execute the I will try to implement this, but as this app doesn't seem to work anymore on my phone with the currently used method, I can't really test it. |
Well, I did that in another way, I did a sh script, and I use SManager that allow to execute as root script on Net change events. You know how the ndc method works? |
So I guess that's what the app you mention does: it registers a broadcast receiver for I didn't have much success with the |
And the setprop way will be removed in the future? Because you say it doesn't work on your phone |
From what I read, DNS is managed by the The property-based method does not seem to be used anymore (you could retrieve the dns values with What Android version are you running ? |
I'm running 4.4.4 version of android |
And |
Well, the setprop seem to be able to define the dns because getprop (and your app) show my custom dns, I dunno if there's a command on android to make sure of the dns used like dig on linux |
Our discussion is going off the current issue. I answered you in #6. I will first fix this issue for people for whom the application works, then I'll try to address the other issue. |
Oh, sorry |
Any news about this feature? |
Currently, DNS servers are overridden after each reboot/IP change/reconnection. We should find a method to make it persistent.
I tried adding the setprop commands in
/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf
but this script doesn't seem to be called.The text was updated successfully, but these errors were encountered: