OpenVPN 3 is a C++ class library that implements an OpenVPN client, protocol-compatible with OpenVPN 2.x. It ships with a minimal command-line client wrapper.
Overview
OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client and remains protocol-compatible with the OpenVPN 2.x branch. A minimal client wrapper links against the library and exposes basic command-line connectivity for testing and deployments.
The client API is organized around openvpn::ClientAPI::OpenVPNClient, with extensions for tun setup via TunBuilderBase, external private keys via ExternalPKIBase, and logging via LogReceiver. Developers subclass the client class, supply configuration, evaluate it, and run connect on a worker thread. The stack covers transport over UDP, TCP, or HTTP proxy, tun integration on Linux, Windows, and Mac OS X, and shared protocol logic in ProtoContext.
OpenVPN 3 is used in production as the core of OpenVPN Connect clients for iOS, Android, Linux, Windows, and Mac OS X. It does not currently implement server functionality. Optional ovpn kernel data-channel offload can be enabled on Linux when the module is present.
Build instructions are provided for Linux, macOS, and Windows using CMake, with OpenSSL or mbedTLS TLS backends. Swig bindings allow wrapping the API for other languages, as used in OpenVPN Connect for Android.
Key features
- OpenVPN 2.x protocol compatibility
- ClientAPI C++ interface
- UDP TCP and HTTP proxy transport
- TunBuilder VPN API abstraction
- External PKI and keychain hooks
- Reference command-line client
- Linux DCO kernel offload support
- Swig language bindings
Use cases
- Embedding VPN in mobile apps
- Custom desktop VPN clients
- OpenVPN Connect core
- Cross-platform client development
- Command-line VPN testing