Skip to content

Commit

Permalink
simplewallet: moan harder about untrusted nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
moneromooo-monero committed Aug 24, 2019
1 parent c9df9d6 commit 87d2f06
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4082,7 +4082,22 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
}

if (!m_wallet->is_trusted_daemon())
message_writer() << (boost::format(tr("Warning: using an untrusted daemon at %s, privacy will be lessened")) % m_wallet->get_daemon_address()).str();
{
message_writer(console_color_red, true) << (boost::format(tr("Warning: using an untrusted daemon at %s")) % m_wallet->get_daemon_address()).str();
message_writer(console_color_red, true) << boost::format(tr("Using a third party daemon can be detrimental to your security and privacy"));
bool ssl = false;
if (m_wallet->check_connection(NULL, &ssl) && !ssl)
message_writer(console_color_red, true) << boost::format(tr("Using your own without SSL exposes your RPC traffic to monitoring"));
message_writer(console_color_red, true) << boost::format(tr("You are strongly encouraged to connect to the Monero network using your own daemon"));
message_writer(console_color_red, true) << boost::format(tr("If you or someone you trust are operating this daemon, you can use --trusted-daemon"));

COMMAND_RPC_GET_INFO::request req;
COMMAND_RPC_GET_INFO::response res;
bool r = m_wallet->invoke_http_json("/get_info", req, res);
std::string err = interpret_rpc_response(r, res.status);
if (r && err.empty() && (res.was_bootstrap_ever_used || !res.bootstrap_daemon_address.empty()))
message_writer(console_color_red, true) << boost::format(tr("Moreover, a daemon is also less secure when running in bootstrap mode"));
}

if (m_wallet->get_ring_database().empty())
fail_msg_writer() << tr("Failed to initialize ring database: privacy enhancing features will be inactive");
Expand Down

0 comments on commit 87d2f06

Please sign in to comment.