| Package | Description |
|---|---|
| net.i2p.data.i2np | This package defines the low-level messages sent between routers,
called Invisible Internet Network Protocol (I2NP). |
| net.i2p.data.router | Router-specific data structures and identity management classes for I2P. |
| net.i2p.router | The I2P router application handles I2P network communication. |
| net.i2p.router.crypto | Router-specific cryptographic operations and implementations for I2P security. |
| net.i2p.router.dummy | Dummy implementations and stub classes for testing purposes. |
| net.i2p.router.message | Garlic message creation, parsing, and source routing for I2P communications. |
| net.i2p.router.networkdb.kademlia | Kademlia DHT implementation and floodfill router functionality for I2P. |
| net.i2p.router.startup | The I2P startup package loads configuration when I2P is started. |
| net.i2p.router.sybil | Offline analysis tools for detecting Sybil attacks and malicious peer
coordination in the I2P network. |
| net.i2p.router.transport | Transport layer implementations and management for I2P network communication. |
| net.i2p.router.transport.ntcp | The NTCP (New TCP) transport for I2P, allowing I2P messages to be passed
over TCP connections. |
| net.i2p.router.transport.udp | The UDP transport (also known as 'SSU' or Secure Semi-reliable UDP transport)
for I2P, allowing I2P messages to be passed over UDP connections. |
| net.i2p.router.tunnel.pool | Tunnel pool management, creation, and peer selection for I2P's anonymous routing system. |
| net.i2p.router.util | Utility classes and helper functions used throughout the I2P router. |
| net.i2p.router.web.helpers | Helpers and handlers for the router console user interface, with these classes supporting the webapp in routerconsole.war. |
| Modifier and Type | Method and Description |
|---|---|
static boolean | DatabaseLookupMessage.supportsEncryptedReplies(RouterInfo to)Does this router support encrypted replies? |
static boolean | DatabaseLookupMessage.supportsRatchetReplies(RouterInfo to)Does this router support ratchet replies? |
| Constructor and Description |
|---|
RouterInfo(RouterInfo old)Used only by Router and PublishLocalRouterInfoJob. |
| Modifier and Type | Method and Description |
|---|---|
RouterInfo | Router.getRouterInfo()Our current router info. |
RouterInfo | OutNetMessage.getTarget()Specifies the router to which the message should be delivered. |
abstract RouterInfo | NetworkDatabaseFacade.lookupRouterInfoLocally(Hash key)key). |
abstract RouterInfo | NetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo) |
| Modifier and Type | Method and Description |
|---|---|
Set<RouterInfo> | NetworkDatabaseFacade.getRouters()public for NetDbRenderer in routerconsole |
| Modifier and Type | Method and Description |
|---|---|
boolean | Blocklist.isBlocklisted(RouterInfo pinfo)Check if a peer is blocklisted by IP address. |
boolean | CommSystemFacade.isInStrictCountry(RouterInfo ri)Whether the given router's country is blocked. |
void | BanLogger.logBan(Hash hash,
String ip,
String reason,
long durationMs,
RouterInfo ri)Log a ban with RouterInfo for direct caps extraction. |
void | BanLogger.logBanForever(Hash hash,
String ip,
String reason,
RouterInfo ri)Log a permanent ban with RouterInfo for direct caps extraction. |
abstract void | NetworkDatabaseFacade.publish(RouterInfo localRouterInfo)Publish a RouterInfo to the network database. |
void | Router.setRouterInfo(RouterInfo info)Caller must ensure info is valid - no validation done here. |
abstract RouterInfo | NetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo) |
| Constructor and Description |
|---|
OutNetMessage(RouterContext context,
I2NPMessage msg,
long expiration,
int priority,
RouterInfo target)Standard constructor |
| Modifier and Type | Method and Description |
|---|---|
FamilyKeyCrypto.Result | FamilyKeyCrypto.verify(RouterInfo ri)Verify the family signature in a RouterInfo. |
boolean | FamilyKeyCrypto.verifyOurFamily(RouterInfo ri)Verify the family in a RouterInfo matches ours and the signature is good. |
| Modifier and Type | Method and Description |
|---|---|
RouterInfo | DummyNetworkDatabaseFacade.lookupRouterInfoLocally(Hash key)lookupRouterInfoLocally. |
RouterInfo | DummyNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo)Store a key locally |
| Modifier and Type | Method and Description |
|---|---|
void | DummyNetworkDatabaseFacade.publish(RouterInfo localRouterInfo)Publish a key to the network |
RouterInfo | DummyNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo)Store a key locally |
| Modifier and Type | Method and Description |
|---|---|
RouterInfo | GarlicConfig.getRecipient()Returns the recipient router |
| Modifier and Type | Method and Description |
|---|---|
void | GarlicConfig.setRecipient(RouterInfo info)Router to receive and process this clove - the router that will open the
delivery instructions and decide what to do process it locally as an I2NPMessage,
forward it as an I2NPMessage to a router, forward it as an I2NPMessage to a Destination,
or forward it as an I2NPMessage to a tunnel. |
| Modifier and Type | Method and Description |
|---|---|
RouterInfo | KademliaNetworkDatabaseFacade.lookupRouterInfoLocally(Hash key)This will return immediately with the result or null. |
RouterInfo | KademliaNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo)Store the routerInfo. |
(package private) RouterInfo | KademliaNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo,
boolean persist)Store the routerInfo. |
| Modifier and Type | Method and Description |
|---|---|
List<RouterInfo> | FloodfillNetworkDatabaseFacade.getKnownRouterData()Return all RouterInfo entries from the local data store. |
Set<RouterInfo> | KademliaNetworkDatabaseFacade.getRouters() |
| Modifier and Type | Method and Description |
|---|---|
protected I2NPMessage | ExploreJob.buildMessage(TunnelId replyTunnelId,
Hash replyGateway,
long expiration,
RouterInfo peer)Builds the database lookup message to send to a peer. |
protected I2NPMessage | SearchJob.buildMessage(TunnelId replyTunnelId,
Hash replyGateway,
long expiration,
RouterInfo peer)Build the database search message |
String | KademliaNetworkDatabaseFacade.getRouterIPPort(RouterInfo router)Extract IP address and port from RouterInfo for logging to sessionbans.txt. |
static boolean | FloodfillNetworkDatabaseFacade.isFloodfill(RouterInfo peer)Checks if a RouterInfo has floodfill capability. |
protected void | FloodfillNetworkDatabaseFacade.lookupBeforeDropping(Hash peer,
RouterInfo info)Search for a newer router info, drop it from the db if the search fails,
unless just started up or have bigger problems. |
protected void | KademliaNetworkDatabaseFacade.lookupBeforeDropping(Hash peer,
RouterInfo info)Don't use directly - see F.N.D.F. |
(package private) void | FloodfillNetworkDatabaseFacade.probeStalePeer(Hash peer,
RouterInfo ri)Fire a DirectLookupJob for a stale peer, deduplicated via _activeFloodQueries. |
void | FloodfillNetworkDatabaseFacade.publish(RouterInfo localRouterInfo)Send our RI to the closest floodfill. |
void | KademliaNetworkDatabaseFacade.publish(RouterInfo localRouterInfo)Stores to local db only. |
protected void | SearchJob.sendLeaseSearch(RouterInfo router)we're (probably) searching for a LeaseSet, so to be (overly) cautious, we're sending
the request out through a tunnel w/ reply back through another tunnel. |
protected void | SearchJob.sendRouterSearch(RouterInfo router)We're searching for a router, so we can just send direct |
protected void | SearchJob.sendSearch(RouterInfo router)Send a search to the given peer |
(package private) static boolean | StoreJob.shouldStoreEncLS2To(RouterInfo ri)Is it new enough? |
(package private) static boolean | StoreJob.shouldStoreLS2To(RouterInfo ri)Is it new enough? |
(package private) static boolean | StoreJob.shouldStoreTo(RouterInfo ri)Is it new enough? |
RouterInfo | KademliaNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo)Store the routerInfo. |
(package private) RouterInfo | KademliaNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo,
boolean persist)Store the routerInfo. |
(package private) String | KademliaNetworkDatabaseFacade.validate(RouterInfo routerInfo)Determine whether this routerInfo will be accepted as valid and current
given what we know now. |
(package private) static MessageWrapper.WrappedMessage | MessageWrapper.wrap(RouterContext ctx,
I2NPMessage m,
Hash from,
RouterInfo to)Garlic wrap a message from a client or this router, destined for a router,
to hide the contents from the OBEP. |
static GarlicMessage | MessageWrapper.wrap(RouterContext ctx,
I2NPMessage m,
RouterInfo to)Garlic wrap a message from nobody, destined for a router,
to hide the contents from the OBEP. |
| Constructor and Description |
|---|
DirectLookupJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash peer,
RouterInfo oldRI,
Job onFind,
Job onFail) |
FailedJob(RouterContext enclosingContext,
RouterInfo peer) |
FailedJob(RouterContext enclosingContext,
RouterInfo peer,
boolean penalizePeer)Allow the choice as to whether failed searches should count against
the peer (such as if we search for a random key) |
SearchMessageSelector(RouterContext context,
RouterInfo peer,
long expiration,
SearchState state)SearchMessageSelector. |
SearchUpdateReplyFoundJob(RouterContext context,
RouterInfo peer,
SearchState state,
KademliaNetworkDatabaseFacade facade,
SearchJob job)Create job with no tunnel info |
SearchUpdateReplyFoundJob(RouterContext context,
RouterInfo peer,
SearchState state,
KademliaNetworkDatabaseFacade facade,
SearchJob job,
TunnelInfo outTunnel,
TunnelInfo replyTunnel)Create job with tunnel info for reply routing |
StoreMessageSelector(RouterContext ctx,
long storeJobId,
RouterInfo peer,
long waitingForId,
long expiration)Creates a new message selector for database store confirmations. |
| Modifier and Type | Method and Description |
|---|---|
(package private) RouterInfo | CreateRouterInfoJob.createRouterInfo()Writes 6 files: router.info (standard RI format),
router.keys.dat, and 4 individual key files under keyBackup/
router.keys.dat file format: This is the
same "eepPriv.dat" format used by the client code,
as documented in PrivateKeyFile. |
| Modifier and Type | Field and Description |
|---|---|
RouterInfo | Pair.r1r1. |
RouterInfo | Pair.r2r2. |
| Modifier and Type | Method and Description |
|---|---|
Map<Integer,List<RouterInfo>> | Analysis.calculateIPGroups16(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their /16 subnet to identify routers in the same /16 network. |
Map<Integer,List<RouterInfo>> | Analysis.calculateIPGroups24(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their /24 subnet to identify routers in the same /24 network. |
Map<Integer,List<RouterInfo>> | Analysis.calculateIPGroups32(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their IP address to identify routers sharing the same IP. |
Map<Long,List<RouterInfo>> | Analysis.calculateIPGroups48(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their IPv6 /48 subnet to identify routers in the same /48 network. |
Map<Long,List<RouterInfo>> | Analysis.calculateIPGroups64(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their IPv6 /64 subnet to identify routers in the same /64 network. |
Map<String,List<RouterInfo>> | Analysis.calculateIPGroupsFamily(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their router family to identify routers in the same family. |
List<RouterInfo> | Analysis.getAllRouters(Hash us)Returns all routers in the network DB, excluding our own router. |
List<RouterInfo> | Analysis.getFloodfills(Hash us)Returns all floodfill routers, excluding our own router. |
| Modifier and Type | Method and Description |
|---|---|
void | Analysis.addProfilePoints(List<RouterInfo> ris,
Map<Hash,Points> points)Analyzes router profiles and adds Sybil points for banlisted, newly observed,
or poorly performing routers. |
void | Analysis.addVersionPoints(List<RouterInfo> ris,
Map<Hash,Points> points)Analyzes router versions and adds Sybil points for old, unreachable,
or non-floodfill routers. |
Map<Integer,List<RouterInfo>> | Analysis.calculateIPGroups16(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their /16 subnet to identify routers in the same /16 network. |
Map<Integer,List<RouterInfo>> | Analysis.calculateIPGroups24(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their /24 subnet to identify routers in the same /24 network. |
Map<Integer,List<RouterInfo>> | Analysis.calculateIPGroups32(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their IP address to identify routers sharing the same IP. |
Map<Long,List<RouterInfo>> | Analysis.calculateIPGroups48(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their IPv6 /48 subnet to identify routers in the same /48 network. |
Map<Long,List<RouterInfo>> | Analysis.calculateIPGroups64(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their IPv6 /64 subnet to identify routers in the same /64 network. |
Map<String,List<RouterInfo>> | Analysis.calculateIPGroupsFamily(List<RouterInfo> ris,
Map<Hash,Points> points)Categorize routers by their router family to identify routers in the same family. |
void | Analysis.calculateIPGroupsUs(List<RouterInfo> ris,
Map<Hash,Points> points,
List<RouterInfo> ri32,
List<RouterInfo> ri24,
List<RouterInfo> ri16,
List<RouterInfo> ri64,
List<RouterInfo> ri48)Categorize routers by their proximity to our IP address, grouping them by /32, /24, /16
for IPv4 and /64, /48 for IPv6. |
void | Analysis.calculateIPGroupsUs(List<RouterInfo> ris,
Map<Hash,Points> points,
List<RouterInfo> ri32,
List<RouterInfo> ri24,
List<RouterInfo> ri16,
List<RouterInfo> ri64,
List<RouterInfo> ri48)Categorize routers by their proximity to our IP address, grouping them by /32, /24, /16
for IPv4 and /64, /48 for IPv6. |
void | Analysis.calculateIPGroupsUs(List<RouterInfo> ris,
Map<Hash,Points> points,
List<RouterInfo> ri32,
List<RouterInfo> ri24,
List<RouterInfo> ri16,
List<RouterInfo> ri64,
List<RouterInfo> ri48)Categorize routers by their proximity to our IP address, grouping them by /32, /24, /16
for IPv4 and /64, /48 for IPv6. |
void | Analysis.calculateIPGroupsUs(List<RouterInfo> ris,
Map<Hash,Points> points,
List<RouterInfo> ri32,
List<RouterInfo> ri24,
List<RouterInfo> ri16,
List<RouterInfo> ri64,
List<RouterInfo> ri48)Categorize routers by their proximity to our IP address, grouping them by /32, /24, /16
for IPv4 and /64, /48 for IPv6. |
void | Analysis.calculateIPGroupsUs(List<RouterInfo> ris,
Map<Hash,Points> points,
List<RouterInfo> ri32,
List<RouterInfo> ri24,
List<RouterInfo> ri16,
List<RouterInfo> ri64,
List<RouterInfo> ri48)Categorize routers by their proximity to our IP address, grouping them by /32, /24, /16
for IPv4 and /64, /48 for IPv6. |
void | Analysis.calculateIPGroupsUs(List<RouterInfo> ris,
Map<Hash,Points> points,
List<RouterInfo> ri32,
List<RouterInfo> ri24,
List<RouterInfo> ri16,
List<RouterInfo> ri64,
List<RouterInfo> ri48)Categorize routers by their proximity to our IP address, grouping them by /32, /24, /16
for IPv4 and /64, /48 for IPv6. |
double | Analysis.calculatePairDistance(List<RouterInfo> ris,
Map<Hash,Points> points,
List<Pair> pairs)Calculate average pairwise distance between floodfills and identifies routers that are
unusually close to each other. |
void | Analysis.calculateRouterInfo(Hash us,
String usName,
List<RouterInfo> ris,
Map<Hash,Points> points)Build the version comparison report. |
double | Analysis.getAvgMinDist(List<RouterInfo> ris)Calculates the average minimum distance from 200 random routing keys
to the closest router in the provided list. |
| Constructor and Description |
|---|
Pair(RouterInfo ri1,
RouterInfo ri2,
BigInteger distance)Pair. |
| Modifier and Type | Method and Description |
|---|---|
TransportBid | Transport.bid(RouterInfo toAddress,
int dataSize)Request to send a message to the specified router. |
static byte[] | CommSystemFacadeImpl.getCompatibleIP(RouterInfo ri)Get an IP address compatible with our capabilities (IPv4/IPv6). |
List<RouterAddress> | TransportImpl.getTargetAddresses(RouterInfo target)Get all available address we can use, shuffled and then sorted by cost/preference. |
static byte[] | CommSystemFacadeImpl.getValidIP(RouterInfo ri)Return first valid IP (v4 or v6) we find, any transport. |
boolean | CommSystemFacadeImpl.isInStrictCountry(RouterInfo ri)Are they in a strict country |
| Modifier and Type | Method and Description |
|---|---|
TransportBid | NTCPTransport.bid(RouterInfo toAddress,
int dataSize)bid. |
void | InboundEstablishState.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood)Validates Alice's RouterInfo and extracts the static key for comparison. |
void | NTCP2Payload.PayloadCallback.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood) |
| Constructor and Description |
|---|
RIBlock(RouterInfo ri,
boolean flood)RIBlock. |
| Modifier and Type | Method and Description |
|---|---|
TransportBid | UDPTransport.bid(RouterInfo toAddress,
int dataSize)Data size. |
UDPPacket[] | PacketBuilder2.buildSessionConfirmedPackets(OutboundEstablishState2 state,
RouterInfo ourInfo)Build a new series of SessionConfirmed packets for the given peer,
encrypting it as necessary. |
(package private) RouterAddress | UDPTransport.getTargetAddress(RouterInfo target)first available address we can use. |
void | SSU2Payload.PayloadCallback.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood)Receive a complete RouterInfo block. |
void | OutboundEstablishState2.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood) |
void | InboundEstablishState2.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood)For most errors here we throw a RIException with a reason code,
which is caught in processPayload() to create a PeerStateDestroyed
and send a termination with that reason. |
void | PeerStateDestroyed.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood)gotRI. |
void | PeerState2.gotRI(RouterInfo ri,
boolean isHandshake,
boolean flood)gotRI. |
| Modifier and Type | Method and Description |
|---|---|
boolean | ConnectChecker.canConnect(int ourMask,
RouterInfo to)Can we connect to "to" based on published addresses?
This is intended for tunnel candidates, where we already have
the RI. |
boolean | ConnectChecker.canConnect(RouterInfo from,
int ourMask)Can "from" connect to us based on published addresses?
This is intended for tunnel candidates, where we already have
the RI. |
int | ConnectChecker.getInboundMask(RouterInfo us)Our inbound mask. |
int | ConnectChecker.getOutboundMask(RouterInfo us)Our outbound mask. |
static boolean | TunnelPeerSelector.shouldExclude(RouterContext ctx,
RouterInfo peer)Should the peer be excluded based on its published caps, crypto, and version? |
| Constructor and Description |
|---|
MaskedIPSet(RouterContext ctx,
Hash peer,
RouterInfo pinfo,
int mask)The Set of IPs for this peer, with a given mask. |
MaskedIPSet(RouterContext ctx,
RouterInfo pinfo,
int mask)The Set of IPs for this peer, with a given mask. |
| Modifier and Type | Method and Description |
|---|---|
static int | RouterInfoComparator.comp(RouterInfo l,
RouterInfo r)Static comparison of two RouterInfos by their hash. |
int | RouterInfoComparator.compare(RouterInfo l,
RouterInfo r)Compare two RouterInfos by their hash. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> | NetDbRenderer.precacheReverseDNSLookups(Collection<RouterInfo> routers)precacheReverseDNSLookups. |
String | NetDbRenderer.renderRouterInfosInParallel(Collection<RouterInfo> routerInfos,
boolean isLocalRouter)Renders multiple RouterInfo objects in parallel. |
void | NetDbRenderer.renderRoutersToWriter(Collection<RouterInfo> routers,
Writer out,
boolean isLocal,
int page,
int pageSize)Renders a list of RouterInfo objects to given Writer. |
void | NetDbRenderer.renderRoutersToWriter(Collection<RouterInfo> routers,
Writer out,
boolean isLocal,
int page,
int pageSize,
boolean applyPagination)Renders a list of RouterInfo objects to given Writer. |