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

1191 Commits

Author SHA1 Message Date
James Yonan
fad49b2059 Linux : Added class LinuxRoute for adding/deleting
routes on Linux using AF_NETLINK socket.
2017-03-18 12:24:54 -06:00
James Yonan
6cb6715505 linux netconf : deleted obsolete file. 2017-03-18 12:24:54 -06:00
James Yonan
3b57e1995e IP::Addr : added family(), size_bytes(), and
to_byte_string_variable() methods.
2017-03-18 12:19:39 -06:00
James Yonan
b862ca8ff8 library : moved class Environ into its own source file and
added find_static() method.
2017-03-18 12:19:39 -06:00
James Yonan
7ed4902ef1 OpenSSL : added !MD5:!SSLv2 to SSL_CTX_set_cipher_list()
cipher string.
2017-03-18 12:19:39 -06:00
James Yonan
6c3f35219c linux : Added class LinuxGW to find default gateways on
Linux using ip route command.
2017-03-18 12:19:39 -06:00
James Yonan
053bb3fc6f VPNServerNetblock : added contains() and netblock_contains()
methods.
2017-03-18 12:19:39 -06:00
James Yonan
650760e0a8 route : in template RouteType, add contains() method and
use C++11 iterators.
2017-03-18 12:19:39 -06:00
James Yonan
32d1b9d714 ServerPushList : optimize reserve() call in parse() method,
and add extend() method.
2017-03-18 12:19:39 -06:00
James Yonan
1c302cde29 manage : in set_acl_id(), change type of acl_id from
unsigned int to int.
2017-03-18 12:19:39 -06:00
James Yonan
607799404a IP::Addr : added is_ipv6() method. 2017-03-18 12:19:39 -06:00
James Yonan
a2367c5f4d process : added Environ::assign() method. 2017-03-18 12:19:39 -06:00
James Yonan
5d52181cbe runcontext : trigger async_stop before thread join(). 2017-03-18 12:19:39 -06:00
James Yonan
679a8fa5ea IP::Addr : added is_loopback(). 2017-03-18 12:19:39 -06:00
James Yonan
f3ff7c5304 IP::Addr : added version_index(). 2017-03-18 12:19:39 -06:00
James Yonan
85b49d89b5 TempFile : added additional methods including reset(),
truncate(), read(), and set_delete().

Added buf_read() methods to read from a file descriptor
into a Buffer.
2017-03-18 12:19:39 -06:00
James Yonan
184c6d672b redir.hpp : break out pipe i/o into its own source file. 2017-03-18 12:19:39 -06:00
James Yonan
74e05d8607 library : added class RedirectNull for redirecting stdin,
stdout, and stderr to /dev/null
2017-03-18 12:19:39 -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
883d967bae Incremented core version to 3.1.1 2016-09-23 16:46:24 -06:00
James Yonan
914cb0f906 client core : added MAC address reporting on Windows and Mac.
When "setenv PUSH_PEER_INFO" or "push-peer-info" is present
in client config, push the MAC address of the interface
owning the default route to the server via IV_HWADDR.
2016-09-23 16:33:04 -06:00
James Yonan
cf8d5b5c3f Incremented core version to 3.1.0 2016-09-16 04:16:40 +03: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
07d37b0016 DCO : added explicit_exit_notify() client hook. 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
3fd2c451f5 Incremented core version to 3.0.21 2016-09-02 12:57:51 -06:00
James Yonan
79013381dc events : in client core, delay transmission of "Connected"
event to the last possible moment to avoid premature
trigger of post-connect events.
2016-09-02 12:52:21 -06:00
James Yonan
662bf7833e ovpn3 core : Added automatic data limits for Blowfish,
Triple DES, and other 64-bit block-size ciphers vulnerable
to "Sweet32" birthday attack (CVE-2016-6329).  Limit such
cipher keys to no more than 64 MB of data
encrypted/decrypted.  While our overall goal is to limit
data-limited keys to 64 MB, we trigger a renegotiation
at 48 MB to compensate for possible delays in renegotiation
and rollover to the new key.

This client-side implementation extends data limit
protection to the entire session, even when the server
doesn't implement data limits.

This capability is advertised to servers via the a
peer info setting:

  IV_BS64DL=1

meaning "Block-Size 64-bit Data Limit".  The "1" indicates
the implementation version.

The implementation currently has some limitations:

* Keys are renegotiated at a maximum rate of once per
  5 seconds to reduce the likelihood of loss of
  synchronization between peers.

* The maximum renegotiation rate may be further extended
  if the peer delays rollover from the old to new key
  after renegotiation.

