mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Merge commit 'f5fda0fa735dc13c5bd18362133467818921bb1b' into feature/update-dependencies
This commit is contained in:
@@ -80,6 +80,10 @@
|
||||
#include <openvpn/win/console.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef USE_NETCFG
|
||||
#include "client/core-client-netcfg.hpp"
|
||||
#endif
|
||||
|
||||
using namespace openvpn;
|
||||
|
||||
namespace {
|
||||
@@ -141,9 +145,10 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual bool socket_protect(int socket) override
|
||||
bool socket_protect(int socket, std::string remote, bool ipv6) override
|
||||
{
|
||||
std::cout << "*** socket_protect " << socket << std::endl;
|
||||
std::cout << "*** socket_protect " << socket << " "
|
||||
<< remote << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -910,7 +915,13 @@ int openvpn_client(int argc, char *argv[], const std::string* profile_content)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(USE_NETCFG)
|
||||
DBus conn(G_BUS_TYPE_SYSTEM);
|
||||
conn.Connect();
|
||||
NetCfgTunBuilder<Client> client(conn.GetConnection());
|
||||
#else
|
||||
Client client;
|
||||
#endif
|
||||
const ClientAPI::EvalConfig eval = client.eval_config(config);
|
||||
if (eval.error)
|
||||
OPENVPN_THROW_EXCEPTION("eval config error: " << eval.message);
|
||||
|
||||
@@ -15,6 +15,7 @@ GCC_EXTRA="$GCC_EXTRA -DOPENVPN_SHOW_SESSION_TOKEN"
|
||||
[ "$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"
|
||||
if [ "$AGENT" = "1" ]; then
|
||||
GCC_EXTRA="$GCC_EXTRA -DOPENVPN_COMMAND_AGENT"
|
||||
fi
|
||||
@@ -23,9 +24,9 @@ export GCC_EXTRA
|
||||
|
||||
# determine platform
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
export PROF=osx64
|
||||
export PROF=${PROF:-osx64}
|
||||
elif [ "$(uname)" == "Linux" ]; then
|
||||
export PROF=linux
|
||||
export PROF=${PROF:-linux}
|
||||
else
|
||||
echo this script only knows how to build on Mac OS or Linux
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user