mirror of
https://github.com/monero-project/monero.git
synced 2025-08-08 18:12:28 -04:00
Merge pull request #9160
c50ade5
Daemon-specific proxy for the wallet-rpc. (0xFFFC0000)
This commit is contained in:
commit
72d87cd10a
5 changed files with 31 additions and 4 deletions
|
@ -4412,6 +4412,13 @@ namespace tools
|
|||
er.message = "Command unavailable in restricted mode.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_wallet->has_proxy_option() && !req.proxy.empty())
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_PROXY_ALREADY_DEFINED;
|
||||
er.message = "It is not possible to set daemon specific proxy when --proxy is defined.";
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::vector<uint8_t>> ssl_allowed_fingerprints;
|
||||
ssl_allowed_fingerprints.reserve(req.ssl_allowed_fingerprints.size());
|
||||
|
@ -4455,7 +4462,7 @@ namespace tools
|
|||
if (!req.username.empty() || !req.password.empty())
|
||||
daemon_login.emplace(req.username, req.password);
|
||||
|
||||
if (!m_wallet->set_daemon(req.address, daemon_login, req.trusted, std::move(ssl_options)))
|
||||
if (!m_wallet->set_daemon(req.address, daemon_login, req.trusted, std::move(ssl_options), req.proxy))
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_NO_DAEMON_CONNECTION;
|
||||
er.message = std::string("Unable to set daemon");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue