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

1277 Commits

Author SHA1 Message Date
James Yonan
2e06d3a367 Option : exception-proof Option::printable_directive() 2016-03-28 00:00:25 -06:00
James Yonan
5b35f09ff2 platform_string() : added app_version parameter. 2016-03-27 23:57:36 -06:00
James Yonan
806185505c timestr : added Windows implementation for
std::string date_time(const time_t now).
2016-03-27 23:56:02 -06:00
James Yonan
8a90f0bd79 string:
* Added ends_with() method to test for trailing char.

* Added add_trailing_crlf() methods.
2016-03-27 23:49:38 -06:00
James Yonan
6b1c45f37b Updated linux build system to GCC-5. 2016-03-19 02:02:10 -06:00
James Yonan
40e6e1440c Dependency updates:
mbedtls-1.3.16
  openssl-1.0.2g
2016-03-19 02:01:05 -06:00
James Yonan
081925f81b Removed gok script. 2016-03-19 02:00:26 -06:00
James Yonan
d9f2e992a0 linux tuncli : added enable_routes parameter to tun_config()
to allow caller to choose whether or not to process routes.
2016-03-19 01:56:06 -06:00
James Yonan
46d6bdecf3 ovpn3 client : throw an option error if "trunk-table"
directive is given.
2016-03-19 01:54:47 -06:00
James Yonan
59c6f3d43a Added string::is_alpha() method. 2016-03-19 01:50:09 -06:00
James Yonan
ea935109b9 SplitLines: added default values for max_line_len and trim. 2016-03-19 01:48:34 -06:00
James Yonan
63f45f0dbc process: added move-aware Command(Argv) constructor. 2016-03-19 01:47:18 -06:00
James Yonan
55011e4a9d Added ActionList::to_string() method. 2016-03-19 01:46:25 -06:00
James Yonan
1a9ad56946 RedirectStd : in constructor, allow in_fn to be empty to
not redirect stdin.
2016-03-15 15:07:22 -06:00
James Yonan
6d59eea0fb Added optional title string to platform_string() method. 2016-03-15 15:06:08 -06:00
James Yonan
ec879a1a1d Added OptionList::parse_option_from_line() method. 2016-03-15 15:04:18 -06:00
James Yonan
c01506670f asiopolysock : added is_open() method. 2016-03-15 15:03:46 -06:00
James Yonan
cc2f149cc5 ovpncli : abstract log receiver to class LogReceiver. 2016-03-15 15:02:01 -06:00
James Yonan
7d4bebca25 Added string::is_ctrl() and string::contains_non_space_ctrl()
methods.
2016-03-14 17:14:24 -06:00
James Yonan
f950741131 Added read_stdin() method. 2016-03-14 17:13:19 -06:00
James Yonan
a7ba46e6f7 In PThreadBarrier, allow late-setting of limit after
construction by using using new set_limit() method.
2016-03-14 00:12:51 -06:00
James Yonan
e3e903c3b6 Separated out class HashString from HTTPProxy::Digest, making
it standalone for use by other code.
2016-03-08 13:16:52 -07:00
James Yonan
1e907bc0e6 In file_exists(), if filename is the empty string,
return false before calling stat().
2016-03-08 12:59:09 -07:00
James Yonan
01a4dba328 Added OptionList::parse_from_argv_static() method for parsing
argv-style command-line.
2016-03-02 00:53:01 -07:00
James Yonan
ebf6713c77 Incremented OpenVPN core version to 3.0.10. 2016-03-02 00:31:18 -07:00
James Yonan
b8d53e88fc Win core : modify the previous commit by only enabling
WFP on Windows 8 or greater.  This is done because
Windows Vista and 7 depend on the adapter binding
order for DNS routing, and using WFP might cause
DNS failures if the local interface has a higher
binding order than the TAP adapter.
2016-03-02 00:23:34 -07:00
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
James Yonan
502910e472 Added missing include <openvpn/common/action.hpp> to
wfp.hpp since we are inheriting from class Action.
2016-02-24 23:44:12 -07:00
James Yonan
1ed095c719 Minor Win edit: forgot to add leading "::" before
::wcslen() call in openvpn/win/unicode.hpp.
2016-02-24 23:42:17 -07:00
James Yonan
4d42ff8b0e Added wstring::pack_string_vector() method.
Also added forgotten "inline" qualifiers to
all wstring.hpp methods.
2016-02-24 23:39:41 -07:00
James Yonan
13b2945d8c Added string::join() method. 2016-02-24 23:38:55 -07:00
James Yonan
ffe9de466f Windows Vista requires slightly different syntax
for the

  netsh interface ip set|delete dnsservers ...

