mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 07:11:30 +02:00
support tor proxy uri
This commit is contained in:
@@ -159,6 +159,13 @@ namespace monero {
|
||||
throw std::runtime_error("set_daemon_connection() not supported");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Tor proxy to the daemon.
|
||||
*/
|
||||
virtual void set_daemon_proxy(const std::string& uri = "") {
|
||||
throw std::runtime_error("set_daemon_proxy() not supported");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the wallet's daemon connection.
|
||||
*
|
||||
|
||||
@@ -1283,6 +1283,10 @@ namespace monero {
|
||||
is_connected_to_daemon(); // update m_is_connected cache // TODO: better naming?
|
||||
}
|
||||
|
||||
void monero_wallet_full::set_daemon_proxy(const std::string& uri) {
|
||||
m_w2->set_proxy(uri);
|
||||
}
|
||||
|
||||
void monero_wallet_full::set_daemon_connection(const boost::optional<monero_rpc_connection>& connection) {
|
||||
if (connection == boost::none) set_daemon_connection("");
|
||||
else set_daemon_connection(connection->m_uri == boost::none ? "" : connection->m_uri.get(), connection->m_username == boost::none ? "" : connection->m_username.get(), connection->m_password == boost::none ? "" : connection->m_password.get());
|
||||
|
||||
@@ -185,6 +185,7 @@ namespace monero {
|
||||
bool is_view_only() const override { return m_w2->watch_only(); }
|
||||
void set_daemon_connection(const std::string& uri, const std::string& username = "", const std::string& password = "") override;
|
||||
void set_daemon_connection(const boost::optional<monero_rpc_connection>& connection) override;
|
||||
void set_daemon_proxy(const std::string& uri = "") override;
|
||||
boost::optional<monero_rpc_connection> get_daemon_connection() const override;
|
||||
bool is_connected_to_daemon() const override;
|
||||
bool is_daemon_synced() const override;
|
||||
|
||||
Reference in New Issue
Block a user