mirror of
https://github.com/monero-project/monero.git
synced 2025-08-13 20:45:34 -04:00
Merge pull request #3932
8962f00
simplewallet: add optional trusted/untrusted argument to set_daemon (moneromooo-monero)941a608
util: consider Tor/I2P addresses to be non local (moneromooo-monero)2b3357e
README: mention --untrusted-daemon (moneromooo-monero)
This commit is contained in:
commit
3721298cf6
3 changed files with 37 additions and 1 deletions
|
@ -727,6 +727,13 @@ std::string get_nix_version_display_string()
|
|||
|
||||
bool is_local_address(const std::string &address)
|
||||
{
|
||||
// always assume Tor/I2P addresses to be untrusted by default
|
||||
if (boost::ends_with(address, ".onion") || boost::ends_with(address, ".i2p"))
|
||||
{
|
||||
MDEBUG("Address '" << address << "' is Tor/I2P, non local");
|
||||
return false;
|
||||
}
|
||||
|
||||
// extract host
|
||||
epee::net_utils::http::url_content u_c;
|
||||
if (!epee::net_utils::parse_url(address, u_c))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue