All the work of managing locally created and participating tunnels, creating and handling tunnel messages, and their encryption. Deals with the five different types of tunnel hops: outbound gateway, outbound endpoint, inbound gateway, inbound endpoint, and middle hop. Distributes messages received for each type. Validation, queueing and throttling for each type. Tunnel build message handling is in the pool package.
Interface Summary Interface Description FragmentHandler.DefragmentedReceiverReceive messages out of the tunnel endpoint. IVValidatorProvide a generic interface for IV validation which may be implemented through something as simple as a hashtable or more a complicated bloom filter. TunnelGateway.QueuePreprocessor TunnelGateway.Receiver TunnelGateway.Sender
Class Summary Class Description BatchedPreprocessorBatching preprocessor that will briefly delay the sending of a message if it doesn't fill up a full tunnel message, in which case it queues up an additional flush task. BatchedRouterPreprocessorHonor the 'batchFrequency' tunnel pool setting or the 'router.batchFrequency' router config setting, and track fragmentation. BloomFilterIVValidatorManage the IV validation for all of the router's tunnels by way of a big decaying bloom filter. DummyValidatoraccept everything FragmentedMessageGather fragments of I2NPMessages at a tunnel endpoint, making them available for reading when complete. FragmentHandlerHandle fragments at the endpoint of a tunnel, peeling off fully completed I2NPMessages when they arrive, and dropping fragments if they take too long to arrive. HashSetIVValidator Deprecated.unused HopConfigDefines the general configuration for a hop in a tunnel. HopProcessorTake a received tunnel message, verify that it isn't a duplicate, and translate it into what the next hop will want. InboundEndpointProcessorReceive the inbound tunnel message, removing all of the layers added by earlier hops to recover the preprocessed data sent by the gateway. InboundGatewayProcessorOverride the hop processor to seed the message with a random IV. InboundGatewayReceiverHandle messages at the IBGW. InboundMessageDistributorWhen a message arrives at the inbound tunnel endpoint, this distributor honors the instructions (safely) InboundSenderReceive the preprocessed data for an inbound gateway, encrypt it, and forward it on to the first hop. OutboundGatewayMessageStores all the state for an unsent or partially-sent message OutboundGatewayProcessorTurn the preprocessed tunnel data into something that can be delivered to the first hop in the tunnel. OutboundMessageDistributorWhen a message arrives at the outbound tunnel endpoint, this distributor honors the instructions. OutboundReceiverWe are the outbound gateway - we created this outbound tunnel. OutboundSenderReceive the preprocessed data for an outbound gateway, encrypt all of the layers, and forward it on to the first hop. OutboundTunnelEndpointWe are the end of an outbound tunnel that we did not create. PendingGatewayMessageStores all the state for an unsent or partially-sent message PumpedTunnelGatewayThis is used for all gateways with more than zero hops. RouterFragmentHandlerMinor extension to allow message history integration ThrottledPumpedTunnelGatewaySame as PTG, but check to see if a message should be dropped before queueing it. TrivialPreprocessorDo the simplest thing possible for preprocessing - for each message available, turn it into the minimum number of fragmented preprocessed blocks, sending each of those out. TrivialRouterPreprocessor Deprecated.unused TunnelCreatorConfigCoordinate the info that the tunnel creator keeps track of, including what peers are in the tunnel and what their configuration is See PooledTunnelCreatorConfig for the non-abstract class TunnelDispatcherHandle the actual processing and forwarding of messages through the various tunnels. TunnelGatewayServe as the gatekeeper for a tunnel, accepting messages, coallescing and/or fragmenting them before wrapping them up for tunnel delivery. TunnelGatewayPumperRun through the tunnel gateways that have had messages added to them and push those messages through the preprocessing and sending process. TunnelGatewayZeroHopServe as the gatekeeper for a tunnel with no hops, either inbound or outbound. TunnelParticipantParticipate in a tunnel at a location other than the gateway or outbound endpoint.
Enum Summary Enum Description TunnelDispatcher.Locationfor shouldDropParticipatingMessage()