llarp::exit::Context

owner of all the exit endpoints

#include <context.hpp>

Public Types

Name
using std::unordered_map< PubKey, std::pair< uint64_t, uint64_t > > TrafficStats
calculate (pk, tx, rx) for all exit traffic

Public Functions

Name
Context(AbstractRouter * r)
~Context()
void Tick(llarp_time_t now)
void ClearAllEndpoints()
void Stop()
send close to all exit sessions and remove all sessions
void AddExitEndpoint(const std::string & name, const NetworkConfig & networkConfig, const DnsConfig & dnsConfig)
bool ObtainNewExit(const PubKey & remote, const PathID_t & path, bool permitInternet)
exit::Endpoint * FindEndpointForPath(const PathID_t & path) const
void CalculateExitTraffic(TrafficStats & stats)
std::shared_ptr< handlers::ExitEndpoint > GetExitEndpoint(std::string name) const

Public Types Documentation

using TrafficStats

using llarp::exit::Context::TrafficStats =  std::unordered_map<PubKey, std::pair<uint64_t, uint64_t> >;

calculate (pk, tx, rx) for all exit traffic

Public Functions Documentation

function Context

Context(
    AbstractRouter * r
)

function ~Context

~Context()

function Tick

void Tick(
    llarp_time_t now
)

function ClearAllEndpoints

void ClearAllEndpoints()

function Stop

void Stop()

send close to all exit sessions and remove all sessions

function AddExitEndpoint

void AddExitEndpoint(
    const std::string & name,
    const NetworkConfig & networkConfig,
    const DnsConfig & dnsConfig
)

function ObtainNewExit

bool ObtainNewExit(
    const PubKey & remote,
    const PathID_t & path,
    bool permitInternet
)

function FindEndpointForPath

exit::Endpoint * FindEndpointForPath(
    const PathID_t & path
) const

function CalculateExitTraffic

void CalculateExitTraffic(
    TrafficStats & stats
)

function GetExitEndpoint

std::shared_ptr< handlers::ExitEndpoint > GetExitEndpoint(
    std::string name
) const

Updated on 2026-01-10 at 22:49:45 +0000