PrivateDNSAndroid icon indicating copy to clipboard operation
PrivateDNSAndroid copied to clipboard

automation of dns enablement

Open Spp595 opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe.

I think many people in their home network, for some reason, need to use home DNS (traffic rules, their own domain names), but they also want to stay safe when connecting to a mobile network.

Describe the solution you'd like.

automatic dns switching function when connecting to a specific wifi network or when connecting to a mobile network

Describe alternatives you've considered.

No response

Additional context

No response

Spp595 avatar Jul 08 '24 07:07 Spp595

This would be an amazing feature to have!!! I think most people use Tasker to achieve that but Tasker is overkill and obviously not FOSS.

GenericMale avatar Jul 17 '24 21:07 GenericMale

is there any progress? This feature is very necessary and if you do this it will be the first application with such a feature. Although the DNS changes when connecting to wifi

Spp595 avatar Aug 01 '24 13:08 Spp595

@karasevm Thank you for creating this app. It's well thought-out and works well.

I came to request a feature for auto-switching to a specific DNS configuration on certain events and saw that others have requested it as well. Use case: connect to home Wi-Fi and switch to home LAN DNS server like Pi-hole. Or switching to Cloduflare DNS when using a mobile data connection.

I don't know how busy you are, but would you consider adding this feature any time soon? Is it difficult to add to the existing code base?

Unfortunately, I can't help with writing code here, but would gladly do any testing.

andrei-a-papou avatar Mar 14 '25 09:03 andrei-a-papou

@andrei-a-papou Thanks for your kind words. I am not currently working on this feature. When the feature request was first submitted I did some research and test builds and wasn't really happy with the results as nowadays you'd have to request more permissions than I am comfortable with to get the current network connection info. Saying that, I'm not completely against the feature and the reason for the backend rewrite was in part to support such functionality. As an alternative, you should be able to do some automation through shortcuts when #37 lands.

karasevm avatar Mar 15 '25 12:03 karasevm

@karasevm Thanks for clarifying. I feel your pain re too many permissions. If you do get to implementing this feature in the future, perhaps making some permissions optional would mitigate the problem. As in, if the user's OK with the app monitoring Wi-Fi/location, they opt in and get the automation functionality. Or they don't and just use the tile.

I'll be sure to check out https://github.com/karasevm/PrivateDNSAndroid/pull/37 when it's ready, thanks!

andrei-a-papou avatar Mar 16 '25 16:03 andrei-a-papou

I attempted something to trigger DNS changes on basis of WiFI connects and disconnects https://github.com/candiesdoodle/PrivateDNSAndroid

candiesdoodle avatar Jul 17 '25 12:07 candiesdoodle

This would be an amazing feature to have!!! I think most people use Tasker to achieve that but Tasker is overkill and obviously not FOSS.

can you please share how to create the task to switch on private DNS as soon as wifi is disconnected and vice versa?

ten24bytes avatar Aug 05 '25 18:08 ten24bytes