CW-224-Allow-Monero-proxy-in-node-settings (#966)

* update setupNodeSync func

* minor fixes

* localization

* add request node with proxy

* formatting
This commit is contained in:
Serhii 2023-08-02 14:48:52 +03:00 committed by GitHub
parent fcf4fbdc14
commit d5c0012964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 180 additions and 27 deletions

View file

@ -3,6 +3,7 @@
#include <chrono>
#include <functional>
#include <iostream>
#include <fstream>
#include <unistd.h>
#include <mutex>
#include "thread"
@ -405,13 +406,14 @@ extern "C"
return is_connected;
}
bool setup_node(char *address, char *login, char *password, bool use_ssl, bool is_light_wallet, char *error)
bool setup_node(char *address, char *login, char *password, bool use_ssl, bool is_light_wallet, char *socksProxyAddress, char *error)
{
nice(19);
Monero::Wallet *wallet = get_current_wallet();
std::string _login = "";
std::string _password = "";
std::string _socksProxyAddress = "";
if (login != nullptr)
{
@ -423,7 +425,12 @@ extern "C"
_password = std::string(password);
}
bool inited = wallet->init(std::string(address), 0, _login, _password, use_ssl, is_light_wallet);
if (socksProxyAddress != nullptr)
{
_socksProxyAddress = std::string(socksProxyAddress);
}
bool inited = wallet->init(std::string(address), 0, _login, _password, use_ssl, is_light_wallet, _socksProxyAddress);
if (!inited)
{