command.

Patch by David Nimon.
2016-02-24 12:42:57 -07:00
James Yonan
6b79923ccf Win client: Modifed WFP rules to be more aggressive in
preventing DNS leakage.

  Filter #1 -- permit IPv4 DNS requests from OpenVPN app
  Filter #2 -- permit IPv6 DNS requests from OpenVPN app
  Filter #3 -- block IPv4 DNS requests from other apps
  Filter #4 -- block IPv6 DNS requests from other apps
  Filter #5 -- allow IPv4 traffic from TAP
  Filter #6 -- allow IPv6 traffic from TAP

This change has the unfortunate side-effect of causing
lags in DNS resolution, so for now the capability is
disabled in tunsetup.hpp, pending evaluation of
NRPT-based approaches.
2016-02-24 12:14:44 -07:00
James Yonan
c97503c4f8 Incremented ovpn3 client core version to 3.0.9. 2016-02-22 14:36:09 -07:00
James Yonan
c05cbaf46a Fixed bug in base64 encode when std::string containing UTF-8
chars is passed to this template method:

    template <typename V>
    std::string encode(const V& data) const

The problem is that references to data[] were failing to
cast the value to unsigned char, so UTF-8 chars >= 0x80
were being interpreted as negative values.
2016-02-22 14:26:07 -07:00
James Yonan
7a17151992 Added dump_hex(const std::string&) method. 2016-02-22 14:22:14 -07: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
53453bd7af Incremented client API version to 3.0.8. 2016-02-05 12:20:56 -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
afc1a40d00 Added PeerInfo::Set::copy() method. 2016-02-05 12:13:47 -07:00
James Yonan
4a00d11a4a OptionList::extend(other, name) now returns the number
of elements processed.
2016-02-05 12:11:08 -07:00
James Yonan
93913a3479 class Option -- provide a vararg constructor. 2016-02-05 12:09:37 -07:00
James Yonan
ff3da3c759 class Layer -- make operator==() and operator!=() const. 2016-02-05 12:05:38 -07:00
James Yonan
cbff1f82fa Updated ProtoContext::Config to use C++11 member
initializers.
2016-02-04 20:55:28 -07:00
James Yonan
acf59d7600 Added request_ipv6 bool to VPNServerPool acquire() methods. 2016-02-04 15:53:46 -07:00
James Yonan
f9592e17fc In ServerPushList:
* added to_option_list()
* renamed output() to output_csv()
* use C++11 iterators
2016-02-04 15:51:06 -07:00
James Yonan
e42250c2f8 In client, when logging IP:port pairs, bracket the IP to
avoid confusion with IPv6.
2016-02-04 15:48:33 -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
c4293d43c8 Autologin Session fix: client core will now set the password
to "auth-token-request" to request the server to issue an
Autologin Session.

ClientCreds::set_session_id() now also accepts a username
argument, since the combination of username/token-id
defines the session.
2016-02-04 11:31:08 -07:00
James Yonan
529912629a In AuthCreds, added is_valid_user_pass() and refactored
is_valid() in terms of it.
2016-02-04 11:22:11 -07:00