mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
select router with ipv4 for endpoint
This commit is contained in:
parent
5022a9c610
commit
17c4038c60
6 changed files with 28 additions and 25 deletions
|
@ -709,7 +709,7 @@ namespace tunnel
|
|||
auto inboundTunnel = GetNextInboundTunnel ();
|
||||
auto router = i2p::transport::transports.RoutesRestricted() ?
|
||||
i2p::transport::transports.GetRestrictedPeer() :
|
||||
i2p::data::netdb.GetRandomRouter (i2p::context.GetSharedRouterInfo (), false); // reachable by us
|
||||
i2p::data::netdb.GetRandomRouter (i2p::context.GetSharedRouterInfo (), false, true); // reachable by us
|
||||
if (!inboundTunnel || !router) return;
|
||||
LogPrint (eLogDebug, "Tunnel: Creating one hop outbound tunnel");
|
||||
CreateTunnel<OutboundTunnel> (
|
||||
|
@ -781,7 +781,7 @@ namespace tunnel
|
|||
auto router = i2p::transport::transports.RoutesRestricted() ?
|
||||
i2p::transport::transports.GetRestrictedPeer() :
|
||||
// should be reachable by us because we send build request directly
|
||||
i2p::data::netdb.GetRandomRouter (i2p::context.GetSharedRouterInfo (), false);
|
||||
i2p::data::netdb.GetRandomRouter (i2p::context.GetSharedRouterInfo (), false, true);
|
||||
if (!router) {
|
||||
LogPrint (eLogWarning, "Tunnel: Can't find any router, skip creating tunnel");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue