Page 1 of 1
Is it possible to launch the client connection using python?
Posted: Wed May 12, 2021 7:24 am
by andresrodri
So I already have my server configured and I have my clients.ovpn files that connect perfectly through the GUI icon on the task bar. Now I was wondering if it was possible, lets say to create a user interface in python or any other language that lets the user choose the client.ovpn file and that just calls the GUI to connect to it, I dont want to reinvent the GUI, just so when running this user interface be able to connect from instead of having to do it from the icon in the task bar
Re: Is it possible to launch the client connection using python?
Posted: Wed May 12, 2021 5:39 pm
by openvpn_inc
Hi There,
Do you mean to have a GUI-based connect client? Actually, we already have a connect client V3, in which you can just toggle a button to connect to your OpenVPN connection profile(.OVPN). See below for the screenshot for this V3 connect client. Are you pertaining to this functionality?
You can check this link to download and know more about Connect client V3.
https://openvpn.net/client-connect-vpn-for-windows/
andresrodri wrote: ↑Wed May 12, 2021 7:24 am
So I already have my server configured and I have my clients.ovpn files that connect perfectly through the GUI icon on the task bar. Now I was wondering if it was possible, lets say to create a user interface in python or any other language that lets the user choose the client.ovpn file and that just calls the GUI to connect to it, I dont want to reinvent the GUI, just so when running this user interface be able to connect from instead of having to do it from the icon in the task bar
Regards,
Crowley
Re: Is it possible to launch the client connection using python?
Posted: Wed May 12, 2021 6:16 pm
by chilinux
How I read the question is he is asking for is what is the full command line options to OpenVPNConnect.exe
This was also discussed on reddit here:
https://www.reddit.com/r/OpenVPN/commen ... onnectexe/
That thread determined there is a "connect" option to choose a profile from the command line once the configuration has already been imported.
However, I can't find any information on a CLI method to import the configuration file to add a profile.
Instead, I found this knowledgebase article:
https://openvpn.net/vpn-server-resource ... emon-mode/
But this discusses setting the profile for the ovpnconnector.exe service agent and it isn't clear it will have any impact on OpenVPNConnect.exe
So far I haven't been able to use set-config on OpenVPNConnect.exe directly.
It might be that using the service agent could work for what he is trying to do but my gut tells me that isn't what he is looking for.
Instead, it might be possible he will need to put a request into OpenVPN AS support with a feature request.
Re: Is it possible to launch the client connection using python?
Posted: Mon May 24, 2021 11:25 am
by openvpn_inc
Hello,
With OpenVPN Connect v2, there is a command line interface whereby you can call ovpncli.exe with the Connect argument to start the default connection present in the client. There are also options to select a specific profile to connect. And options to import and delete profiles.
OpenVPN Connect v3 does not have this function yet. Importing via command line is also simply not possible yet. Command line interface support is being added as we speak. OpenVPN Connect v3.3 is currently in testing and being finalized for release. With this release, many new features for Connect v3 will become available, and one of the main ones is command line control of the client. So with that release it will be possible to do a command line call to tell it to stop/start the connection, or import/rename/delete profiles, and so on.
We hope to have this out as soon as possible.
Kind regards,
Johan
Re: Is it possible to launch the client connection using python?
Posted: Fri Nov 19, 2021 12:05 am
by ctola
Hey folks,
Using ver 3.3, do we know if this is possible yet and what are the commands thanks?
Re: Is it possible to launch the client connection using python?
Posted: Fri Nov 19, 2021 4:19 am
by chilinux
Re: Is it possible to launch the client connection using python?
Posted: Fri Nov 19, 2021 11:28 am
by ctola
I read that link there isn't any documentation on how to connect to a profile, or am I missing something?