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

106 Commits

Author SHA1 Message Date
James Yonan
be3a573f66 Core change: provide logic for tunPerist that works with iOS-style
tun semantics, however this code has not been enabled yet on iOS
because it breaks in several ways:

1. network available/unavailable detection appears to break when
   tun interface is kept alive across transport connection sessions.

2. plugin session persistence appears to fail when these lines are not
   executed immediately after transport pause/resume:

     VPNTunnelSetStatus(tunnelRef, kVPNTunnelStatusReasserting, 0);
     VPNTunnelClearConfiguration(tunnelRef)

iOS Core change: change pause/reconnect delay to 3 seconds (from 2)
to reduce flapping.
2013-02-19 06:38:10 +00:00
James Yonan
13db8d94ca Core: modified read_text_utf8 to remove the Windows UTF-8 BOM,
if present.
2013-01-30 13:36:53 +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
3b8ede216d Core: on PolarSSL, try to do string rendition of X509 subject
just like OpenSSL, so that tls-remote equality matches with the
X509 subject will be compatible.
2013-01-20 08:44:49 +00:00
James Yonan
5055dedbfc Core: fixed issue with parsing time period options (such as
"reneg-sec"), where if period is 0, we must treat it as essentially
infinite.  This fixes the issue where "reneg-sec 0" was causing an
infinite connect loop.

Refactored number.hpp to provide all reasonable number-parsing
functionality, so that typeinfo.hpp can be retired.
2013-01-20 06:34:49 +00:00
James Yonan
400b7324da In Android client, added a custom error dialog for
TAP-based tunnels not supported.
2012-12-12 02:19:07 +00:00
James Yonan
e51e5421cf Updated OpenSSL driver to feature equivalance with
PolarSSL driver.

Updated Linux build.

Added badcert.ovpn test profile to trigger certificate
verification error.
2012-11-26 07:46:09 +00:00
James Yonan
d5874f4684 Misc client and pre-server cleanup. 2012-11-26 01:51:24 +00:00
James Yonan
3a16bc0248 Move unused files out of source tree. 2012-11-23 06:33:27 +00:00
James Yonan
4d9a751af2 Added head comments to all source files.
Minor reorganization of unicode code.
2012-11-23 06:18:43 +00:00
James Yonan
5047d251a0 Fixed iOS regression caused by addition of support for non-unified
profile merge, where profiles that succeeded in the merge phase
but failed in the options parse phase would crash the UI.
2012-11-15 16:17:46 +00:00
James Yonan
0d16acd0bb Minor exception code cleanup. 2012-11-14 16:41:33 +00:00
James Yonan
daa97ededd Added support for <connection> blocks in profile. 2012-11-14 05:12:48 +00:00
James Yonan
31d87f09a4 Extend config file parser to recognize end-of-line comments
that start with # or ;

To pass these chars as part of an argument, make sure to quote
them.
2012-11-14 03:25:59 +00:00
James Yonan
32a117242e More profile validation. 2012-11-14 02:35:50 +00:00
James Yonan
05aed22147 Allow multi-cert directives like ca and extra-certs to be specified
multiple times in the config file.
2012-11-12 16:17:25 +00:00
James Yonan
df51e2bfc3 Minor SplitLines changes. 2012-11-12 02:33:20 +00:00
James Yonan
5a5a18942a Added parser size validation constants in
openvpn/client/cliconstants.hpp
2012-11-12 01:52:03 +00:00
James Yonan
065b83263c Initial Apple VPN-On-Demand implementation:
* VoD profiles can be defined using the iPhone Configuration utility:

  1. Connection Type should be set to Custom SSL
  2. Identifier should be set to net.openvpn.OpenVPN-Connect.vpnplugin
  3. Server can be set to a hostname, or "DEFAULT" to use the
     hostname(s) from the OpenVPN configuration.
  4. User Authentication should be set to Certificate, and the client
     certificate+key should be attached as a PKCS#12 file.
  5. VPN On Demand should be enabled and match entries should be
     defined.

  In addition, the OpenVPN client configuration file may be defined
  via key/value pairs:

  1. VoD requires an autologin profile.
  2. Define each OpenVPN directive as a key, with arguments
     specified as the value.
  3. For Access server meta-directives such as
     OVPN_ACCESS_SERVER_USERNAME, remove the "OVPN_ACCESS_SERVER_"
     prefix, giving USERNAME as the directive.
  4. If no arguments are present, use "NOARGS" as the value.
  5. If multiple instances of the same directive are present,
     number the directives in the order they should be processed by
     appending .<n> to the directive, where n is an integer,
     such as remote.1 or remote.2
  6. For multi-line directives such as <ca> and <tls-auth>, you must
     convert the multi-line argument to a single line by specifying
     line breaks as \n -- also note that because of
     this escaping model, you must use \\ to pass backslash itself.

