celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.82k stars 143 forks source link

Support to auto-pause for trusted network #445

Open PeterDaveHello opened 2 years ago

PeterDaveHello commented 2 years ago

Would be good to auto-pause when using a trusted network, like at home with Pi-Hole deployed(also encrypt the query to upstream), or other places already deployed similar mechanism.

ignoramous commented 2 years ago

See #63

I don't think impl such automation is priority for us at this time.

ignoramous commented 1 year ago

A user writes,

hi, is there anyway to automatically pause RethinkDNS when connected to a specific Wireless AP ? as I am using my local network to terminate my Wireguard server, nothing is working if RethinkDNS is up and I am connected to the same wireless network, would be a nice way to automatize this

CheariX commented 1 year ago

How about a simple toggle switch in the notification? At the moment, I do not find the provided notification action very useful.

2Belette commented 1 year ago

I would apend my comment (as the user is myself). It would be even better to give the choice to automatically switch to DNS only or to switch off on trusted network as this would disable Wireguard proxy but still provide DNS filtering if wanted

mpeter50 commented 3 weeks ago

Similarly to the other user, I'm also connecting to a wireguard server hosted in a building that I regularly visit. The ISP router is sensitive to outgoing traffic destined to itself, and often the VPN connection stops working when I use it while being at that place.

So far I was using the official wireguard app and the WG Auto Connect app from F-droid to partly automate this. But you have won me over with being able to function as an app firewall and a wireguard client at the same time, let alone the split tunneling functionality, and the alternative possibilities to proxy the traffic.

With the official wireguard app the automation is solved with a permission and intents. The app itself has a custom permission, which I can toggle on for compatible apps, and it can receive intents from allowed apps that toggle a specific wireguard tunnel, which was passed by name in the intent. The WG Auto Connect app sends an intent to turn on the tunnel when my phone disconnects from the specified wifi network, and sends another one to turn it off when it connects back to it.

Until you have capacity the functionality of the WG Auto Connect app is not important to be replicated, but I think it would be very useful to allow for others apps to toggle proxies by name, of course protected by a permission, and maybe a switch in the settings that turns that feature on or off, with default being disabled.

I could have also commented this to #1294 so I'll mention it to have it linked, but my use case and the justification is related to this one so ended up writing here.