|
|
@ -587,10 +587,11 @@ namespace transport |
|
|
|
if (i2p::context.SupportsV4 ()) |
|
|
|
if (i2p::context.SupportsV4 ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogInfo, "Transports: Started peer test ipv4"); |
|
|
|
LogPrint (eLogInfo, "Transports: Started peer test ipv4"); |
|
|
|
|
|
|
|
std::set<i2p::data::IdentHash> excluded; |
|
|
|
bool statusChanged = false; |
|
|
|
bool statusChanged = false; |
|
|
|
for (int i = 0; i < 5; i++) |
|
|
|
for (int i = 0; i < 5; i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto router = i2p::data::netdb.GetRandomPeerTestRouter (true); // v4
|
|
|
|
auto router = i2p::data::netdb.GetRandomPeerTestRouter (true, excluded); // v4
|
|
|
|
if (router) |
|
|
|
if (router) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto addr = router->GetSSUAddress (true); // ipv4
|
|
|
|
auto addr = router->GetSSUAddress (true); // ipv4
|
|
|
@ -603,6 +604,7 @@ namespace transport |
|
|
|
} |
|
|
|
} |
|
|
|
m_SSUServer->CreateSession (router, addr, true); // peer test v4
|
|
|
|
m_SSUServer->CreateSession (router, addr, true); // peer test v4
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
excluded.insert (router->GetIdentHash ()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!statusChanged) |
|
|
|
if (!statusChanged) |
|
|
@ -611,10 +613,11 @@ namespace transport |
|
|
|
if (i2p::context.SupportsV6 ()) |
|
|
|
if (i2p::context.SupportsV6 ()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogInfo, "Transports: Started peer test ipv6"); |
|
|
|
LogPrint (eLogInfo, "Transports: Started peer test ipv6"); |
|
|
|
|
|
|
|
std::set<i2p::data::IdentHash> excluded; |
|
|
|
bool statusChanged = false; |
|
|
|
bool statusChanged = false; |
|
|
|
for (int i = 0; i < 5; i++) |
|
|
|
for (int i = 0; i < 5; i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto router = i2p::data::netdb.GetRandomPeerTestRouter (false); // v6
|
|
|
|
auto router = i2p::data::netdb.GetRandomPeerTestRouter (false, excluded); // v6
|
|
|
|
if (router) |
|
|
|
if (router) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto addr = router->GetSSUV6Address (); |
|
|
|
auto addr = router->GetSSUV6Address (); |
|
|
@ -627,6 +630,7 @@ namespace transport |
|
|
|
} |
|
|
|
} |
|
|
|
m_SSUServer->CreateSession (router, addr, true); // peer test v6
|
|
|
|
m_SSUServer->CreateSession (router, addr, true); // peer test v6
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
excluded.insert (router->GetIdentHash ()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!statusChanged) |
|
|
|
if (!statusChanged) |
|
|
|