diff --git a/src/bt_peer_connection.cpp b/src/bt_peer_connection.cpp index 69fe055bd..05a0f4dd0 100644 --- a/src/bt_peer_connection.cpp +++ b/src/bt_peer_connection.cpp @@ -2282,7 +2282,10 @@ namespace libtorrent std::string remote_address; std::back_insert_iterator out(remote_address); detail::write_address(remote().address(), out); - handshake["yourip"] = remote_address; +#if TORRENT_USE_I2P + if (!is_i2p(*get_socket())) +#endif + handshake["yourip"] = remote_address; handshake["reqq"] = m_settings.get_int(settings_pack::max_allowed_in_request_queue); boost::shared_ptr t = associated_torrent().lock(); TORRENT_ASSERT(t);