mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
some cleanup
This commit is contained in:
parent
0a0f61b940
commit
d7a584f48f
2 changed files with 0 additions and 49 deletions
44
Tunnel.cpp
44
Tunnel.cpp
|
@ -535,49 +535,5 @@ namespace tunnel
|
|||
&i2p::context.GetRouterInfo ()
|
||||
}));
|
||||
}
|
||||
|
||||
OutboundTunnel * Tunnels::CreateOneHopOutboundTestTunnel (InboundTunnel * replyTunnel)
|
||||
{
|
||||
return CreateTunnel<OutboundTunnel> (replyTunnel->GetTunnelConfig ()->Invert ());
|
||||
}
|
||||
|
||||
InboundTunnel * Tunnels::CreateOneHopInboundTestTunnel (OutboundTunnel * outboundTunnel)
|
||||
{
|
||||
i2p::ntcp::NTCPSession * peer = i2p::transports.GetNextNTCPSession ();
|
||||
if (peer)
|
||||
{
|
||||
const i2p::data::RouterInfo& router = peer->GetRemoteRouterInfo ();
|
||||
return CreateTunnel<InboundTunnel> (
|
||||
new TunnelConfig (std::vector<const i2p::data::RouterInfo *>{&router}),
|
||||
outboundTunnel);
|
||||
}
|
||||
else
|
||||
LogPrint ("No established peers");
|
||||
return 0;
|
||||
}
|
||||
|
||||
OutboundTunnel * Tunnels::CreateTwoHopsOutboundTestTunnel (InboundTunnel * replyTunnel)
|
||||
{
|
||||
return CreateTunnel<OutboundTunnel> (replyTunnel->GetTunnelConfig ()->Invert ());
|
||||
}
|
||||
|
||||
InboundTunnel * Tunnels::CreateTwoHopsInboundTestTunnel (OutboundTunnel * outboundTunnel)
|
||||
{
|
||||
i2p::ntcp::NTCPSession * peer = i2p::transports.GetNextNTCPSession ();
|
||||
if (peer)
|
||||
{
|
||||
const i2p::data::RouterInfo& router = peer->GetRemoteRouterInfo ();
|
||||
return CreateTunnel<InboundTunnel> (
|
||||
new TunnelConfig (std::vector<const i2p::data::RouterInfo *>
|
||||
{
|
||||
&router,
|
||||
&i2p::context.GetRouterInfo ()
|
||||
}),
|
||||
outboundTunnel);
|
||||
}
|
||||
else
|
||||
LogPrint ("No established peers");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue