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

1300 Commits

Author SHA1 Message Date
James Yonan
8c7af3514e ip : fixed instance of uint32_t being used without
std:: prefix.
2016-04-09 00:49:42 -06:00
James Yonan
5c188343eb Added new method IPv4::Addr::from_bytes_net(). 2016-04-09 00:48:14 -06:00
James Yonan
81b4fa2e52 generic tun : added C++11 override attribute to all
overridden virtual methods in capture.hpp.
2016-04-07 13:58:33 -06:00
James Yonan
20154dbb33 windows tun : added C++11 override attribute to all
overridden virtual methods in tuncli.hpp.
2016-04-07 11:15:56 -06:00
James Yonan
c2131bc009 Windows : updated vcvarsall.patch for Visual Studio 2015.
vcvarsall.patch updates the Visual Studio vcvarsall.bat
file to understand new x86_xp target.
2016-04-05 12:57:15 -06:00
James Yonan
748b0309a7 timestr : minor change, use std::strlen() instead
of strlen().
2016-04-05 12:52:40 -06:00
James Yonan
3e6081e1f2 Mac DNS : tweak redirect DNS logic to follow iOS.
We redirect DNS if either of the following is true:
1. redirect-gateway (IPv4) is pushed, or
2. DNS servers are pushed but no search domains are pushed.
2016-04-02 00:59:15 -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
88baaebc99 Mac DNS : always restore original DNS settings in System
Configuration after disconnect.

This should fix issue on OS X 10.11 where DNS settings are
lost after disconnect when the network adapter is statically
configured.
2016-03-31 16:54:50 -06:00
James Yonan
f59b96d0b2 hexstr : added render_hex_number() method for unsigned char. 2016-03-30 00:08:51 -06:00
James Yonan
e20a62c3c9 string : added force_eol flag (default=false) to unix2dos(). 2016-03-28 14:44:14 -06:00
James Yonan
ac4b5734ba ovpn3 windows : updated PolarSSL to mbedtls-1.3.16 2016-03-28 14:06:15 -06:00
James Yonan
211af3a91b string : rename methods for consistency with in-place/copy
variants of other string methods:

* rename add_trailing() -> add_trailing_copy()
* rename add_trailing_in_place() -> add_trailing()
2016-03-28 09:42:13 -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
7abd20ac8f cliproto : in struct Config, added C++11 member initializers. 2016-03-28 00:24:01 -06:00
James Yonan
a3c5012f47 clievent : added static_assert() for size of names array. 2016-03-28 00:22:00 -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
e135add60e options : refactored get_num() so that it can be called on
either an Option or OptionList.
2016-03-28 00:02:58 -06:00
James Yonan
6ab7feff15 Make Option::err_ref() public, as it's useful when formatting
error messages that refer to a particular option.
2016-03-28 00:01:23 -06:00
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