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

131 Commits

Author SHA1 Message Date
David Sommerseth
dde1574596
Reformatting source code to new coding style
This is the result after running 'clang-format -i' on all C++ files and
headers, with the defined formatting rules in .clang-format.

Only the openvpn/common/unicode-impl.hpp has been excluded, as that is
mostly a copy of an external project.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2023-01-18 19:24:15 +01:00
David Sommerseth
8c94a8f774
copyright: Update to 2022
Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-09-29 12:00:26 +02:00
David Sommerseth
81441e8fa1 OpenVPN 3 Core library version 3.6.6
-----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmIqffMTHGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98oX4EACzfbeJuJcHMueL4Q54m8dqAVFxaev+
 kdm0KCjxuMlTB5ERtekJ7+6choeLdcs3K1nLV3jsDooXoNH0egdkNOEWX/cWnsdO
 WKtgz8a6oxx8c6H3Ow71tXIoRuJTQF/Tt9qUdjWu2TUpbbQSzC/h5onDP6+i5zct
 0qgySyDlB8yPnyBw8VIl+ZgKH0kacNGC3aO9+csQ1KPi1hlng9cUqycrX9m+zBxA
 g2hCXm92JtIeo2ti5RwoJVAqaeOmddAgLg5hHrX8LA37Bm4f+7eQEUM36CZnDoXr
 g4H/YHltn6W2dXpQKmYLIrhDVfWsLZ/fW7ASzzgfI2nwugmWsIgwXTtvsGLsocfX
 bbvI85HkTy8q6+oAHsC35IdHZcvpK/ekAda7zDSmpi7jRYBqB04vVTWuUu9O8HJt
 0wcwaTo5DzqYgGc461JFSw7j2lwIhCCfSnIBZP/CbCp+qzSu8f8y8VV0yAruAdby
 iLH7JltADDsfDTcUm5pTrzGUy0HmGhLmXQ40QAea8xNIWNiWrJ79utXl4wKrWROb
 fZiqdjwe3i7Zg4JUNNAO1sycLuLkuAqajSsFgBk02veRdJks8FLAuylWjMrYkvsW
 QAZNa1zmS7Fq/8DaREqNRa0/HYg2dzXnKn0VcVTtR+z2o4pPc0F4+OYj+sEeWCER
 1/qsuIaTrAnkfA==
 =ihW/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEgDq5E1p1aZrNLFFkhs+UTJZx/fIFAmIqhwcTHGRhdmlkc0Bv
 cGVudnBuLm5ldAAKCRCGz5RMlnH98k5+D/9YvIzHlA/YeJ8iGhx+YbdUjMYnwrs2
 FcIQXyEd9puVtipv1sjy1FTaaCW4Ky+515ZFl+njXSzYNA6NBUOIU64iQlU6ZzaQ
 EkG9PSQvddwK5wxOLMaorG2PvFZmPTyBd0HoQUE9l1OiW3dgWu9sKK5Nm+Zgh4o5
 8KA/4f2AOxkXY/PkHylOcGPz8zevXJ1sHoJCXMNd3vWmpJ8jLoEQpX5qsMZcJhNn
 Q8ArRTI3OUrBXK4AkgCoJO2Gf83S+ROzZMNGVlJayW/7qjNXKGR0F1RQnEbaj2me
 bawYa7rZQ0sl9sHW87QEW6QgCrMu1SbaQFvNFJzhhm1UpBLPbcFaTVl/j265ndtQ
 34WblEePQMuCMKHxMP0EvYcz9eRIXQgPgXGCa4IOletD2te4LuAyyoPphAbntCi4
 gb54byMcoeOUgcRNBC9VuKI3SBwSUMh2o2VazZuo7gNk7PYpM7lTPLTylTeu37/9
 H/Dg1Z/M31FhSE7wCh+JwtWDnpKalwhQYSU4ugXqJ4DquwH043ZmrZoTKucixWHy
 VhNbrBgqQdnb2bJLMTII1J4khsjnh2pAWIuBiekpAtGNef8CVi77OX9YeX/z/R3w
 6WZZrvGoePLdabXhESfNpzvNM9PgqGqgWKhQBs6oj9gA7I2uKEUXMyxm33AJIuV5
 CHOSjo6kpWN7Fw==
 =ONLf
 -----END PGP SIGNATURE-----

Merge OpenVPN 3 Core library version 3.6.6 changes
2022-03-11 00:16:55 +01:00
Arne Schwabe
9ad98bae8f Add building ovpncli swig library to cmake build
This also moves ovpncli.i to a proper place
2021-12-15 13:05:14 +01:00
Arne Schwabe
d7b316bd11 Move helper function from OpenVPNClient int OpenVPNClientHelper
This also makes most of them non-static to avoid the problem that these
functions depend on Initprocess::Init being instantiated before being
called.

Rename the local variables eval to eval_cfg to avoid shadowing the
class field of the same name.
2021-12-15 13:03:41 +01:00
Arne Schwabe
f6d2c40b34 Remove unused outdated build scripts for the Android Java JNI client 2021-12-15 13:03:38 +01:00
Arne Schwabe
7897c3bd7e
Rename OPENVPN_USE_TLS_MD5 to OPENVPN_ALLOW_INSECURE_CERTPROFILE
With OpenSSL 3.0 the name with MD5 no longer makes sense as it affects
not only MD5 but also SHA1 and number of other settings. So replace the
define with a more fitting name.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2021-11-12 20:58:44 +01:00
Arne Schwabe
9ed6f69a3b
Remove old no longer used OpenSSL hack for Android 4.1 (Jellybean)
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2021-11-12 20:58:43 +01:00
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