From 6ab555659cd8c3a07619b9073e5469888b69c049 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 2 Aug 2010 06:16:32 +0000 Subject: [PATCH] anonymous mode fix (don't resolve countries, since that gives away IPs) --- include/libtorrent/torrent.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 2ae20d86b..8f16ea83b 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -333,7 +333,10 @@ namespace libtorrent void resolve_countries(bool r) { m_resolve_countries = r; } - bool resolving_countries() const { return m_resolve_countries; } + bool resolving_countries() const + { + return m_resolve_countries && !m_ses.settings().anonymous_mode; + } #endif // -------------------------------------------- @@ -604,6 +607,8 @@ namespace libtorrent void on_name_lookup(error_code const& e, tcp::resolver::iterator i , std::list::iterator url, tcp::endpoint proxy); + void connect_web_seed(std::list::iterator web, tcp::endpoint const& a); + // this is the asio callback that is called when a name // lookup for a proxy for a web seed is completed. void on_proxy_name_lookup(error_code const& e, tcp::resolver::iterator i