openvpn-gui icon indicating copy to clipboard operation
openvpn-gui copied to clipboard

GUI - disconnect all

Open emseecz opened this issue 8 months ago • 5 comments

Hello, Would it be possible to add an item to the menu that would disconnect all connected connections?

Thank you, Martin

emseecz avatar Apr 08 '25 10:04 emseecz

Very few users have more than one connection active at the same time and even fewer with more than two or three. Feels like this would be a menu item of very low utility. What is the use case? A quick workaround is to create a shortcut for openvpn-gui.exe and name it, say, OpenVPN Disconnect with command line option --command disconnect_all. See README on sending commands to a running GUI instance.

selvanair avatar Apr 08 '25 12:04 selvanair

Very few users have more than one connection active at the same time and even fewer with more than two or three. Feels like this would be a menu item of very low utility. What is the use case? A quick workaround is to create a shortcut for openvpn-gui.exe and name it, say, OpenVPN Disconnect with command line option --command disconnect_all. See README on sending commands to a running GUI instance.

@selvanair I don't know about other users, but for me all commands under "--command" don't work. The program simply refuses to recognize the specified commands, including "--command disconnect_all"

Shyryp avatar Apr 22 '25 00:04 Shyryp

The program simply refuses to recognize the specified commands

What does "simply refuses" mean -- post the error message.

To test, with multiple connections active, open a command prompt and run "C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect_all Works for me.

selvanair avatar Apr 22 '25 00:04 selvanair

The program simply refuses to recognize the specified commands

What does "simply refuses" mean -- post the error message.

To test, with multiple connections active, open a command prompt and run "C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect_all Works for me.

Ah, sorry, indeed, it was a problem with the access level. OpenVPN was running under administrative rights, and I tried to run the commands as a normal user (its does not work). Yes, everything works.

Shyryp avatar Apr 22 '25 00:04 Shyryp

OpenVPN was running under administrative rights

This is not recommended. If something is not working when run without elevation, please report.

selvanair avatar Apr 22 '25 00:04 selvanair

Hi,

Using the --command option is a great idea, but it requires confirmation to run elevated programs. There should be a compromise—perhaps the "Disconnect all" option could only be visible to users who have more than one profile configured in OpenVPN.

Thank you

emseecz avatar Jul 08 '25 22:07 emseecz

Using the --command option is a great idea, but it requires confirmation to run elevated programs.

No elevation confirmation is required to use --command. The GUI runs fine as limited user and that's how its meant to be used.

selvanair avatar Jul 08 '25 23:07 selvanair

Sorry, my bad. You are right, it doesn't need administrator.

emseecz avatar Jul 09 '25 13:07 emseecz