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

123 Commits

Author SHA1 Message Date
Arne Schwabe
012e7e8226
Refactor InitProcess to use refcounting
Although the init calls were protected by a mutex more than consumer of
the API will the second one if the uninit was called too early.

While at it, move from explicit init/uninit calls to RAII.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-09-02 20:37:01 +02:00
David Sommerseth
3fbe0a2701
Update copyrights
Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-03-18 19:37:32 +01:00
Arne Schwabe
0a0d080a49 Implement allowing local LAN access
On Android local networks need to be excluded from the default (or any
other route) route if they should bypass the VPN. This adds a callback
to specifically bypass the local LAN networks.
2019-03-12 11:36:29 +01:00
Arne Schwabe
17e356858f Define DASIO_HAS_STD_STRING_VIEW on Android build
ASIO precompiler magic decides that <experimental/string_view>
is better than <string_view> as header. Unfortenately, that is not
true on newer libc++ library. Explicitly set the define to use
<string_view>
2018-11-07 17:23:02 +01:00
David Sommerseth
16b10559f2 [OVPN3-140] Update company names in copyrights
OpenVPN Technologies, Inc. change their name to OpenVPN Inc. during the
autumn of 2017.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
David Sommerseth
6caca2c313 [OVPN3-140] Relicense back to AGPLv3
This is essentially a revert of commit 04b2a3c9b7 and commit
ef42e59e05.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
fc8f89d394 [OVPN3-129] android: ensure all SWIG files are archived and saved
The core libraries together with the all the SWIG output files
are now archived and saved in the O3 folder for later usage.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
e143bc0a7e [OVPN3-129] android: improve build system in order to perform full build
the scripts/android/build-all script is now in charge of
performing all the steps required to build a full android core.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
e2c60c8662 android: build core library with MD5 support
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
d3da3dfeb0 android: build client lib for x86 (for emulator)
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
Lev Stipakov
6365d26b31 transport: external factory
Provide ExternalTransport::Factory interface to enable client instantiate transport factory.

OVPN3-92

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:38 +08:00
David Nimon
4302651dd8 changes to support android building 2017-12-22 17:59:38 +08:00
Lev Stipakov
68ae101f42 Add swig build to jenkins pipeline
OVPN3-44

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-09-27 16:16:18 +08:00
James Yonan
4095565b4d OpenVPN 3 client: added tun abstraction layer.
To enable, #define OPENVPN_EXTERNAL_TUN_FACTORY

Then add override in your client class (that derives from
ClientAPI::OpenVPNClient):

  virtual TunClientFactory* new_tun_factory(const ExternalTun::Config& conf, const OptionList& opt) override
  {
    ...
  }

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-13 13:28:34 -06:00
James Yonan
691a641a43 Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

The basic approach is to rename all references to asio::xxx
types to openvpn_io::xxx and then make openvpn_io a
preprocessor variable that points to the top-level namespace
of the i/o reactor implementation.

All of the source files that currently include <asio.hpp> now
include <openvpn/io/io.hpp> instead:

This gives us a lightweight abstraction layer that allows us
to define openvpn_io to be something other than asio.

Other changes:

* Inclusion of asio by scripts/build is now optional, and is
  enabled by passing ASIO=1 or ASIO_DIR=<dir>.

* Refactored openvpn/common/socktypes.hpp to no longer
  require asio.

* Refactored openvpn/log/logthread.hpp to no longer require
  asio.

* Added openvpn::get_hostname() method as alternative to
  calling asio directly.

* openvpn/openssl/util/init.hpp will now #error
  if USE_ASIO is undefined.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-30 15:48:14 -06:00
James Yonan
b2cd82a5bf copyright: updated to 2017.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 13:11:09 -06:00
James Yonan
052f565ed7 build-mbedtls : simplify mbedTLS build script to no longer
depend on cmake.
2017-03-18 12:24:54 -06:00
James Yonan
1434d9a599 android : in build-android, removed "android" target which
no longer builds with latest Asio.  This leaves
"android-a8a" and "android-a7a" targets.
2017-03-18 12:24:54 -06:00
James Yonan
bc406975b0 android : updated javacli/build-android for mbedTLS 2017-03-18 12:24:54 -06:00
James Yonan
8a0308d8d0 javacli : add Swig-generated files to .gitignore 2017-03-18 12:24:54 -06:00
James Yonan
050e8717f1 mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (symbol renames)
This patch renames internal OpenVPN 3 symbols
from polarssl -> mbedtls.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 12:24:54 -06:00
Samuli Seppänen
04b2a3c9b7 Switch from AGPLv3 to GPLv3
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
2017-03-16 14:43:55 +02:00
James Yonan
971abda88f copyright : updated to 2016 2016-09-03 23:29:23 -06:00
James Yonan
a04972595a Java API : declare ClientAPI_RemoteOverride class in
javacli/ovpncli.i
2016-08-17 23:03:02 -06:00
James Yonan
cc2466e08f ovpn3 java client : minor updates to handle new metric
parameter that is passed to tun_builder_(add|exclude)_route.
2016-05-07 15:17:54 -06:00
James Yonan
09fe1fa8fd In Android build scripts, change -lpolarssl to -lmbedtls. 2015-12-28 21:12:41 -07:00
James Yonan
d61f36ce3d Added ASIO_NO_DEPRECATED to android and java/linux
build scripts.
2015-06-30 03:23:55 -06:00
James Yonan
1563dca02f Added Asio to deps/lib-versions.
Removed Snappy dependency as ovpn3 clients now
standardize on LZ4 (with LZO-asym fallback).
2015-06-06 13:29:30 -06:00
James Yonan
c6a21c827b Boost dependency elimination -- final removal of Boost
dependency.  Asio is now included as a standalone,
header-only dependency.
2015-06-06 10:59:18 -06:00
James Yonan
d442e777de Updated Android build system to support ARM64:
* Updated SDK and NDK to Android 5:
    android-sdk_r24.0.2-macosx.zip
    android-ndk-r10d-darwin-x86_64.bin

