Hi everyone,
coming from the old OpenVPN 2 client, the openvpn3 command line syntax feels a little complicated for me as an outsider. I know that openvpn3 is more modern and e.g. managing multiple connections in background imposes some requirements on the command line interface, but I still have a feeling the syntax could be less complicated. I'd like to propose some ideas for a simplified command line syntax.
For example, connections are started using session-start, but disconnecting requires session-manage --disconnect. While it makes sense from a developer perspective (a session can only be managed if it was started first), it is hard to understand from a users perspective (Why is there a separate command for starting sessions, but disconnecting sessions is only a subcommand to session-manage?) From a consistency point of view, it would make more sense to either move session starting to session-manage --start, or introduce a session-disconnect command which might just be an alias to session-manage --disconnect.
Furthermore, openvpn3 session-manage --disconnect --config config-name is a quite lengthy command to type, so a session-disconnect command would help here as well. One could even think about ditching the session- prefix, commands like openvpn3 connect, openvpn3 disconnect etc. would still be unambiguous. Or removing the need to specify --config config-name, this would be a good use case for a positional argument, that is always required unless --path is given or something. The config file argument could even be omitted if only one session is established.
If these improvements would be applied, we could reduce a lengthy command to disconnect a session like
openvpn3 session-manage --disconnect --config config-name
to a much shorter version like
openvpn3 disconnect config-name
or even
openvpn3 disconnect
which would not only be much faster to type, it would also be much easier to explain to our less tech-savy Linux users that are just researchers or students and not developers or system administrators.
It might be that I'm missing something and using openvpn3 in an overly-complicated manner, or maybe I'm the only one who was a bit intimidated by the command line syntax on first use, or maybe there are technical reasons why a simpler command line syntax is not possible, that I simply don't know as an outsider. But at least I wanted to start a discussion on that topic ;)