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

85 Commits

Author SHA1 Message Date
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
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
758ac9daa0 Templatized UTF-8 methods such as Unicode::utf8_printable to
work on arbitrary string types (such as upcoming SafeString).
2014-10-30 10:18:30 -06:00
James Yonan
255b71958f Reversed polymorphic ProtoContext performance degradation.
* Performance degradation from recent commit was occurring
  in PRNG.

* Allow RNG to be used in place of PRNG.  For PolarSSL
  at least, this change completely reverses the
  polymorphic ProtoContext performance degradation
  and turns it into a net performance gain.

* Added bool prng to RNG constructors to allow
  the implementation to optimize for PRNG
  (only PolarSSL currently supports this).

Documented different use-cases for RNG vs. PRNG
in ProtoContext:

  RNG -- Random number generator.
  Use-cases demand highest cryptographic strength
  such as key generation.

  PRNG -- Pseudo-random number generator.
  Use-cases demand cryptographic strength
  combined with high performance.  Used for
  IV and ProtoSessionID generation.
2014-10-21 16:45:20 -06:00
James Yonan
2f593bd2eb Added OpenVPNClient::uninit_process() API method that calls
InitProcess::uninit().

In test/ovpncli/cli.cpp, move boost::thread* to higher scope.
2014-08-10 16:44:09 -06:00
James Yonan
2c6d972ad6 Added AGPL copyright/licensing language. 2014-07-20 21:22:06 -06:00
James Yonan
11acfc6ca2 Implemented Mac connection lifecycle monitoring object
(MacLifeCycle).

Monitor connection lifecycle notifications, such as sleep, wakeup,
network-unavailable, and network-available.

Note that not all platforms define a lifecycle object.  Some
platforms such as Android and iOS manage lifecycle notifications at
the service level, and they call pause(), resume(), reconnect(),
etc. as needed using the main ovpncli API.

Also, added a reason string to Pause event.
2014-03-24 17:28:46 -06:00
James Yonan
e3388ff1ec On Mac, create a DNS watchdog thread to monitor for potential changes
to DNS settings by a foreign actor.  If changes are detected,
revert them.
2014-03-24 17:23:17 -06:00
James Yonan
28bf9b2a15 Added full support for OpenVPN 3 on Mac OS X (10.6 and higher)
including DNS and IPv6 support.
2014-02-27 18:34:17 -07:00
James Yonan
b84b48fb75 Ported to Windows.
Implemented full TunClient class for Windows with TAP driver
support.  For now, we use netsh (rather than TAP driver DHCP)
to set all tunnel adapter properties, as this appears to work
great on Windows 7.

IPv6 is fully supported.

Known isues:

* netsh doesn't have a command for adding DNS search domains, so
  we don't support them yet.

* While we always try to remove routes and added properties from
  TAP adapter instance when we close out the session, for robustness,
  when we bring up TAP adapter, we should try to delete any stale
  routes on interface left over from previous session.

* Right now we call netsh with system().  For security and
  compatibility with Windows apps (not only console apps),
  we should use CreateProcess instead.
2014-02-16 01:13:26 -07:00
James Yonan
83e38b15d0 In ovpncli.cpp, provide a definition for OPENVPN_CLIENT_EXPORT
and include ovpncli.hpp for non-__GNUC__ compilers.
2014-02-08 00:13:23 -07:00
James Yonan
d20fb9a47f core: added platform info method to OpenVPN 3 API:
// Returns platform description string
  static std::string platform();
2014-01-14 16:28:29 -07:00
James Yonan
cd5d7bc1e9 Core: handle external PKI signature requests for non-RSA_RAW
signature types internally in the core, so that individual
platforms only see RSA_RAW requests.
2014-01-13 17:13:34 -07:00
James Yonan
b6df43fd88 Core: implemented IV_OPENVPN_GUI_VERSION.
Clients can set via guiVersion string in OpenVPN 3 API.
2014-01-07 11:49:48 -07:00
James Yonan
4e1279fe97 Core API change: External PKI sign requests now specify a signature
type string (sig_type) such as "RSA_RAW" or "RSA_SHA256".

iOS plugin has been modified to support sig_type as well.
2013-12-31 12:37:13 -07:00
James Yonan
6496230177 OpenVPN 1.0.4 build 113 (iOS)
Core: Added forceAesCbcCiphersuites config flag.  When enabled,
the TLS implementation will not set a minimum TLS version for
peer negotiation (even if tls-version-min is specified), but
will instead force one of these two ciphersuites:

1. TLS_DHE_RSA_WITH_AES_256_CBC_SHA, or
2. TLS_DHE_RSA_WITH_AES_128_CBC_SHA

