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>
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.
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>
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>
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.
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>
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>
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>
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>
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>
* 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.
* 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.
+ // 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) {}
(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.