* Updated build-toolchain to build both ARM
  and ARM64 toolchains.

* Added ARMv8-a architecture (64-bit) to all
  core builds.

* Patched "Page Size" issue in boost_1_57_0.
2015-02-27 09:20:35 -07:00
James Yonan
c1c6bdb639 Don't build or include minicrypto for Android. 2015-02-05 10:22:39 -07:00
James Yonan
77e764720b Turned off PT Proxy by default in javacli/build-android.
To turn it back on, set PT_PROXY=1
2015-02-04 21:25:57 -07:00
James Yonan
557df02296 Added AltProxy API that allows for alternative proxy implementations
to be developed outside the core.
2015-02-02 23:11:51 -07:00
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
7c88c27849 Added .gitignore in javacli and remove all
git cleans in build-android that don't use -X.
2014-12-22 22:46:42 -07:00
James Yonan
2b09f0ccc8 Fixes to get Java-based client working on Linux again. 2014-08-29 23:33:57 -06:00
James Yonan
c192716aa4 Fixes to javacli/build-android :
* Use "git clean -q -fXd ." to clean.
* Remove DBG_DIR_SUFFIX code, as this is now built into
  $PLATFORM definitions in vars.
* Added CXX_COMPILER_FLAGS.
2014-08-29 23:29:49 -06:00
James Yonan
5539a22684 Repo reorganization: standardize on $O3 representing the top-level
directory that contains core and possibly other components as well.
2014-08-29 18:42:02 -06:00
James Yonan
758af9708e After git repo reorganization, updated Android build scripts for
dependencies and OpenVPN 3 shared library.
2014-08-29 11:52:16 -06:00
James Yonan
55d6eff7ef Added AGPL copyrights to some misc source files. 2014-08-25 01:02:40 -06:00
James Yonan
3be8d66d0b Added disconnect bool to TunBuilderBase::tun_builder_teardown:
+    // Indicates that tunnel is being torn down.
+    // If disconnect == true, then the teardown is occurring
+    // prior to final disconnect.
+    virtual void tun_builder_teardown(bool disconnect) {}
2014-08-24 23:09:16 -06:00
James Yonan
fbf3f82ee0 Removed the first two parameters from tun_builder_reroute_gw
(const std::string& server_address and bool server_address_ipv6)
because they are redundant.  The same info is passed via
tun_builder_set_remote_address.
2014-02-27 21:51:28 -07:00
James Yonan
7539c4e0d1 Added gateway parameter to tun_builder_add_address for Windows and other
platforms that lack a VPN API.
2014-02-15 23:34:33 -07:00
James Yonan
2e1871a062 Added net30 boolean to TunBuilderBase::tun_builder_add_address for the
benefit of Windows.
2014-02-09 18:51:25 -07:00
James Yonan
95fceb5e43 Android: log tunnel bytes per CPU second. 2014-01-14 22:52:28 -07:00
James Yonan
a6ab17fde0 Android: build two versions of OpenVPN core library (libovpncli.so)
for different ARM platforms:

1. armeabi
2. armeabi-v7a

Android build script will package both versions of libovpncli.so
in the .apk, where the correct version should be automatically
chosen by Android on install.
2014-01-14 16:40:25 -07:00
James Yonan
7e0490f647 Updated Android SDK, NDK, and build scripts:
SDK: adt-bundle-mac-x86_64-20131030
NDK: android-ndk-r9c
2014-01-13 17:48:37 -07:00
James Yonan
7fe6fad18a Added crypto self test capability to core.
Added polarssl/bignum-arm.patch to resolve issue where
asm-optimized bignum code would crash on iOS.
2013-06-14 00:34:49 +00:00
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
842c93bfe9 Added capability to build Android development packages for customers. 2013-03-08 01:53:33 +00:00