0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00
OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.
Go to file
James Yonan b9ce669805 Win core : use Name Resolution Policy Table (NRPT)
registry settings for DNS routing on Win 8 and higher.

We are now using these three approaches (simultaneously)
for DNS routing/filtering:

1. NRPT for routing (Win 8 and higher)
2. WFP for filtering (Win Vista and higher)
3. "netsh interface ip set dnsservers ..." (Win Vista and
   higher)

The NRPT approach also supports selective DNS routing for
split tunnel via "dhcp-option DOMAIN ..." directive, where
DOMAIN is a DNS suffix.  Note however that on Win 10, only
the first DOMAIN suffix given was actually routed through
the tunnel, and subsequent suffixes were ignored.

Previously, the first domain in the "dhcp-option DOMAIN ..."
list was used to set a default TAP-adapter domain suffix,
but I've disabled this behavior as it seems to be archaic
usage and conflicts with the modern usage of "dhcp-option
DOMAIN ..." as a selector for DNS suffix routing.  Let me
know if you disagree.
2016-03-01 22:17:51 -07:00
client Added OPENVPN_DEBUG_PROTO_DUMP build flag to dump protocol 2016-02-07 07:37:17 -07:00
deps build-openssl needs a "make depend" before make. 2015-12-28 21:12:11 -07:00
doc OpenVPN Protocol extensions update. 2015-01-06 17:16:06 -07:00
javacli In Android build scripts, change -lpolarssl to -lmbedtls. 2015-12-28 21:12:41 -07:00
openvpn Win core : use Name Resolution Policy Table (NRPT) 2016-03-01 22:17:51 -07:00
scripts Updated ovpn3 dependencies: 2015-12-28 17:47:18 -07:00
test Added IPv6 setting to ovpn3 client API via 2016-02-05 12:16:20 -07:00
vars GCC LTO requires that build scripts use gcc-ar and gcc-ranlib. 2015-11-27 17:57:55 -07:00
win Minor changes to Windows build scripts due to reorganization 2015-12-29 00:07:22 -07:00
COPYING Added AGPL text in COPYING. 2014-08-28 15:05:23 -06:00
README.rst Minor changes to README.rst: 2015-12-28 21:31:45 -07:00

OpenVPN 3
=========

OpenVPN 3 is a C++ class library that implements the functionality
of an OpenVPN client, and is protocol-compatible with the OpenVPN
2.x branch.

OpenVPN 3 includes a minimal client wrapper (``cli``) that links in with
the library and provides basic command line functionality.

NOTE: As of early 2016, OpenVPN 3 is primarily of interest to developers
because it does not yet replicate the full functionality of OpenVPN 2.x.
In particular, server functionality is not yet implemented.

Building OpenVPN 3 client on Mac OS X
-------------------------------------

OpenVPN 3 should be built in a non-root Mac OS X account.
Make sure that Xcode is installed with optional command-line tools.
(These instructions have been tested with Xcode 5.1.1).

Create the directories ``~/src`` and ``~/src/mac``::

    mkdir -p ~/src/mac

Clone the OpenVPN 3 repo::

    cd ~/src
    mkdir ovpn3
    cd ovpn3
    git clone ... core

Export the shell variable ``O3`` to point to the OpenVPN 3 top level
directory::

    export O3=~/src/ovpn3

Download source tarballs (``.tar.gz`` or ``.tgz``) for these dependency
libraries into ``~/Downloads``

See the file ``$O3/core/deps/lib-versions`` for the expected
version numbers of each dependency.  If you want to use a different
version of the library than listed here, you can edit this file.

1. Asio -- https://github.com/chriskohlhoff/asio
2. PolarSSL/mbedTLS (1.3.15 or higher) -- https://tls.mbed.org/
3. LZ4 -- https://github.com/Cyan4973/lz4

For dependencies that are typically cloned from github vs.
provided as a .tar.gz file, tools are provided to convert
the github to a .tar.gz file.  See "snapshot" scripts under
$O3/core/deps

Note that while OpenSSL is listed in lib-versions, it is
not required for Mac builds.

Build the dependencies::

    OSX_ONLY=1 $O3/core/scripts/mac/build-all

Now build the OpenVPN 3 client executable::

    cd $O3/core
    . vars/vars-osx64
    . vars/setpath
    cd test/ovpncli
    PSSL=1 LZ4=1 build cli

This will build the OpenVPN 3 client library with a small client
wrapper (``cli``).  It will also statically link in all external
dependencies (Asio, PolarSSL, and LZ4), so ``cli`` may be distributed
to other Macs and will run as a standalone executable.

These build scripts will create a **x86_x64** Mac OS X executable,
with a minimum deployment target of 10.8.x.  The Mac OS X tuntap driver is not
required, as OpenVPN 3 can use the integrated utun interface if
available.

To view the client wrapper options::

    ./cli -h

To connect::

    ./cli client.ovpn