Is it possible to launch the client connection using python?
-
- OpenVpn Newbie
- Posts: 1
- Joined: Wed May 12, 2021 7:19 am
Is it possible to launch the client connection using python?
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
- openvpn_inc
- OpenVPN Inc.
- Posts: 1333
- Joined: Tue Feb 16, 2021 10:41 am
Re: Is it possible to launch the client connection using python?
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/
Crowley
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/
Regards,andresrodri wrote: ↑Wed May 12, 2021 7:24 amSo 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
Crowley
OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
-
- OpenVPN Power User
- Posts: 156
- Joined: Thu Mar 28, 2013 8:31 am
Re: Is it possible to launch the client connection using python?
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.
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.
- openvpn_inc
- OpenVPN Inc.
- Posts: 1333
- Joined: Tue Feb 16, 2021 10:41 am
Re: Is it possible to launch the client connection using python?
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
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
OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
-
- OpenVpn Newbie
- Posts: 2
- Joined: Fri Nov 19, 2021 12:04 am
Re: Is it possible to launch the client connection using python?
Hey folks,
Using ver 3.3, do we know if this is possible yet and what are the commands thanks?
Using ver 3.3, do we know if this is possible yet and what are the commands thanks?
-
- OpenVPN Power User
- Posts: 156
- Joined: Thu Mar 28, 2013 8:31 am
Re: Is it possible to launch the client connection using python?
I think this is what you are looking for:
https://openvpn.net/vpn-server-resource ... n-connect/
https://openvpn.net/vpn-server-resource ... n-connect/
-
- OpenVpn Newbie
- Posts: 2
- Joined: Fri Nov 19, 2021 12:04 am
Re: Is it possible to launch the client connection using python?
I read that link there isn't any documentation on how to connect to a profile, or am I missing something?