When forceAesCbcCiphersuites is disabled, no explicit set of
ciphersuites will be forced, but the TLS minimum version will
be set to 1.0 or (or higher if tls-version-min is specified).

Also added iOS preference and cli.cpp option to control the
forceAesCbcCiphersuites flag.
2013-12-27 15:16:05 -07:00
James Yonan
1481327d72 OpenVPN 1.0.2 build 98 (iOS)
Ported iOS client and OpenVPN 3 core to ARM-64.
Now building a "fat binary" with Xcode 5.0.1 that
targets arm7, arm7s, and arm64.

Outstanding issues:

* IPv6 doesn't route through tunnel on iOS7
* Client doesn't install on iOS 5.1.1.
2013-11-11 12:33:35 -07:00
James Yonan
002a471b5a Commented-out debug symbol OPENVPN_SHOW_SESSION_TOKEN added. 2013-07-30 21:03:31 +00:00
James Yonan
7fe6fad18a Added crypto self test capability to core.
Added polarssl/bignum-arm.patch to resolve issue where
asm-optimized bignum code would crash on iOS.
2013-06-14 00:34:49 +00:00
James Yonan
cf39be0516 Log unused options, i.e. options specified in config file that were
unrecognized, ignored, or unused.

This behavior is somewhat different (by design) to 2.x branch, which
will raise a fatal exception if an unrecognized option is
encountered.
2013-06-10 00:42:19 +00:00
James Yonan
906584ba3b Support "setenv opt" prefix before directives, where
its presence indicates that the directive is optional,
i.e. if a client doesn't understand the directive, it
should simply ignore it.
2013-06-08 16:10:35 +00:00
James Yonan
d22631f741 For iOS build, added "Live Simulator" build configuration -- this
will build the app as if it was running on the simulator, i.e. with
null tun device, but will build for an actual iOS device.

OPENVPN_SSL_DEBUG defined in ovpncli.cpp is now a debug level and
can be set to an integer value (or 0 to disable).
2013-06-07 21:55:54 +00:00
James Yonan
d3c592c991 For iOS (and other platforms in the future), added the capability
for server to push proxy options, e.g.:

  push "dhcp-option PROXY_HTTP 10.144.5.14 3128"
  push "dhcp-option PROXY_HTTPS 10.144.5.14 3128"
  push "dhcp-option PROXY_BYPASS www.yonan.net staging.openvpn.net"
  push "dhcp-option PROXY_AUTO_CONFIG_URL http://www.yonan.net/proxy.pac"
2013-05-24 20:04:37 +00:00
James Yonan
82be8b0107 packet_id.hpp now logs errors to a SessionStats objects,
like the rest of the core.

Added verbose() method to class SessionStats so that clients can
know whether to pass extra text data to error() virtual method.
2013-05-22 05:13:11 +00:00
James Yonan
de0da474ef Revamp remote-list handling so that DNS names that resolve to
multiple addresses will be treated as if each address was an
individual remote directive.

Fixed issue where UDP transport driver was calling socket
connect method synchronously.  This can cause exceptions
to be thrown in corner cases, such as "No route to host"
on OSX/iOS for connections to IPv6 addresses when no default
IPv6 route exists on system.  Refactoring UDP connect
operation to be asychronous fixes the issue.

Implemented remote-random.
2013-03-12 19:20:37 +00:00
James Yonan
ce8171fff1 Minor fixes related to open-sourcing process. 2013-01-30 20:17:30 +00:00
James Yonan
f8f5d86b2b Android 1.1.9 build 34
* key-direction default can now be set through the ovpncli API,
  but generally defaults to -1 (bidirectional).
2013-01-28 01:11:28 +00:00
James Yonan
dd377281a5 Added cachePassword boolean to ProvideCreds struct in core API.
Separated the functionality of replacePasswordWithSessionID
and cachePassword, and allow them to be used together,
in which case the session ID will be used as the password
until it expires or is invalidated, then the cached
password will be used to reauth.
2013-01-25 02:34:20 +00:00
James Yonan
6c0be1e1c0 iOS: 1.0.1 build 55
Android: 1.1.9 build 31

* Reverted key-direction back to a default of 1.

* Raise fatal error if "fragment" option is used.

* Made TunBuilderCapture more useful as a base class for
  tun construction on various platforms.

* Added disableClientCert flag at ovpncli.hpp API.

* Updated help FAQ with more details on how to
  properly set key-direction, and notes about
  possible network disconnect during voice calls.
2013-01-24 13:34:17 +00:00
James Yonan
b5611c7ac0 Core: add optional state debugging for proto.hpp.
In ovpncli.cpp:

#define OPENVPN_DEBUG_PROTO   2 // enable state debugging if >= 2
2013-01-20 04:18:34 +00:00