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.87k stars 146 forks source link

The ability to auto switch between wire guard proxies on failure. #1670

Closed XingShelly closed 1 month ago

XingShelly commented 1 month ago

Currently, whenever a wireguard properly fails, I don't notice or get any notification. Instead all connections just stop working. Can you please implement a functionality that keeps automatically switching between the available wireguard proxies in simple mode upon failure in the background? (maybe from a predefined list of proxies that are allowed to be switched to automatically upon failure?) This way, an active connection always remains persistent in the background.

Also, can you implement a notification system upon failure, so I would know when a connection drops? Also, can you have an option in the notification to switch to another wire guard proxy?

ignoramous commented 1 month ago

This way, an active connection always remains persistent in the background.

This is implemented in Advanced WireGuard mode with Always-on (an Always-on WireGuard routes ALL apps that are not part of any other active WireGuard configuration). Mark multiple WireGuards as Always-on, and Rethink would attempt to "load balance" among them, however imperfectly:

For Simple mode, we'd like to keep things simple, just as it is in the official WireGuard app, and not complicates things up.

(I am closing this issue as Advanced + Always-on WireGuard gets what you want, but feel free to reopen)

XingShelly commented 3 weeks ago

I think this is different from the solution you suggested For three reasons:

1- In the advanced mode, you are not allowed to use the wire guard DNS, which is a huge big deal for me. As it prevents the user from standing out for using a different DNS provider.

2-This only works for proxies you have specifically defined to run with always on option turned on. In this case, you'll literally have to define all proxies you have as always on for this to work. If you have a big list and if you just want to use all of them, you cannot do that without going to each one of them and enabling them manually, which is not ideal.

3- You have to connect to many proxies at the same time. This will not only make traffic coming out of your device weird because you're connecting to so many proxies at the same time, but it will also hinder your ability to use the device because most VPN providers will not allow more than a couple of connections at the same time, which means it is impossible to do this with a large list. And this is very different from what I had in mind.

I was thinking of having one connection to one proxy at any given time and then when it fails, it just switches automatically to a random proxy from the unactivated proxy list and tries to connecting to one of them until it succeeds

I believe this is even more important in simple mode.

ignoramous commented 3 weeks ago

In the advanced mode, you are not allowed to use the wire guard DNS, which is a huge big deal for me.

This has been implemented (for A/AAAA queries) in upcoming version, v055o.

If you have a big list and if you just want to use all of them, you cannot do that without going to each one of them and enabling them manually, which is not ideal

Well, this is a very niche use case for us to consider changing UI/UX for. Typically, we don't expect more than 1 or 2 Always-on. Previously, Rethink only supported enabling just 1.

most VPN providers will not allow more than a couple of connections at the same time

(May be I'm misunderstanding what you wrote) I don't see how this problem is solvable by Rethink?

one connection to one proxy at any given time and then when it fails, it just switches automatically to a random proxy from the unactivated proxy list and tries to connecting to one of them until it succeeds

Ah, okay. This makes sense for Simple mode, only.