aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet_rpc_server.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 0cc42ae3f..1d835a86b 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -4406,6 +4406,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());
@@ -4449,7 +4456,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");