mirror of
https://github.com/amnezia-vpn/OpenVPNAdapter.git
synced 2026-05-17 08:15:45 +03:00
get ret out from lib cloak
This commit is contained in:
@@ -56,7 +56,7 @@ class CloakTransport : public PluggableTransports::Connection, public PluggableT
|
||||
}
|
||||
// Setup cloak config
|
||||
ret = Initialize_cloak_c_client(config);
|
||||
|
||||
ret_out = ret;
|
||||
if (ret < 0) {
|
||||
// OPENVPN_LOG("ERROR Initialize_cloak_c_client ");
|
||||
return;
|
||||
@@ -108,7 +108,9 @@ class CloakTransport : public PluggableTransports::Connection, public PluggableT
|
||||
void close() { Cloak_close_connection(client_id); };
|
||||
|
||||
int native_handle() { return Cloak_native_handle(); };
|
||||
|
||||
int get_ret_out_int(){
|
||||
return ret_out;
|
||||
}
|
||||
PluggableTransports::Connection::Ptr dial(
|
||||
openvpn_io::ip::tcp::endpoint address) {
|
||||
return new CloakTransport(address);
|
||||
@@ -118,6 +120,7 @@ class CloakTransport : public PluggableTransports::Connection, public PluggableT
|
||||
std::mutex mt;
|
||||
GoInt client_id;
|
||||
bool inited = false;
|
||||
int ret_out;
|
||||
};
|
||||
|
||||
struct Factory {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#define OPENVPN_TRANSPORT_CLIENT_PTCLI_H
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <string>
|
||||
#include <openvpn/io/io.hpp>
|
||||
|
||||
#include <openvpn/transport/client/pluggable/pt.hpp>
|
||||
@@ -306,6 +306,9 @@ namespace openvpn {
|
||||
try
|
||||
{
|
||||
connection = config->transport->dial(server_endpoint);
|
||||
int ret_out = config->transport->get_ret_out_int();
|
||||
std::string s = std::to_string(ret_out);
|
||||
OPENVPN_LOG("ret out from cloak: " << s);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user