mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Merge commit '5edb23a7abbffb2ec7874d0352b993e1b4193374' into feature/update-dependencies
This commit is contained in:
@@ -422,6 +422,7 @@ namespace openvpn {
|
||||
IPv6Setting ipv6;
|
||||
int conn_timeout = 0;
|
||||
bool tun_persist = false;
|
||||
bool wintun = false;
|
||||
bool google_dns_fallback = false;
|
||||
bool synchronous_dns_lookup = false;
|
||||
bool autologin_sessions = false;
|
||||
@@ -435,6 +436,7 @@ namespace openvpn {
|
||||
std::string tls_version_min_override;
|
||||
std::string tls_cert_profile_override;
|
||||
std::string gui_version;
|
||||
bool allow_local_lan_access;
|
||||
ProtoContextOptions::Ptr proto_context_options;
|
||||
PeerInfo::Set::Ptr extra_peer_info;
|
||||
HTTPProxyTransport::Options::Ptr http_proxy_options;
|
||||
@@ -665,6 +667,7 @@ namespace openvpn {
|
||||
state->port_override = config.portOverride;
|
||||
state->conn_timeout = config.connTimeout;
|
||||
state->tun_persist = config.tunPersist;
|
||||
state->wintun = config.wintun;
|
||||
state->google_dns_fallback = config.googleDnsFallback;
|
||||
state->synchronous_dns_lookup = config.synchronousDnsLookup;
|
||||
state->autologin_sessions = config.autologinSessions;
|
||||
@@ -684,6 +687,7 @@ namespace openvpn {
|
||||
state->force_aes_cbc_ciphersuites = config.forceAesCbcCiphersuites;
|
||||
state->tls_version_min_override = config.tlsVersionMinOverride;
|
||||
state->tls_cert_profile_override = config.tlsCertProfileOverride;
|
||||
state->allow_local_lan_access = config.allowLocalLanAccess;
|
||||
state->gui_version = config.guiVersion;
|
||||
state->alt_proxy = config.altProxy;
|
||||
state->dco = config.dco;
|
||||
@@ -936,6 +940,7 @@ namespace openvpn {
|
||||
cc.ipv6 = state->ipv6;
|
||||
cc.conn_timeout = state->conn_timeout;
|
||||
cc.tun_persist = state->tun_persist;
|
||||
cc.wintun = state->wintun;
|
||||
cc.google_dns_fallback = state->google_dns_fallback;
|
||||
cc.synchronous_dns_lookup = state->synchronous_dns_lookup;
|
||||
cc.autologin_sessions = state->autologin_sessions;
|
||||
@@ -959,6 +964,7 @@ namespace openvpn {
|
||||
cc.gui_version = state->gui_version;
|
||||
cc.extra_peer_info = state->extra_peer_info;
|
||||
cc.stop = state->async_stop_local();
|
||||
cc.allow_local_lan_access = state->allow_local_lan_access;
|
||||
#ifdef OPENVPN_GREMLIN
|
||||
cc.gremlin_config = state->gremlin_config;
|
||||
#endif
|
||||
@@ -1140,11 +1146,12 @@ namespace openvpn {
|
||||
}
|
||||
}
|
||||
|
||||
OPENVPN_CLIENT_EXPORT bool OpenVPNClient::sign(const std::string& data, std::string& sig)
|
||||
OPENVPN_CLIENT_EXPORT bool OpenVPNClient::sign(const std::string& data, std::string& sig, const std::string& algorithm)
|
||||
{
|
||||
ExternalPKISignRequest req;
|
||||
req.data = data;
|
||||
req.alias = state->external_pki_alias;
|
||||
req.algorithm = algorithm;
|
||||
external_pki_sign_request(req); // call out to derived class for RSA signature
|
||||
if (!req.error)
|
||||
{
|
||||
@@ -1377,7 +1384,9 @@ namespace openvpn {
|
||||
#ifdef OPENVPN_GREMLIN
|
||||
ret += " GREMLIN";
|
||||
#endif
|
||||
#ifdef OPENVPN_DEBUG
|
||||
ret += " built on " __DATE__ " " __TIME__;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,10 @@ namespace openvpn {
|
||||
// pass through control channel INFO notifications via "INFO" event
|
||||
bool info = false;
|
||||
|
||||
// Allow access to local LAN. This is for platforms like
|
||||
// Android that disable local LAN access by default.
|
||||
bool allowLocalLanAccess = false;
|
||||
|
||||
// Periodic convenience clock tick in milliseconds.
|
||||
// Will call clock_tick() at a frequency defined by this parameter.
|
||||
// Set to 0 to disable.
|
||||
@@ -292,6 +296,9 @@ namespace openvpn {
|
||||
|
||||
// Gremlin configuration (requires that the core is built with OPENVPN_GREMLIN)
|
||||
std::string gremlinConfig;
|
||||
|
||||
// Use wintun instead of tap-windows6 on Windows
|
||||
bool wintun = false;
|
||||
};
|
||||
|
||||
// used to communicate VPN events such as connect, disconnect, etc.
|
||||
@@ -402,12 +409,16 @@ namespace openvpn {
|
||||
};
|
||||
|
||||
// Used to request an RSA signature.
|
||||
// Data will be prefixed by an optional PKCS#1 digest prefix
|
||||
// algorithm will determinate what signature is expected:
|
||||
// RSA_PKCS1_PADDING means that
|
||||
// data will be prefixed by an optional PKCS#1 digest prefix
|
||||
// per RFC 3447.
|
||||
// RSA_NO_PADDING mean so no padding should be done be the callee
|
||||
struct ExternalPKISignRequest : public ExternalPKIRequestBase
|
||||
{
|
||||
std::string data; // data rendered as base64 (client reads)
|
||||
std::string sig; // RSA signature, rendered as base64 (client writes)
|
||||
std::string algorithm;
|
||||
};
|
||||
|
||||
// used to override "remote" directives
|
||||
@@ -600,7 +611,7 @@ namespace openvpn {
|
||||
void on_disconnect();
|
||||
|
||||
// from ExternalPKIBase
|
||||
virtual bool sign(const std::string& data, std::string& sig);
|
||||
virtual bool sign(const std::string& data, std::string& sig, const std::string& algorithm);
|
||||
|
||||
// disable copy and assignment
|
||||
OpenVPNClient(const OpenVPNClient&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user