0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

README.rst: Update Linux build steps

Switch to CMake buildsystem.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
This commit is contained in:
Lev Stipakov 2020-09-22 12:49:12 +00:00
parent d8e99cf5c1
commit ae0d84be60

View File

@ -29,46 +29,39 @@ A simple command-line wrapper for the API is provided in
Building the OpenVPN 3 client on Linux
--------------------------------------
These instructions were tested on Ubuntu 16.
These instructions were tested on Ubuntu 20.
Get prerequisites to allow for either mbedTLS or OpenSSL linkage::
Prepare directory structure::
$ sudo apt-get install g++ make libmbedtls-dev libssl-dev liblz4-dev
Get Asio C++ library::
$ cd ~
$ git clone https://github.com/chriskohlhoff/asio.git
Set environmental variable used by OpenVPN 3 build scripts::
$ export O3=~/ovpn3
$ sudo apt install g++ make libmbedtls-dev libssl-dev liblz4-dev cmake
$ export O3=~/O3 && mkdir $O3
$ export DEP_DIR=$O3/deps && mkdir $DEP_DIR
$ export DL=$O3/dl && mkdir $DL
Clone the OpenVPN 3 source repo::
$ mkdir ~/ovpn3
$ cd ~/ovpn3
$ cd $O3
$ git clone https://github.com/OpenVPN/openvpn3.git core
Build the OpenVPN 3 client wrapper (cli) with mbedTLS crypto/ssl library
and LZ4 compression::
Build dependencies::
$ cd $O3/core/test/ovpncli
$ ECHO=1 PROF=linux ASIO_DIR=~/asio MTLS_SYS=1 LZ4_SYS=1 NOSSL=1 $O3/core/scripts/build cli
$ cd core/scripts/linux/
$ ./build-all
Or alternatively build with OpenSSL::
Build the OpenVPN 3 client wrapper (cli) with OpenSSL library::
$ cd $O3/core/test/ovpncli
$ ECHO=1 PROF=linux ASIO_DIR=~/asio OPENSSL_SYS=1 LZ4_SYS=1 $O3/core/scripts/build cli
$ cd $O3/core && mkdir build && cd build
$ cmake ..
$ cmake --build .
To use mbedTLS, use `cmake -DUSE_MBEDTLS=on ..`.
Run OpenVPN 3 client::
$ sudo ./cli -a -c yes myprofile.ovpn route-nopull
$ sudo test/ovpncli/ovpncli myprofile.ovpn route-nopull
Options used::
-a : use autologin sessions, if supported
-c yes : negotiate LZ4 compression
myprofile.ovpn : OpenVPN config file (must have .ovpn extension)
route-nopull : if you are connected via ssh, prevent ssh session lockout