Merge commit '86cc97e55fe346502462284d2e636a2b3708163e' as 'Sources/OpenVPN3'

This commit is contained in:
Sergey Abramchuk
2020-02-24 14:43:11 +03:00
655 changed files with 146468 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
cli
cli.dSYM
build.tmp
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.5)
project(ovpncli)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake;${CMAKE_MODULE_PATH}")
include(findcoredeps)
add_executable(ovpncli
cli.cpp)
add_core_dependencies(ovpncli)
+24
View File
@@ -0,0 +1,24 @@
Build on Mac:
With MbedTLS:
GCC_EXTRA="-ferror-limit=4" STRIP=1 MTLS=1 SNAP=1 LZ4=1 build cli
With MbedTLS and Minicrypto:
GCC_EXTRA="-ferror-limit=4" STRIP=1 MTLS=1 MINI=1 SNAP=1 LZ4=1 build cli
With MbedTLS, Minicrypto, and C++11 for optimized move constructors:
GCC_EXTRA="-ferror-limit=4 -std=c++11" STRIP=1 MTLS=1 MINI=1 SNAP=1 LZ4=1 build cli
With OpenSSL:
GCC_EXTRA="-ferror-limit=4" STRIP=1 OSSL=1 OPENSSL_SYS=1 SNAP=1 LZ4=1 build cli
With MbedTLS/AppleCrypto hybrid:
GCC_EXTRA="-ferror-limit=4" STRIP=1 HYBRID=1 SNAP=1 LZ4=1 build cli
Build on Linux:
With MbedTLS:
STRIP=1 SNAP=1 LZ4=1 MTLS=1 NOSSL=1 build cli
With OpenSSL:
STRIP=1 SNAP=1 LZ4=1 build cli
File diff suppressed because it is too large Load Diff
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
# Options:
# OSSL=1 -- build using OpenSSL
# MTLS=1 -- build using mbedTLS
# PTPROXY=1 -- build using Private Tunnel proxy
# Other options
GCC_EXTRA="$GCC_EXTRA -DOPENVPN_SHOW_SESSION_TOKEN"
[ "$EER" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DTEST_EER"
[ "$NULL" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_FORCE_TUN_NULL"
[ "$EXIT" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DTUN_NULL_EXIT"
[ "$GREMLIN" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_GREMLIN"
[ "$DEX" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_DISABLE_EXPLICIT_EXIT"
[ "$BS64" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_BS64_DATA_LIMIT=2500000"
[ "$ROVER" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_REMOTE_OVERRIDE"
[ "$TLS" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_TLS_LINK"
[ "$SITNL" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DOPENVPN_USE_SITNL"
[ "$MDNC" = "1" ] && GCC_EXTRA="$GCC_EXTRA -DMBEDTLS_DISABLE_NAME_CONSTRAINTS"
if [ "$AGENT" = "1" ]; then
GCC_EXTRA="$GCC_EXTRA -DOPENVPN_COMMAND_AGENT"
fi
GCC_EXTRA="$GCC_EXTRA -DOPENVPN_VERSION=\"$($(dirname $0)/../../scripts/version)\""
export GCC_EXTRA
# determine platform
if [ "$(uname)" == "Darwin" ]; then
export PROF=${PROF:-osx64}
elif [ "$(uname)" == "Linux" ]; then
export PROF=${PROF:-linux}
else
echo this script only knows how to build on Mac OS or Linux
fi
# use mbedTLS by default
[[ -z "$OSSL" && -z "$MTLS" ]] && export MTLS=1
# don't link with OpenSSL if mbedTLS is specified
if [ "$MTLS" = "1" ]; then
export OSSL=0
export NOSSL=1
fi
# build
ASIO=1 LZ4=1 ../../scripts/build cli