0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 04:02:15 +02:00
Commit Graph

219 Commits

Author SHA1 Message Date
Arne Schwabe
7c39088f00 Allow overriding reported HW_ADDR and support IV_PLAT_VER 2019-08-29 16:33:05 +02:00
Arne Schwabe
34a3f264f5 [OVPN-314] Add support for signalling SSO support via IV_SSO 2019-06-13 12:05:16 +02:00
Lev Stipakov
a2496a3616 Wintun: experimental support
This introduces experimental support for Wintun
as an alternative for tap-windows6.

In order to use wintun, set "ClientAPI::Config::wintun"
flag to "true" or use "-w" option in test client.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-05-29 20:21:28 +03:00
David Sommerseth
d85e92621d
Make reproducible builds possible
Packaging OpenVPN 3 Linux on Debian reports this warning:

openvpn3-core/client/ovpncli.cpp:1380:27: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time]
       ret += " built on " __DATE__ " " __TIME__;

Reproducible builds is something which will come arrive in more
distributions, as it is a good way to verify that binary builds contains
the expected source code and has not been mangled by the packager.

This changes the current behaviour and will not provide the date/time
stamps unless the OPENVPN_DEBUG macro has been set.  Enabling this
macro will re-enable the date/time stamp reporting via
OpenVPNClient::platform().

Signed-off-by: David Sommerseth <davids@openvpn.net>
2019-05-07 19:59:21 +02:00
Arne Schwabe
9768562a01 OpenSSL 1.1: Add argument to external sign to specify algorithm
In TLS 1.3 the RSA-PSS padding is required in addition to the
traditional PKCS1 padding used in TLS 1.2 and below. Add an
argument to the external sign function to signal what padding
is required. As quirkyness OpenSSL calls out requesting a NONE
padding instead of RSA-PASS.

We might need to move from RSA_method to EVP_PKEY_method in the
future.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-04-15 15:47:22 +02:00
Arne Schwabe
0a0d080a49 Implement allowing local LAN access
On Android local networks need to be excluded from the default (or any
other route) route if they should bypass the VPN. This adds a callback
to specifically bypass the local LAN networks.
2019-03-12 11:36:29 +01:00
Antonio Quartulli
d5eeb78ed9
ClientAPI: print core version when starting
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2019-01-30 11:09:16 +10:00
Arne Schwabe
2ea88a93ba Add Remote endpoint information to protect_socket call
On the linux client we need the information to which remote the client
is connecting to query the route information to ultimately discover the
device. On other platform that do not need these extra information we
ignore the extra arguments

