mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-02-11 00:00:08 +08:00
Squashed 'Sources/OpenVPNAdapter/Libraries/Vendors/openvpn/' changes from 7db7a009b0..29e060ffb3
29e060ffb3 CryptoAlgs: Don't report any digests for ciphers not using them 87d40ed8da ovpncli.cpp: socket_protect implementation for agent-enabled builds 12763bbbb8 win/client/tunsetup.hpp: implement add_bypass_route() method c445361969 vcxprox: add missing file 0d7143c4bf transport: enable socket_protect call for all platforms a6cae41285 cliopt.hpp: disable remote list bypass for agent-enabled build 3166957e2e add error codes for better error management at profile parsing time git-subtree-dir: Sources/OpenVPNAdapter/Libraries/Vendors/openvpn git-subtree-split: 29e060ffb34b8a4067d8d01f6506bdb2d220df02
This commit is contained in:
@@ -262,7 +262,13 @@ namespace openvpn {
|
||||
bool socket_protect(int socket, IP::Addr endpoint) override
|
||||
{
|
||||
if (parent)
|
||||
return parent->socket_protect(socket, endpoint.to_string(), endpoint.is_ipv6());
|
||||
{
|
||||
#if defined(OPENVPN_COMMAND_AGENT) && defined(OPENVPN_PLATFORM_WIN)
|
||||
return WinCommandAgent::add_bypass_route(endpoint);
|
||||
#else
|
||||
return parent->socket_protect(socket, endpoint.to_string(), endpoint.is_ipv6());
|
||||
#endif
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
@@ -659,7 +665,7 @@ namespace openvpn {
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
eval.error = true;
|
||||
eval.message = Unicode::utf8_printable<std::string>(e.what(), 256);
|
||||
eval.message = Unicode::utf8_printable<std::string>(std::string("ERR_PROFILE_GENERIC: ") + e.what(), 256);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,6 +813,11 @@ namespace openvpn {
|
||||
return ret;
|
||||
}
|
||||
|
||||
OPENVPN_CLIENT_EXPORT bool OpenVPNClient::socket_protect(int socket, std::string remote, bool ipv6)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
OPENVPN_CLIENT_EXPORT bool OpenVPNClient::parse_dynamic_challenge(const std::string& cookie, DynamicChallenge& dc)
|
||||
{
|
||||
try {
|
||||
@@ -977,8 +988,8 @@ namespace openvpn {
|
||||
#ifdef OPENVPN_GREMLIN
|
||||
cc.gremlin_config = state->gremlin_config;
|
||||
#endif
|
||||
#if defined(USE_TUN_BUILDER)
|
||||
cc.socket_protect = &state->socket_protect;
|
||||
#if defined(USE_TUN_BUILDER)
|
||||
cc.builder = this;
|
||||
#endif
|
||||
#if defined(OPENVPN_EXTERNAL_TUN_FACTORY)
|
||||
|
||||
Reference in New Issue
Block a user