karasevm / PrivateDNSAndroid

Quick settings tile to switch active private DNS server
MIT License
420 stars 47 forks source link

Unable to add dns server #39

Closed tristan-k closed 2 weeks ago

tristan-k commented 2 weeks ago

For unkown reasons I'm unable to create add a dns server in the settings. See this screen recording for further information:

https://github.com/user-attachments/assets/35aff4e7-fd03-4982-970c-48fd64818fb9

I suspect it could be related to another app which overlays on the screen and blocks the ui.

stephenvaz commented 2 weeks ago

Android's Private DNS feature requires the hostname and not the IP of the DNS server.

You can find the hostname for a DNS provider usually on their website. In the case of Cloudflare's 1.1.1.1, the hostname is one.one.one.one.

If you want to use your own DNS server, you could manually edit the Wi-Fi config for your home Wi-Fi to use that specific DNS when connected to it in the Wi-Fi settings

tristan-k commented 2 weeks ago

Thanks for the heads-up. Is this generally not possible or is this specific to PrivateDNSAndroid ? On OneUI 6.1 (Android 14) in the Wi-Fi settings it's not possible to add a custom dns server with a dhcp server. Only with a static ip configuration.

karasevm commented 2 weeks ago

Thanks to #9 we validate the input fields the exact same way as AOSP, so I'd assume anything not accepted is generally not supported.
As a solution for the home network you can either set the DNS through the DHCP server option 6, as @stephenvaz has already mentioned, or you can switch to a DNS server that supports DoT such as AdGuardHome.
I'm going to close the issue, but if you have any questions regarding the proposed solutions feel free to ask.