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

18 Commits

Author SHA1 Message Date
James Yonan
de0da474ef Revamp remote-list handling so that DNS names that resolve to
multiple addresses will be treated as if each address was an
individual remote directive.

Fixed issue where UDP transport driver was calling socket
connect method synchronously.  This can cause exceptions
to be thrown in corner cases, such as "No route to host"
on OSX/iOS for connections to IPv6 addresses when no default
IPv6 route exists on system.  Refactoring UDP connect
operation to be asychronous fixes the issue.

Implemented remote-random.
2013-03-12 19:20:37 +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
4d9a751af2 Added head comments to all source files.
Minor reorganization of unicode code.
2012-11-23 06:18:43 +00:00
James Yonan
34a2fd7047 Add error code for PEM_PASSWORD_FAIL for conveying error up
through client API.
2012-11-16 04:13:48 +00:00
James Yonan
0d16acd0bb Minor exception code cleanup. 2012-11-14 16:41:33 +00:00
James Yonan
87fd344e6e Did some refactoring to make it easier for tun and transport objects
to communicate specific errors or warnings.

Added TUN_IFACE_CREATE event, which indicates an error creating
the tun interface.

Added REROUTE_GW_NO_DNS error stat, which indicates that
redirect-gateway (IPv4) was processed without an accompanying
DNS directive.
2012-10-24 09:32:15 +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
790d6ba5fb Added two new stats to client core:
N_PAUSE -- number of times that Pause state has been entered
N_RECONNECT -- number of reconnections
2012-10-21 11:32:06 +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
f91339e739 First working iOS build. 2012-07-01 15:37:46 +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
b13a527308 Android 4:
* Implemented connection timeout.
* Implemented show raw stats page.
* Work around issue where sometimes core doesn't stop when
  stop() method is called, because of delays in canceling
  Asio DNS resolution thread.
2012-03-07 11:21:09 +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
1f5e50d733 Implemented OpenVPNClient stats methods.
Simplified autologin sensing.
Java test client will now dump stats on exit.
2012-02-12 23:09:28 +00:00
James Yonan
adbc10fb5e Bug fixes:
* raise default headroom/tailroom to 512 for worst-case compression
  expansion

* for TCP connections use async_connect instead of connect

* for Time and Time::Duration, handle subtraction reasonably with
  infinite values

* handle possible infinite duration in to_posix_duration

* fix overflow in Time::Duration::to_milliseconds

* call Base::update_now() in ClientProto::start
2012-02-07 20:52:40 +00:00
James Yonan
6674709aba Added ClientConnect class which implements an "always-try-to-reconnect"
approach, with remote list rotation.  Only gives up on auth failure.
2012-02-07 11:37:35 +00:00
James Yonan
e7a5d9f55b Start process of moving client logic out of cli.cpp into
general-purpose classes.

Rename ProtoStats to SessionStats and make it more flexible
by using an abstract base class model.

Add a client event queue for the beginnings of a client-backend
API.

Added logic to ProtoContext to invalidate session on certain
kinds of errors in TCP that would be normally be okay in UDP
such as HMAC_ERROR, DECRYPT_ERROR, etc.

Add some alignment adjustment logic for READ_LINK_TCP (3 bytes)
and READ_LINK_UDP (1 byte).
2012-02-04 10:24:54 +00:00