aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-06-20 14:44:54 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-06-20 14:44:54 -0500
commit3721298cf6fc49202efc56ecf10ea12f6a05fdf5 (patch)
tree2c36da00159e3c42a702fa08a40f0a39db4a42b8 /src/common
parentMerge pull request #3927 (diff)
parentREADME: mention --untrusted-daemon (diff)
downloadmonero-3721298cf6fc49202efc56ecf10ea12f6a05fdf5.tar.xz
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)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp
index 008610117..3f330fa13 100644
--- a/src/common/util.cpp
+++ b/src/common/util.cpp
@@ -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))