Commit Graph

5 Commits (577d982b51670f7f68d6dad9d0bf08f8a01879ba)

Author SHA1 Message Date
Lev Stipakov d60325acde Support for OpenVPN 3
This adds optional support for using OpenVPN3 client
as an alternative to openvpn2.

Just replacing one client with another will not work:

 - OpenVPN3 doesn't use interactive service, it uses
"agent" service with completely different protocol. OpenVPN GUI
needs to talk to agent using HTTP and JSON.

 - OpenVPN3 management interface realtime notifications must be
explicitly turned on in order for GUI to work.

To enable using openvpn3:

 - use any of *-ovpn3 presets (cmake build system)

 - ./configure --enable-ovpn3 (mingw)

To switch betweet openvpn2 and openvpn3, see "OpenVPN Engine"
radiobutton group in Settings -> Advanced dialog.

OnReady() implementation was slighly changed - "log all on"
replaced with "log on all" - according to management interface
documentation this is the right way to do it, and also OpenVPN3
only supports "on all" order.

Management interface - enabled OpenVPN3 client (omiclient.exe) and
agent (ovpnagent.exe) are now part of openvpn3 repo.

Co-authored-by: Christopher Ng <facboy@gmail.com>
Signed-off-by: Christopher Ng <facboy@gmail.com>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-06-15 10:32:36 -04:00
Lev Stipakov 271648c6c3 cmake: replace Ninja generator with MSVC
Ninja makes build slightly faster but requires running
"x64" developer command prompt, not the "default" one.
Without that, cmake silenly produces x86 binaries and it might
take a while to find out the reason. To avoid confusion, switch back
to MSVC generator.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-31 11:56:30 +03:00
Lev Stipakov a85bba9654 CMakePresets: fix arm64 debug/release config
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-26 21:21:45 +03:00
Lev Stipakov 09aa7ef730 CMakePresets.json: use MSVC generator for ARM64 builds
Sadly, CMake/Ninja combo doesn't work well for ARM64
(similar to
https://stackoverflow.com/questions/47581784/building-a-x86-application-with-cmake-ninja-and-clang-on-x64-windows)
- it silently produces x64 binaries instead of arm64.

Switch to slower MSVC generator.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-26 16:24:13 +03:00
Lev Stipakov b6f26818a9 Use vcpkg manifest and cmake presets
Manifest is a convenient way to automatically
install dependencies. Since we have to support
both OpenSSL 1.1.1 (for OpenVPN 2.5) and OpenSSL 3
(for coming OpenVPN 2.6) and manifest file name
is hardcoded, we create two manifests and put them
into different directories.

To simplify build process, define configuration presets
for arch (x86/x64/arm64), debug/release and oss1.1.1/ossl3.

This way building is greatly simplified:

  cmake -S . --preset x64-debug-ossl3
  cmake --build --preset x64-debug-ossl3

Update GitHub Actions script accordingly.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2022-05-24 14:20:51 +03:00