diff --git a/README.rst b/README.rst index f697c46d..7c75d01c 100644 --- a/README.rst +++ b/README.rst @@ -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