yggdrasil-network / yggdrasil-android

Reference implementation for connecting to the Yggdrasil Network from Android devices
MIT License
125 stars 19 forks source link

Resume connectivity when the internet connection changes. #3

Closed styromaniac closed 2 years ago

styromaniac commented 3 years ago

Going between WiFi hotspots and switching between WiFi and cellular data should not make Yggdrasil remain disconnected.

neilalexander commented 3 years ago

As far as I am aware, this is not behaviour that we have coded. One of two things is presumably happening:

  1. The peer connections are dropping as the routing table changes, in which case the peerings should retry eventually (less than a minute);
  2. Android is stopping the VPN extension for some reason and not restarting it after, which we have no control over.
bqv commented 2 years ago

This issue is experience-runining, honestly

bqv commented 2 years ago

As far as I am aware, this is not behaviour that we have coded. One of two things is presumably happening:

1. The peer connections are dropping as the routing table changes, in which case the peerings should retry eventually (less than a minute);

2. Android is stopping the VPN extension for some reason and not restarting it after, which we have no control over.

For what it's worth, as a basic test, the wireguard app vpn behaves differently and doesn't drop on connectivity change, whereas yggdrasil does on my phone, so I'm not sure it's android.

I don't think (1) is the issue, because then that wouldn't lead to the vpn being "off", just no actual connection, right?

As I mentioned, (2) shoudn't be the case either, since it works fine for other apps. In fact, i've been using ygg as my always-on vpn, which is why the issue is obvious, because android complains that ygg stopped every time wifi or mobile connection gets interrupted or changed

DePingus commented 2 years ago

I'm on version 0.4.0 and seeing inconsistent behavior when the phone switches network.

First scenario

Phone starting on cell network:

Second scenario

Phone starting on wifi network:

Revertron commented 2 years ago

As I've understood there were some bugs and they lead to some unseen crashes. Now we've fixed them and the app is very stable, runs for days without issues. Even when changing from mobile to wi-fi and back. And it is good to set in as Always On VPN.

Revertron commented 2 years ago

I think it's fixed.