The API uses std::string and bool instead of passing of passing IPAddr as
the API needs to be understand by Swig/Java and similar methods also opt in
favour of call by value and simply types.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2018-12-04 13:33:18 +01:00
Lev Stipakov
9e600c89e7 Merged in OVPN3-211-implement-big-mutex (pull request #5)
[OVPN3-211] bigmutex: introduce macro to ensure thread-safety

Approved-by: James Yonan <james@openvpn.net>
2018-06-08 08:03:44 +00:00
Lev Stipakov
ccc17a5631 [OVPN3-211] bigmutex: introduce macro to ensure thread-safety
Platforms like UWP and iOS may call core methods
from another threads. Since core is not thread-safe,
we provide OPENVPN_ASYNC_HANDLER macro which instantiates
lock guard. It follows RAII principle and locks global
mutex in constructor and unlocks in destructor. This
guarantees that code in block protected with this macro
won't be called simultaneously from different threads.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-06-07 21:17:42 +03:00
James Yonan
a8e9605f15 ClientAPI::OpenVPNClient: fixed erroneous comment
Signed-off-by: James Yonan <james@openvpn.net>
2018-05-21 11:34:01 +03:00
James Yonan
b7075014a4 RemoteOverride: handle exceptions thrown from virtual remote_override() method
Signed-off-by: James Yonan <james@openvpn.net>
2018-05-21 11:34:01 +03:00
Lev Stipakov
3e49de7dea [OVPN3-210] ovpncli: handle "allow-name-constraints" for OpenSSL
This is mbedTLS-only option, which has no effect on OpenSSL-built client.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-04-19 11:11:39 +03:00
James Yonan
68595de4d1
ClientAPI::RemoteOverride: added error status
RemoteOverride agent can now return an error status.

Signed-off-by: James Yonan <james@openvpn.net>
2018-03-26 23:58:35 +08:00
James Yonan
01ee1f5a41
Added ClientAPI::Config::retryOnAuthFailed parameter
// If true, consider AUTH_FAILED to be a non-fatal error,
  // and retry the connection after a pause.
  bool retryOnAuthFailed = false;

Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:33 +08:00
David Sommerseth
16b10559f2 [OVPN3-140] Update company names in copyrights
OpenVPN Technologies, Inc. change their name to OpenVPN Inc. during the
autumn of 2017.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
David Sommerseth
6caca2c313 [OVPN3-140] Relicense back to AGPLv3
This is essentially a revert of commit 04b2a3c9b7 and commit
ef42e59e05.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
James Yonan
121e9752e7 client API: added portOverride
portOverride, like serverOverride, will override the port used
in the remote directive of the profile.

Signed-off-by: James Yonan <james@openvpn.net>
2017-12-22 17:59:38 +08:00
Lev Stipakov
6365d26b31 transport: external factory
Provide ExternalTransport::Factory interface to enable client instantiate transport factory.

OVPN3-92

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:38 +08:00
Lev Stipakov
2ffa0c9e36 transport: synchronous DNS lookup
Add config option to enable synchronous DNS lookup.

OVPN3-76

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:38 +08:00
James Yonan
d496311ade ovpncli.hpp: inline LogInfo constructor for clarity
Signed-off-by: James Yonan <james@openvpn.net>
2017-09-27 16:16:18 +08:00
Lev Stipakov
96e0d89454 Revert "Merged in OVPN3-21-prepend-log-record-with-unique- (pull request #7)"
This reverts commit 62423c91cb, reversing
changes made to f26b08b6ef.
2017-09-27 16:16:18 +08:00
Lev Stipakov
cce245587b Prepend log string with unique reference.
OVPN3-21

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-08 11:35:37 +03:00
James Yonan
3ba37fcb91 OpenVPN 3 client: added OPENVPN_OVPNCLI_ASYNC_SETUP flag.
Added OPENVPN_OVPNCLI_ASYNC_SETUP flag, which causes most
of ClientAPI::OpenVPNClient::connect() setup to run as an
openvpn_io::post() handler.  This is potentially useful in
i/o layer implementations to guarantee sequenced execution
of core setup and handlers.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-17 23:28:36 -06:00
James Yonan
4095565b4d OpenVPN 3 client: added tun abstraction layer.
To enable, #define OPENVPN_EXTERNAL_TUN_FACTORY

Then add override in your client class (that derives from
ClientAPI::OpenVPNClient):

  virtual TunClientFactory* new_tun_factory(const ExternalTun::Config& conf, const OptionList& opt) override
  {
    ...
  }

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-13 13:28:34 -06:00
James Yonan
f89da9619e OpenVPN 3 client: added single-thread mode:
* enabled by OPENVPN_OVPNCLI_SINGLE_THREAD compile flag.

* turns off the signal blocker.

* Adds overrideable clock_tick() virtual method with
  configurable frequency that is used when processing
  signals when the OpenVPN client is running in
  single-thread mode.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 12:37:41 -06:00
James Yonan
233dfde2c2 OpenVPN 3 client: fixed state->session typos.
Fixed some minor typos where state->session was used even
though a direct pointer to session was available.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 12:35:57 -06:00
James Yonan
691a641a43 Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

The basic approach is to rename all references to asio::xxx
types to openvpn_io::xxx and then make openvpn_io a
preprocessor variable that points to the top-level namespace
of the i/o reactor implementation.

All of the source files that currently include <asio.hpp> now
include <openvpn/io/io.hpp> instead:

This gives us a lightweight abstraction layer that allows us
to define openvpn_io to be something other than asio.

Other changes:

* Inclusion of asio by scripts/build is now optional, and is
  enabled by passing ASIO=1 or ASIO_DIR=<dir>.

* Refactored openvpn/common/socktypes.hpp to no longer
  require asio.

* Refactored openvpn/log/logthread.hpp to no longer require
  asio.

* Added openvpn::get_hostname() method as alternative to
  calling asio directly.

* openvpn/openssl/util/init.hpp will now #error
  if USE_ASIO is undefined.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-30 15:48:14 -06:00
James Yonan
2855053680 Moved asio files from openvpn/common to openvpn/asio
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-30 15:48:14 -06:00
James Yonan
b2cd82a5bf copyright: updated to 2017.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 13:11:09 -06:00
James Yonan
fc85b371ab logging: removed #ifdef OPENVPN_INSTRUMENTATION, and made
the previously conditional code always included.
2017-03-18 12:24:54 -06:00
James Yonan
88ae6eba36 SSL : added tls-cert-profile directive for mbedTLS.
legacy            -- allow 1024-bit RSA certs signed with SHA1
preferred         -- require at least 2048-bit RSA certs signed
                     with SHA256 or higher
suiteb            -- require NSA Suite-B

The current default is legacy.

The directive can be set in the profile or overridden/defaulted
in the client API via ClientAPI::Config::tlsCertProfileOverride
var.

TODO: implement for OpenSSL.
2017-03-18 12:24:54 -06:00
James Yonan
050e8717f1 mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (symbol renames)
This patch renames internal OpenVPN 3 symbols
from polarssl -> mbedtls.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 12:24:54 -06:00
James Yonan
a6b7cf458f mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (functional)
This patch builds on work by David Sommerseth <davids@openvpn.net>
to move the PolarSSL API from polarssl-1.3 to mbedtls-2.3, which
has significant differences in some areas.

- Strings containing keys, certificates, CRLs, and DH parameters
  need to be NULL-terminated and the length argument provided to
  the corresponding mbedtls parse function must be able to read
  the NULL-terminator.  These places have been modified with a
  '+1' to the length argument (x509cert.hpp, x509crl.hpp, dh.hpp,
  pkctx.hpp).

- The SSL context object has been split up in mbedtls-2.3
  Now many of the SSL configurations are done in a separate
  SSL config object, which is added to the SSL context once
  configured.  In addition private/public keys are now stored
  in a separate pk_context, which is later on attached to the
  SSL context.  Due to this, many of the calls setting either
  SSL configuration parameters or working with pk_contexts have
  been refactored.  (sslctx.hpp)

- The older API loading the CA chain took a hostname argument.
  The new API requires mbedtls_ssl_set_hostname() explicitly to
  be called setting hostname.  Some refactoring was needed here
  too (sslctx.hpp).

- x509_oid_get_description() is now replaced by
  mbedtls_oid_get_extended_key_usage().

- when mbedTLS renamed OID_CMP to MBEDTLS_OID_CMP, the return
  value was changed so that a return value of 0 now means equal
  rather than not-equal.

- mbedtls/platform.h must be loaded before any other mbedtls
  include files (sslchoose.hpp).

- All functions and macros related to mbedTLS are now prefixed
  with mbedtls_/MBEDTLS_

- Refactored External PKI and added some options to cli.cpp
  to make it easier to test that the feature still works
  correctly.  This included removing the sig_type var and
  standardizing on a PKCS#1 digest prefix per RFC 3447.

- Updated test keys to 2048 bits.

- Updated dependency build scripts to build mbedTLS.

- Enable MD4 in mbedTLS build script (needed for NTLM auth).

- Use an allow-all X509 cert profile to preserve compatibility
  with older configs.  Going forward, we will implement new
  options to increase strictness on minimum RSA key size and
  required cert signing algs.

- Added human-readable reason strings that explain why
  a given cert in the chain wasn't accepted.

- This patch doesn't rename any files or rename internal
  OpenVPN 3 symbols such as PolarSSLContext.  This will
  be done in a separate commit.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 12:24:54 -06:00
James Yonan
24c64593ed OpenVPN 3 client : check that state->session is non-NULL
before calling dont_restart().  Not doing so can potentially
cause a segfault.
2017-03-18 12:24:54 -06:00
James Yonan
8c3c763789 protocol : allow client UI to post client -> server control
channel messages using the new

  ClientAPI::OpenVPNClient::post_cc_msg()

method:

  // post control channel message
  void post_cc_msg(const std::string& msg);
2017-03-18 12:24:54 -06:00
James Yonan
3874a30818 ovpncli.hpp : use C++11 move semantics for KeyValue
constructor.
2017-03-18 12:24:54 -06:00
Samuli Seppänen
04b2a3c9b7 Switch from AGPLv3 to GPLv3
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
2017-03-16 14:43:55 +02:00
James Yonan
04e53e913c Windows client : fixed issue that can cause a GPF crash on
disconnect.

In ~ClientState() (ovpncli.cpp) added session.reset() to
ensure that ClientConnect object is fully destroyed before
the asio::io_context object.  Not doing so can cause a
crash on Windows.
2016-09-23 14:32:48 -06:00
James Yonan
92aed81852 DCO : provide a mechanism for client to provide accurate
bandwidth stats when underlying data channel is offloaded.
2016-09-06 11:31:57 -06:00
James Yonan
971abda88f copyright : updated to 2016 2016-09-03 23:29:23 -06:00
James Yonan
15cbd87b79 PolarSSL : for PolarSSL debug level, be sure to match on
USE_POLARSSL_APPLE_HYBRID as well as USE_POLARSSL and
include <polarssl/debug.h> for debug_set_threshold().
2016-08-05 00:57:21 -06:00
James Yonan
899fa6c4bc ovpn3 client API : added sslDebugLevel parameter to control
the logging level of the underlying SSL library.
2016-08-04 20:43:43 -06:00
James Yonan
8d8f68e9cb ovpn3 client : added new Stop object async_stop_global to
differentiate between local and global stop control.
2016-07-12 22:06:12 -07:00
James Yonan
b2576fd5c7 ovpn3 client API : added "Remote Override", where API users
can provide a callback to return "remote" directive data
that overrides the "remote" directives in the config
file.

  // Remote override callback (disabled by default).
  virtual bool remote_override_enabled();
  virtual void remote_override(RemoteOverride&);
2016-07-02 01:00:09 -06:00
James Yonan
b054835a44 ovpn3 client : fixed recent regression that can cause
segfault in ClientAPI::Private::ClientState destructor.
2016-06-30 00:15:31 -06:00
James Yonan
ca5205b4f3 random : consolidate random functionality in RandomAPI. 2016-06-28 22:31:17 -06:00
James Yonan
eed7408a81 ovpn3 client API : significant reworking of
ClientAPI::Private::ClientState in ovpncli.cpp to enhance
thread-safety in corner cases.

An async stop object (Stop*) can now be used as a triggering
event for disconnect.  Further, C++ API clients can now
overload OpenVPNClient::get_async_stop() to provide their
own Stop object.
2016-06-26 23:00:37 -06:00
James Yonan
aa06a990f0 ovpn3 client API : Use C++11 semantics to disable default
copy/assignment methods in ClientAPI::OpenVPNClient
2016-06-26 22:58:23 -06:00
James Yonan
e358a1d800 ovpn3 client API : In ClientAPI::OpenVPNClient, hide
protected methods/data from SWIG.
2016-06-26 22:57:36 -06:00
James Yonan
3a10e4c7b9 ovpn3 client API : ClientAPI::LogInfo constructor now does
a direct std::move of argument string rather than passing
string first through Unicode::utf8_printable.
2016-06-26 22:55:01 -06:00
James Yonan
801718c462 ovpn3 client API : added OPENVPN_NORESET_TIME preprocessor
flag to omit the call to Time::reset_base_conditional()
2016-06-26 22:53:05 -06:00
James Yonan
c847135870 ovpn3 client API : added VPN gateway (IPv4 and IPv6) to
ClientAPI::ConnectionInfo object returned by
ClientAPI::OpenVPNClient::connection_info()
2016-06-26 22:23:08 -06:00
James Yonan
877c7ef215 ClientEvent : Use C++11 rvalue/move semantics in client
event handling.
2016-05-10 21:26:34 -06:00
James Yonan
2f1fd1ad83 Added INFO notification to OpenVPN control channel protocol:
INFO,<payload>

Payload can be any UTF-8 printable string under 64 KB
(multiple lines are okay).

INFO notifications can be sent from server to client
in real-time, on any active client connection.

The client will attach the payload to an INFO event and
forward it to the controlling app via the event callback:

  virtual void event(const Event&) = 0;
2016-05-10 17:53:09 -06:00
James Yonan
2255bab03a OpenVPN protocol core : added logic to control channel
receive path to reassemble messages fragmented by the
SSL layer up to a max message size of 64 KB.

Ramifications:

* Peer info data and pushed options can be significantly
  larger (i.e. approaching 64 KB).

* Less need for the options continuation feature.

Limitations:

* While this patch doesn't change the underlying OpenVPN
  protocol, it can result in messages being sent that are
  fragmented by the receiving SSL implementation into
  multiple buffers.  Implementations that lack reassembly
  capabilities (such as OpenVPN 2.x at this point in time)
  would see each buffer fragment as a separate message.

* This patch running on the server will break negotiation
  with pre-peer-info clients.  Basically this means it will
  interoperate with any OpenVPN 3 version or OpenVPN 2.x
  version that includes the June 2010 commit "Implemented a
  key/value auth channel from client to server.
  Version 2.1.1i".
2016-05-09 21:39:04 -06:00
James Yonan
d4eb2ff742 ovpncli.hpp : ClientAPI::LogReceiver should have a virtual
destructor.
2016-05-07 15:16:05 -06:00
James Yonan
6965eade7a class Protocol : add enum for client/server suffix. 2016-05-05 00:13:43 -06:00
James Yonan
c353679380 ovpncli api : set autologinSessions to true by default. 2016-04-14 12:29:04 -06:00
James Yonan
86d7729794 clievent : distinguish between 3 event categories
(instead of 2):

(a) ordinary events such as CONNECTING, CONNECTED,
(b) nonfatal errors such as TRANSPORT_ERROR that will
    automatically trigger a reconnect, and
(c) fatal errors such as AUTH_FAILED, that will be followed
    by a DISCONNECT

In ClientAPI::Event, added a new "fatal" boolean to indicate
when errors are fatal.

Added a new non-fatal event TUN_ERROR that triggers a
reconnect when errors are indicated in tunio.hpp.
2016-03-31 20:24:28 -06:00
James Yonan
c280a4fee2 ovpn3 client : added support for pushed "echo" directives
to be transmitted to app via event channel using new ECHO
event.
2016-03-28 00:31:35 -06:00
James Yonan
683404c9ab ovpncli : in EvalConfig, return info about the first
remote item in config.
2016-03-28 00:29:16 -06:00
James Yonan
279159d2e0 ovpncli : in ExternalPKISignRequest comments, added missing
"client reads" note for sigType.
2016-03-28 00:18:59 -06:00
James Yonan
5b291d1e06 ovpncli : in ExternalPKIRequestBase, use C++11 member
initializers.
2016-03-28 00:18:03 -06:00
James Yonan
a31404d6d5 ovpncli : added default constructor for ClientAPI::LogInfo. 2016-03-28 00:16:18 -06:00
James Yonan
f7eb16ecff ovpncli : in process_epki_cert_chain(), if req.cert is empty,
allow cert defined in config file to take precedence.
2016-03-28 00:12:53 -06:00
James Yonan
cc2f149cc5 ovpncli : abstract log receiver to class LogReceiver. 2016-03-15 15:02:01 -06:00
James Yonan
8c1e33b82d Added OPENVPN_DEBUG_PROTO_DUMP build flag to dump protocol
layer packets in hex.
2016-02-07 07:37:17 -07:00
James Yonan
2b42b96312 Added IPv6 setting to ovpn3 client API via
ClientAPI::Config::ipv6 string:

  IPv6 preference
    no      -- disable IPv6, so tunnel will be IPv4-only
    yes     -- request combined IPv4/IPv6 tunnel
    default (or empty string) -- leave decision to server
2016-02-05 12:16:20 -07:00
James Yonan
426eb9d671 Autologin Sessions are now enabled via the client API
bool ClientAPI::Config::autologinSessions and default
to false.  Previously, the logic was hardcoded to true.

Autologin Sessions can be enabled in the cli.cpp wrapper
using the -a flag.
2016-02-04 11:39:44 -07:00
James Yonan
0cf2189953 Converted ovpn3 client configuration structs over to
C++11 member initializers.
2016-02-03 16:30:02 -07:00
James Yonan
cbb00f848a Removed an erroneous comment in ovpncli.hpp about tunPersist
not working on iOS (it does).
2016-01-28 22:11:57 -07:00
James Yonan
e3be7b998b Added gremlin option to client, controllable via
ClientAPI::Config::gremlinConfig string.

The gremlin option allows extra packet latency
or unreliability to be added to the tunnel.

The format of the option is a comma-separated list
of numerical parameters:

  send_delay_ms, recv_delay_ms, send_drop_prob, recv_drop_prob

Parameter description:

  send_delay_ms  : delay packets by n milliseconds before
                   transmission (UDP/TCP).
  recv_delay_ms  : delay received packets by n milliseconds
                   before processing them (UDP/TCP).
  send_drop_prob : drop sent packets with probability 1/n
                   (UDP only).
  recv_drop_prob : drop received packets with probability
                   1/n (UDP only).

Set any parameter to 0 to disable.

Gremlin parameters currently work with UDP and TCP
transport as documented above, but not for proxy transport.

Client must be built with the OPENVPN_GREMLIN flag to compile
gremlin functionality.

Command-line client can set the gremlin config
string using --gremlin or -G, for example:

  --gremlin=250,250,64,64

When using the above parameters, an extra 500 milliseconds
will be added to round-trip latency, and 1/64 sent or
received packets will be dropped.
2016-01-26 00:27:11 -07:00
James Yonan
e29393ec18 In client/ovpncli.cpp, make sure not to instantiate Log::Context
unless both logthread.hpp was included and logbase.hpp was NOT
included.

This change allows loggers other than
ClientAPI::OpenVPNClient::log() to be used with ovpn3 core.
2015-11-25 11:26:55 -07:00
James Yonan
7d308985db Added #include <asio.hpp> to client/ovpncli.cpp. 2015-11-24 19:33:08 -07:00
James Yonan
0609c76c0b Refactored Mac OS X tun handler (tuncli.hpp) by moving tun
interface management code into TunMac::Setup()
(tunsetup.hpp).

Added TunBuilderSetup::Config, Base, and Factory for use
as a unix-portable abstraction layer for tun interface
management code.

Added Stop object pointer to Mac OS X tun config
(TunMac::ClientConfig), so that tun management code can
detect stop commands if it's blocking outside of outer
asio::io_context.
2015-11-20 19:16:39 -07:00
James Yonan
a9ed9d47f2 ovpn3 client API now supports adding user-defined peer-info
data to the OpenVPN handshake (peer-info is a client -> server
key/value list that is part of the OpenVPN protocol).  To
add peer-info key/value pairs, use ClientAPI::Config::peerInfo.

Incremented core OPENVPN_VERSION to "3.0.6".
2015-09-21 19:42:24 -07:00
James Yonan
16bde170c0 Don't use deprecated asio features. 2015-06-30 00:05:37 -06:00
James Yonan
c4ea9e90ca Forgot to initialize recently-added ClientAPI::Config::dco
to false.
2015-06-28 02:10:50 -06:00
James Yonan
5bfa1fc310 Added "DCO" to OpenVPNClient::platform() string when a DCO
provider is enabled.
2015-06-18 14:37:12 -06:00
James Yonan
496e797a21 Added client hooks for DCO (Data Channel offload).
Updated tun implementation on Linux.
2015-06-17 01:48:33 -06:00
James Yonan
142bcb0c44 OpenVPNClient::platform() method now returns
core build timestamp.
2015-06-07 00:52:02 -06:00
James Yonan
c6a21c827b Boost dependency elimination -- final removal of Boost
dependency.  Asio is now included as a standalone,
header-only dependency.
2015-06-06 10:59:18 -06:00
James Yonan
d466fb6cce Boost dependency elimination -- removed BOOST_DISABLE_ASSERTS 2015-06-05 00:47:54 -06:00
James Yonan
b75c780cab Renamed boost::intrusive_ptr<T> usage to RCPtr<T>. 2015-05-17 21:26:53 -06:00
James Yonan
35ac9f6229 Renamed types.hpp to size.hpp since it now only defines
size_t and ssize_t.
2015-05-17 13:27:34 -06:00
James Yonan
e494846f7d Moved count_t to its own header file. 2015-05-17 13:17:24 -06:00
James Yonan
fe6fcefa61 C++11 : rename NULL to nullptr 2015-05-17 02:53:37 -06:00
James Yonan
68b8f12b25 Refactored ScopedPtr usage to std::unique_ptr.
Removed ScopedPtr.
2015-05-17 01:41:16 -06:00
James Yonan
e4c2ab6c71 In cli.cpp, improve dynamic challenge/response support.
In client API, allow ClientAPI::ProvideCreds::dynamicChallengeCookie
to be set with either the dynamic challenge/response State ID
or the full cookie.
2015-05-10 15:39:57 -06:00
James Yonan
17057f5dc7 OpenVPN 3 client now supports compile-time overriding of
tun factory using OPENVPN_CUSTOM_TUN_FACTORY.
2015-04-15 22:31:22 -06:00
James Yonan
70d858aeec In client/ovpncli.cpp, allow ClientAPI::MySessionStats and
ClientAPI::MyClientEvents to be subclassed.
2015-04-13 23:42:23 -06:00
James Yonan
62b52557f5 Refactored OpenVPNClient::connect() to make it easier for
derived classes to modify behavior.
2015-04-12 11:27:58 -06:00
James Yonan
896347aabd For testing purposes, allow includer of ovpncli.cpp to define
their own OPENVPN_LOG() and OPENVPN_LOG_NTNL() methods to
override log macros in <openvpn/log/logthread.hpp>.
2015-04-10 23:50:07 -06:00
James Yonan
2ca397b513 Core: #define BOOST_DISABLE_ASSERTS because boost asserts on
null smart pointer dereferences are fairly useless
since a segfault will generate more actionable debug info.
2015-04-10 23:48:24 -06:00
James Yonan
8a983e730f When PRIVATE_TUNNEL_PROXY is enabled, append PT_PROXY
to the OpenVPNClient::platform() string.
2015-03-08 12:34:50 -07:00
James Yonan
8f4b17ce6a Add extension parameter to ProfileMerge constructor to allow
parsing of files with non-ovpn extensions.
2015-02-10 15:48:08 -07:00
James Yonan
5c31950852 Added TLS version min override parameter to ClientAPI::Config:
// Override the minimum TLS version:
  //   disabled -- don't specify a minimum, and disable any minimum
  //               specified in profile
  //   default or ""  -- use profile minimum
  //   tls_1_0  -- use TLS 1.0 minimum (overrides profile)
  //   tls_1_1  -- use TLS 1.1 minimum (overrides profile)
  //   tls_1_2  -- use TLS 1.2 minimum (overrides profile)
  std::string tlsVersionMinOverride;
2015-02-04 20:29:43 -07:00
James Yonan
557df02296 Added AltProxy API that allows for alternative proxy implementations
to be developed outside the core.
2015-02-02 23:11:51 -07:00
James Yonan
d4af03c205 Extended follow_references parameter of ProfileMerge class to allow
for full reference following (e.g. cert ssl/serv.crt) as is helpful
in server-side environments.
2015-01-19 14:30:37 -07:00