implemnented torrent tunnel param dht

This commit is contained in:
orignal
2026-09-24 19:14:02 -04:00
parent 1af997ac82
commit 6f24d4efdd
6 changed files with 31 additions and 21 deletions
+3 -2
View File
@@ -1047,6 +1047,7 @@ namespace client
std::string trackers = section.second.get<std::string> (TORRENTS_TUNNEL_TRACKERS, "");
i2p::data::SigningKeyType sigType = section.second.get (TORRENTS_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519);
if (sigType > i2p::data::SIGNING_KEY_TYPE_REDDSA_SHA512_ED25519) sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
bool dht = section.second.get<bool> (TORRENTS_TUNNEL_DHT, true);
// I2CP
i2p::util::Mapping options;
@@ -1077,7 +1078,7 @@ namespace client
else
localDestination->SetPublic (true);
}
auto torrentsTunnel = std::make_shared<i2p::torrents::TorrentsTunnel> (name, localDestination, torrentsDir, trackers);
auto torrentsTunnel = std::make_shared<i2p::torrents::TorrentsTunnel> (name, localDestination, torrentsDir, trackers, dht);
auto [iit, inserted] = m_TorrentsTunnels.emplace (localDestination->GetIdentHash (), torrentsTunnel);
if (inserted)
{
@@ -1098,7 +1099,7 @@ namespace client
else
LogPrint (eLogError, "Clients: Failed to create torrents tunnel ", name, ". Duplicate keys ", keys);
#else
LogPrint (eLogError, "Clients: Torrents tunnels are not supported. Comppile without NO_TORRENTS");
LogPrint (eLogError, "Clients: Torrents tunnels are not supported. Compile without NO_TORRENTS");
#endif
}
else