Added N_KEY_LIMIT_RENEG stats counter to count the number
of data-limit-triggered renegotiations.

Added new stats counter KEY_STATE_ERROR which roughly
corresponds to the OpenVPN 2.x error "TLS Error:
local/remote TLS keys are out of sync".

Prevously, the TLS ack/retransmit timeout was hardcoded to
2 seconds.  Now we lower the default to 1 second and make
it variable using the (pushable) "tls-timeout" directive.
Additionally, the tls-timeout directive can be specified
in milliseconds instead of seconds by using the
"tls-timeout-ms" form of the directive.

Made the "become primary" time duration configurable via
the (pushable) "become-primary" directive which accepts
a number-of-seconds parameter.  become-primary indicates
the time delay between renegotiation and rollover to the
new key for encryption/transmission.  become-primary
defaults to the handshake-window which in turn defaults
to 60 seconds.

Incremented core version to 3.0.20.
2016-09-01 15:19:00 -06:00
James Yonan
26d0169055 time : Added Time::Duration::operator*(unsigned int) for
multiplying time durations.
2016-08-24 06:22:03 -06:00
James Yonan
636cd863ed ovpn3 SSL core: added rekey(CryptoDCInstance::NEW_SECONDARY)
method/type for initializing secondary key after a soft
renegotiation.
2016-08-23 19:36:24 -07:00
James Yonan
44813d7c6f core version : incremented to 3.0.19 2016-08-17 15:31:07 -06:00
James Yonan
8b41f8739e INFO message : buffer INFO control-channel messages received
near Connected event to fire one second after Connected
event, to reduce the chance of race conditions in the client
app, if the INFO event triggers the client app to perform an
operation that requires the VPN tunnel to be ready.
2016-08-17 15:23:26 -06:00
James Yonan
81c76484b3 C++11 : use member initializers in cliproto.hpp 2016-08-17 14:30:22 -06:00
James Yonan
5957ab8af1 server APIs : added set_acl_id(), set_fwmark(), and changed
the signature of push_reply().
2016-08-17 11:36:34 -07:00
James Yonan
a9d3f90f86 durhelper.hpp : added load_duration_default() method. 2016-08-17 11:35:52 -07:00
James Yonan
54fdda2ef4 URL::parm : added URL::ParmList::get_value_required()
method.
2016-08-17 11:34:45 -07:00
James Yonan
f3ed986525 URL::parm : trivial fix to return std::string instead of
const std::string.
2016-08-17 11:34:16 -07:00
James Yonan
b88fc41c7b URL::encode : do a speculative reserve() on return string. 2016-08-17 11:33:19 -07:00
James Yonan
96586adff0 Cleanup template : general cleanup including added missing
"inline" and using "typename" instead of "class" in
templates.
2016-08-17 11:32:01 -07:00
James Yonan
a3ecdf3260 route : removed mark as a route-specific property. 2016-08-17 11:31:11 -07:00
James Yonan
f275c66654 OpenSSL : Added class TokenEncrypt for encrypting/decrypting
tokens.
2016-08-17 11:27:36 -07:00
James Yonan
60b734fc34 RemoteList : randomize the list of IP addresses returned by
a DNS lookup.  This requires that RemoteList now owns a
RandomAPI::Ptr, which in turn simplifies the signature of
some other RemoteList methods such as randomize().
2016-08-07 09:31:28 -06:00
James Yonan
8ba7b47c43 RemoteList : removed some cases of address caching that
could occur even if tun_persist is disabled.

In particular, we now consider a set of multiple IP
addresses returned by a single DNS lookup to constitute a
kind of cache.  This helps us to not get stuck on stale
addresses when transitioning between NAT64 and regular
networks.
2016-08-07 01:17:29 -06:00
James Yonan
7e4ce67c8b iOS/Mac network reachability : Reachability and
ReachabilityTracker constructors now provide control over
which subobjects are enabled, i.e. internet and/or wifi.
2016-08-07 01:09:20 -06:00
James Yonan
e711fc70f5 iOS/Mac network reachability : don't contaminate
ReachableViaWiFi result by considering on-demand viability.
2016-08-06 21:12:43 -06:00
James Yonan
ea7cc9efd7 core version : incremented to 3.0.18 2016-08-05 10:57:36 -06:00
James Yonan
98a4643dc3 ovpn3 client : make sure to "touch" setenv directives when
iterating over them, so they don't show up as unused.
2016-08-05 10:11:25 -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
b6b1207eeb C++11 : clang now complains about virtual methods that
override but don't include the "override" annotation,
so add the annotation as needed.
2016-08-03 13:01:44 -06:00