* VoD profiles are recognized and listed by the app.

* The app can disconnect but not connect a VoD profile.

* Most app-level functionality such as logging and preferences
  work correctly for VoD profiles.

Core changes:

* Added support for key-direction parameter in core.
2012-11-06 17:50:30 +00:00
James Yonan
f72aab4b40 Added support to new core for remote-cert-tls, remote-cert-ku,
and remote-cert-eku directives.
2012-10-31 14:46:40 +00:00
James Yonan
1c7f9e2577 Completed HTTP proxy backend implementation
in new client core:

* Added NTLMv2 authentication
2012-10-28 10:07:32 +00:00
James Yonan
9c6d783134 Added HTTP Proxy Digest Auth support. 2012-10-26 12:36:40 +00:00
James Yonan
3ca3a857bd Initial HTTP proxy implementation in core, with support for
non-authenticated proxies and Basic Auth.

Includes new PROXY_ERROR and PROXY_NEED_CREDS events.

Still to do: Digest and NTLM auth.
2012-10-24 06:38:20 +00:00
James Yonan
cded2ca49e Android 1.1.1 build 9
* Fix attempt for java.lang.NullPointerException in
  net.openvpn.openvpn.OpenVPNService.onStartCommand(OpenVPNService.java:838)

* Allow non-unified profiles (i.e. profiles containing directives that
  reference other files) to be imported from SD card, as long
  as all referenced files are present in the same directory on the
  SD card as the profile.

* Relaxed parsing of "remote" directive to allow the port and/or
  protocol parameters to be omitted.  The port defaults to 1194
  and the protocol to UDP.  Either defaults can be changed with
  the "port" or "proto" directive.

* Fixed issue where profile parser was choking on files containing
  Windows-style line-endings.
2012-10-18 12:24:14 +00:00
James Yonan
3a126349f1 Added strcasecmp methods to operate on std::string. 2012-10-18 06:17:46 +00:00
James Yonan
4445ba1e76 OpenVPN 1.0 Beta 21 (iOS)
Implemented IPv6 in iOS client.

Added new flags to redirect-gateway to control whether redirection
occurs at IPv4 or IPv6 levels (or both):

* ipv4 (default)
* !ipv4
* ipv6
* !ipv6

Added new directive "redirect-dns yes|no".  If yes, all DNS requests
will be forwarded through pushed DNS servers.  If no, only DNS
requests that match domains enumerated in "dhcp-option DOMAIN"
directives will be forwarded.  If redirect-dns is omitted, it will
default to yes if redirect-gateway is specified at the IPv4 level
(this is the normal pre-existing behavior).

Allow the following aggregated options that are normally pushed by
the server to be defined in the config file as well.  These options
will be combined with server-pushed options:

* route
* route-ipv6
* redirect-gateway
* redirect-private
* dhcp-option

Allow the following singleton options (i.e. options that don't
aggregate), that are normally pushed, to be defined in the config
file (note that server-pushed singleton options will override the
config file setting):

* redirect-dns

The Connection Details section of the UI now displays VPN IP
addresses for IPv4 and IPv6.

Added new pushable option "client-ip IP_ADDR" that can be pushed
by the server with the client's IP address as seen by the server.
The client will then show the address in the Connection Details
section of the UI.
2012-10-03 09:03:02 +00:00
James Yonan
48ab9cbbe9 Added our own system() implementation to allow args to be passed as
array instead of concatenated string, and to resolve issue on OS X
where signals were being ignored after system() was called.

