eduvpn / apple

app for iOS and macOS
Other
58 stars 18 forks source link

Suppress retry on auth failure #508

Closed roop closed 1 year ago

roop commented 1 year ago

Fixes #494.

When the tunnel is on, and the authorisation is revoked on the server, then the OpenVPN tunnel will error out and try to reconnect. Because of on-demand, the OS keeps trying to turn the tunnel on, and the client keeps contacting the server again and again.

To prevent this, in this PR, when the tunnel is turned on by the OS, if the tunnel sees an unrecoverable AUTH_FAIL, it shuts down the tunnel but keeps the tunnel process alive. It also tries to show a message to the user with a deprecated API (displayMessage()), which seems to work on macOS but not on iOS. To the user, the tunnel will be in "Connecting ..." state.