cernekee / ics-openconnect

Android UI for OpenConnect VPN client
GNU General Public License v2.0
365 stars 130 forks source link

When reconnecting on a network change, support re-authenticating. #24

Open dseomn opened 7 years ago

dseomn commented 7 years ago

I have "Reconnect on network change" checked in the settings, and it works fine for short network changes. However, if I lose network for hours, the reconnect fails when I get network access again. Last time I looked at the logs, it looked like it was trying to reconnect with the old TLS session instead of reauthenticating in a new TLS session. I just disconnected from all networks, and I'll try to post logs later when I reconnect to the network after the TLS session expires.

cernekee commented 7 years ago

It will create new TLS sessions, but your auth cookie has probably expired after being offline for several hours. Reconnection only works if the cookie is still valid. Getting a new cookie may involve re-entering your password / OTP / etc.

dseomn commented 7 years ago

Everything it needs to reauthenticate is saved. When I manually connect, I tap the button for which VPN I want to use, and it doesn't ask me for anything else.

cernekee commented 7 years ago

The app does not currently know how to repeat the authentication flow and obtain a new cookie, although it would be nice if it did.

dseomn commented 7 years ago

Gotcha, thanks for the explanation. I changed the issue title to reflect that this is now a feature request. I assume I don't need to bother posting my logs anymore?

cernekee commented 7 years ago

Correct

loganblevins commented 6 years ago

We're implementing a VPN on Android to match an iOS VPN. On iOS, we have to disconnect the VPN interface and re-establish it on network interface changes. Wondering if the same is true with the Android OS.