OpenVPN / openvpn3-indicator

Simple GTK indicator GUI for OpenVPN 3 Linux
https://github.com/OpenVPN/openvpn3-indicator
GNU Affero General Public License v3.0
24 stars 2 forks source link

openvpn3-indicator should verify session status when user credentials has been collected #5

Open dsommers opened 3 months ago

dsommers commented 3 months ago

If starting a VPN session from the command line (like openvpn3 session-start) which requires user credentials, the indicator will pop up the query box. This is actually quite cool! But if the credentials are provided via the command line, clicking "Cancel" will kill the VPN session.

The openvpn3-indicator should check that the session minor status is still CFG_REQUIRE_USER before doing the disconnect. This pop-up should ideally also detect if the session state changes while being open and close the pop-up automatically if the session changes to any of the other CONN_* minor statuses.

The openvpn3 command line will also need to be adopted a bit to also avoid similar misbehaviour; I'll tackle that as part of the GDBus++ refactoring already in progress.

grzegorz-gutowski commented 3 months ago

Wow, this is a very nice interaction that I didn't think off. I definitely want to properly support this behavior.

grzegorz-gutowski commented 3 months ago

I have added the necessary code, but this interaction now runs into problems which I believe are caused by two different applications simultaneously calling Connect() on the same session. I'll try to figure out some work-around and check if it works better with v22.