|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
#include <llarp/handlers/tun.hpp>
|
|
|
|
|
#include <llarp/service/context.hpp>
|
|
|
|
|
#include <llarp/service/endpoint.hpp>
|
|
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
|
{
|
|
|
|
@ -57,6 +58,19 @@ namespace llarp
|
|
|
|
|
return &tunEndpoint->tunif;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
Context::Prefetch(const llarp::service::Address &addr)
|
|
|
|
|
{
|
|
|
|
|
llarp::handlers::TunEndpoint *tunEndpoint = this->getFirstTun();
|
|
|
|
|
if (!tunEndpoint)
|
|
|
|
|
{
|
|
|
|
|
llarp::LogError("No tunnel endpoint found");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//HiddenServiceAddresslookup *lookup = new HiddenServiceEndpoint(tunEndpoint, callback, addr, tunEndpoint->GenTXID());
|
|
|
|
|
return tunEndpoint->EnsurePathToService(addr, [](Address addr, void* ctx) {}, 10000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
Context::MapAddress(const llarp::service::Address &addr, uint32_t ip)
|
|
|
|
|
{
|
|
|
|
|