C++ iterators incremented in a for statement should usually use
a preincrement syntax.
2012-09-12 04:24:05 +00:00
James Yonan
54a534d347 Fixed build script to work again on OS X.
Implement our own wrapper around ::system().
2012-09-11 23:51:37 +00:00
James Yonan
a6b6d487ef Global edit to add copyright notice at head of each source file. 2012-08-24 21:13:42 +00:00
James Yonan
582c8f3977 OpenVPN 1.0 Beta 13 (iOS)
* Fixed issue with non-pushed "comp-lzo" statically declared in
  config file.

* Show Peer info in log.

* Increment core version number to 1.0.
2012-08-23 14:25:50 +00:00
James Yonan
b37eb264d3 iOS client changes:
OpenVPN 1.0 Beta 4

* Fixed issue where large profiles were hitting against a limitation
  in Apple VPN API (configd[14] <Error>: VPN Controller: failed to
  write to VPN control socket - msgtype: 2050).  The fix is to pass the
  profile to the plugin via a temporary file rather than putting the
  file content into the plist.

* Added Help section toggle button.

* Added Private Tunnel import.

* Added anti-race sequencing to prevent connection request processing
  until after callbacks and event stream subscriptions have been
  set up.
2012-08-12 00:32:15 +00:00
James Yonan
f91339e739 First working iOS build. 2012-07-01 15:37:46 +00:00
James Yonan
3bacaf84c3 Added Blowfish support for iOS. 2012-05-25 20:28:14 +00:00
James Yonan
40ada7a7db cli tool builds without errors for iOS (arm). 2012-05-22 19:18:41 +00:00
James Yonan
53fa94260f Added clang/LLVM support. 2012-05-22 12:25:33 +00:00
James Yonan
452b19b787 Checkpoint for new core server implementation
(not yet complete).
2012-05-06 00:39:39 +00:00
James Yonan
3c99b8976b C++ core fixes for Windows. 2012-04-21 04:47:30 +00:00
James Yonan
d6be1cf2ee Android 4 client:
* Added OpenVPN log file page view in advanced preferences.

* Added OpenSSL verify_callback.

* Support ns-cert-type

* Sanitize logged data to remove Session ID.
2012-03-08 10:30:43 +00:00
James Yonan
fe76cd990d Allow delete method for ScopedPtr to be overriden via
a template argument.
2012-03-08 08:27:21 +00:00
James Yonan
deffceea7e Android 4 -- Implemented External PKI. 2012-03-06 06:06:54 +00:00
James Yonan
d77865d0a5 Android 4 -- Interim checkpoint for External PKI development. 2012-03-04 23:05:26 +00:00
James Yonan
3a04648684 Android 4 client -- Implemented dynamic challenge/response. 2012-03-03 02:56:58 +00:00
James Yonan
efd1139571 Implemented base64 so static challenge/response now works.
Refactored some of the base Activity stuff into
OpenVPNClientBase.java.

Clients sending intents to OpenVPNService should use
OpenVPNService.INTENT_PREFIX as a key prefix when
calling putExtra.
2012-03-01 22:50:57 +00:00
James Yonan
0d36ec4d10 Fixed bug in lex/split that occurs on processors
such as ARM where char is unsigned by default.
2012-02-29 02:13:39 +00:00
James Yonan
71c5d1a35f Added meta option parsing capability to options parser. 2012-02-29 01:59:01 +00:00
James Yonan
f094241aa8 Android 4 client port is almost working (need to get an Android
build that includes tun driver to test further).
2012-02-19 01:36:50 +00:00
James Yonan
9f5cfc465a Implement error handling if socket_protect() call fails. 2012-02-17 20:30:08 +00:00
James Yonan
da248a8fbd Search/replace of:
std::exception& e

to:

  const std::exception& e
2012-02-17 19:28:44 +00:00
James Yonan
9c9a159895 Added SocketProtect abstraction for Android. 2012-02-17 02:10:24 +00:00
James Yonan
dec744c870 Fixes to multi-threaded cli.cpp to allow signals to work
properly.
2012-02-13 23:11:37 +00:00