p2p/protocol/autonatv2 library

Classes

AutoNATv2
Interface for the AutoNAT v2 service
AutoNATv2Client
Interface for the AutoNAT v2 client
AutoNATv2ClientImpl
Client implementation for AutoNAT v2
AutoNATv2Impl
Implementation of the AutoNAT v2 service
AutoNATv2Protocols
Protocol names for AutoNAT v2
AutoNATv2Server
Interface for the AutoNAT v2 server
AutoNATv2ServerImpl
Server implementation for AutoNAT v2
AutoNATv2Settings
Settings for AutoNAT v2
ClientErrors
Errors for the client
EventDialRequestCompleted
Event for dial request completion
MetricsTracer
Interface for metrics tracing
Request
Request to verify reachability of a single address
Result
Result of the CheckReachability call
ServerErrors
Errors for the server

Functions

allowPrivateAddrs() AutoNATv2Option
Create an option for allowing private addresses (for testing)
amplificationAttackPrevention(P2PStream stream, MultiAddr dialAddr) bool
Amplification attack prevention policy
defaultSettings() AutoNATv2Settings
Default settings for AutoNAT v2
withAmplificationAttackPreventionDialWait(Duration duration) AutoNATv2Option
Create an option for setting the amplification attack prevention dial wait time
withDataRequestPolicy(DataRequestPolicyFunc policy) AutoNATv2Option
Create an option for setting the data request policy
withMetricsTracer(MetricsTracer metricsTracer) AutoNATv2Option
Create an option for setting the metrics tracer
withServerRateLimit(int rpm, int perPeerRPM, int dialDataRPM) AutoNATv2Option
Create an option for setting the server rate limits

Typedefs

AutoNATv2Option = AutoNATv2Settings Function(AutoNATv2Settings settings)
Option for configuring AutoNAT v2