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

26 Commits

Author SHA1 Message Date
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
4e6117a111 OpenVPN 1.0 Beta 25 (iOS)
* Added support for import of non-unified profiles via iTunes.

* Added Google DNS Fallback preference.
2012-11-07 22:03:10 +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
8aa1e2ea76 Fixed minor issue where client HALT/RESTART parser was calling
split (on comma) with 2 rather than 1 base arguments.
2012-10-28 09:56:35 +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
a79f88aebd Android:
* Implement a simple DNS cache to work around issue with
  Seamless Tunnel --  When Seamless Tunnel is enabled,
  reconnections are unable to send DNS requests because
  the internet is blocked.  This fix caches the IP address
  used for the initial connection, then reuses it
  over the lifetime of the Seamless Tunnel.

* Try to ensure that connections properly pause on device
  sleep (when sleep on screen blanking is NOT enabled) so
  that they will survive until wakeup.

iOS:

* Don't choke on foreign profiles (such as VPN On Demand) that are
  imported onto the device but lack critical info such as a
  config file.
2012-10-23 13:10:39 +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
f3c4907d5a In new client core, fix bug where specifying a protocol override
of "tcp" or "udp" would fail to consider IPv6 transport options
if available in client config.
2012-10-14 05:06:35 +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
a6b6d487ef Global edit to add copyright notice at head of each source file. 2012-08-24 21:13:42 +00:00
James Yonan
bbacaa7f17 In iOS client, generate a reasonable error message on import of
server-locked profile (new core doesn't currently support
server-locked profiles).
2012-08-13 18:59:06 +00:00
James Yonan
ce9de34975 For iOS, allow client apps to subscribe to event and log notifications.
Add capability for iOS client apps (in Objective-C) to call directly
into core for static methods such as eval_profile.
2012-07-02 20:52:58 +00:00
James Yonan
abbe662dcb Android 4 client changes:
* Allow protocol to be specified by "proto" directive instead
  of requiring it to be present in "remote" directive.

* Throw error if tls-remote is specified in client config file.

Updated Android client.txt notes.
2012-04-18 12:13:29 +00:00
James Yonan
6fb53c3abb Fixed a race condition issue with "hot connect", i.e. sending a
connect intent to service when already connected.  

One of the ramifications of the "hot connect" fix above is that
OpenVPNClientBase.is_active() will now return a value that is
instantaneously up-to-date, whereas events might lag because
of the mechanics of inter-thread message posting.  Keep this in
mind when correlating received events to is_active() values.

For C++ core threads, increased allowed thread-stop delay to 2.5
seconds before thread is marked as unresponsive and abandoned.
Previous delay was 1 second.  This delay can't be made too long,
otherwise Android will tell the user that the app is unresponsive
and invite them to kill it.

When closing out an abandoned core thread, indicate this condition
with a new event type called CORE_THREAD_ABANDONED.  If the thread
is abandoned due to lack of response to a disconnect request, then
the CORE_THREAD_ABANDONED event will occur followed by
CORE_THREAD_INACTIVE.  For core threads that properly exit,
the DISCONNECTED event will be followed by CORE_THREAD_INACTIVE.

Added save_as_filename parameter to importProfileRemote method for
controlling the filename that the imported profile is saved as.
This parameter may be set to null to have the method choose an
appropriate name.  To have an imported profile replace an existing
profile, the filenames much match.

Added UI_OVERLOADED debugging constant to OpenVPNClient to allow
the UI to connect to a profile when already connected to another
profile in order to test "hot connect".

Added new events CLIENT_HALT and CLIENT_RESTART for compatibility
with an Access Server feature that allows the server to remotely
kill or restart the client.

When connecting a profile, the core will now automatically fill in
the username if it is not specified for userlocked profiles.

Version 0.902.
2012-03-31 16:08:20 +00:00
James Yonan
8800506ed3 Minor fix to profile autologin detection.
Android version 0.901.
2012-03-20 14:48:52 +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
deffceea7e Android 4 -- Implemented External PKI. 2012-03-06 06:06:54 +00:00
James Yonan
16bf1305c6 Android 4 UI changes:
* Added menu with Preferences and Exit items.
* Added Preferences page with VPN protocol selection.
2012-03-03 21:56:10 +00:00
James Yonan
a1626d3149 Android 4 client & core -- implemented server and protocol override. 2012-03-03 11:09:05 +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
d2116b635d Factored out common code for tun and routing. 2012-02-18 00:21:05 +00:00
James Yonan
231bd0f21a Top-level client refactoring, to move configuration functionality
from cli.cpp to ClientOptions in openvpn/client/cliopt.hpp.
2012-02-06 20:39:10 +00:00
James Yonan
f9ae757e1a Added "remote" option list handling.
Added ClientProtoTerminateCallback abstraction to ClientProto.

Added ClientProto::Config for configuration parameters, rather than
passing parameters individually to ClientProto constructor.
2012-02-06 08:28:05 +00:00
James Yonan
94cdd50aee Added support for pushed option continuations. 2012-01-31 23:30:19 +00:00