| Package | Description |
|---|---|
| net.i2p.client | Interfaces and factories for the base I2P SDK used to develop applications that communicate through I2P. |
| net.i2p.client.datagram | Provides a standard way for reading and writing messages transferred over I2P so that recipient has an authenticated mechanism to reply to it. |
| net.i2p.client.impl | Internal implementation of the I2P client SDK, providing the client
side of the I2CP protocol for applications communicating through I2P. |
| net.i2p.client.naming | Naming service for resolving human-readable names to I2P destinations,
providing a standard interface without JNDI complexity. |
| net.i2p.client.streaming.impl | Implementation of a TCP-like (reliable, authenticated, in order) set of sockets for communicating over the IP-like (unreliable, unauthenticated, unordered) I2P messages. |
| net.i2p.crypto | Core cryptographic primitives and algorithms used throughout I2P. |
| net.i2p.data | These classes define the common data structures used by the various I2P protocols. |
| net.i2p.data.i2cp | The Invisible Internet Client Protocol (I2CP) allows applications simplified access to I2P network without requiring them to deal with the issues involved with the Invisible Internet Network Protocol (I2NP). |
| 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.i2ptunnel | Implementation of preconfigured tunnels for both clients and servers, with a comprehensive UI for tunnel management and configuration. |
| net.i2p.i2ptunnel.access | Definition-based incoming connection filter for I2PTunnel, allowing fine-grained
access control for server tunnels. |
| net.i2p.router | The I2P router application handles I2P network communication. |
| net.i2p.router.client | Router-side implementation of the I2CP (I2P Client Protocol) interface for application integration. |
| 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.naming | The default naming service implementation for the I2P router, using the
BlockfileNamingService based on the Metanotion BlockFile Database. |
| net.i2p.router.networkdb | Network database management and coordination for the I2P distributed hash table. |
| net.i2p.router.networkdb.kademlia | Kademlia DHT implementation and floodfill router functionality for I2P. |
| net.i2p.router.peermanager | Peer management, profiling, and capacity calculation for I2P network optimization. |
| 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 | Core tunnel management, message processing, and encryption for I2P's anonymous routing system. |
| 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. |
| net.i2p.util | Core utility classes and helper functions used throughout the I2P router and applications. |
| org.klomp.snark | I2P version of the snark bittorrent client, imported in 2005 and heavily enhanced to add a web UI, DHT support, and other features. |
| org.klomp.snark.dht | Distributed Hash Table (DHT) implementation for BitTorrent. |
| Modifier and Type | Method and Description |
|---|---|
Destination | I2PSession.lookupDest(Hash h)Lookup a Destination by Hash. |
Destination | I2PSession.lookupDest(Hash h,
long maxWait)Lookup a Destination by Hash. |
LookupResult | I2PSession.lookupDest(Hash h,
long maxWait,
LookupCallback callback)Lookup a Destination by hash. |
| Modifier and Type | Method and Description |
|---|---|
Hash | I2PDatagramDissector.extractHash()Extract the hash of the payload of an I2P repliable datagram (previously
loaded with the loadI2PDatagram() method), without verifying the datagram
signature. |
Hash | I2PDatagramDissector.getHash()Extract the hash of the payload of an I2P repliable datagram (previously
loaded with the loadI2PDatagram() method), verifying the datagram
signature. |
Hash | Datagram3.getSender()Get the sender of an I2P repliable datagram (previously loaded with the
load() method) |
| Modifier and Type | Method and Description |
|---|---|
static byte[] | Datagram2.make(I2PAppContext ctx,
I2PSession session,
byte[] payload,
Hash tohash)Make a repliable I2P datagram2 containing the specified payload. |
static byte[] | Datagram2.make(I2PAppContext ctx,
I2PSession session,
byte[] payload,
Hash tohash,
Properties options)Make a repliable I2P datagram2 containing the specified payload. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | I2PSessionImpl.destLookupFailed(Hash h)Called by the message handler
on reception of DestReplyMessage |
(package private) void | SubSession.destLookupFailed(Hash h)Called by the message handler
on reception of DestReplyMessage
This will never happen, as the dest reply message does not contain a session ID. |
Destination | I2PSessionImpl.lookupDest(Hash h)Blocking. |
Destination | SubSession.lookupDest(Hash h)Blocking. |
Destination | I2PSessionImpl.lookupDest(Hash h,
long maxWait)Blocking. |
Destination | SubSession.lookupDest(Hash h,
long maxWait)Blocking. |
LookupResult | I2PSessionImpl.lookupDest(Hash h,
long maxWait,
LookupCallback callback)Lookup a Destination by hostname. |
| Modifier and Type | Method and Description |
|---|---|
Destination | NamingService.lookup(Hash hash,
int timeout)Same as lookupBase32() but with the SHA256 Hash precalculated
This implementation returns null. |
String | NamingService.reverseLookup(Hash h)Reverse lookup a hash. |
List<String> | NamingService.reverseLookupAll(Hash h)Reverse lookup a hash. |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | ConnectionOptions.getAccessList() |
Set<Hash> | ConnectionOptions.getBlacklist() |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean | ConnThrottler.isOverBy(Hash h,
int over)Checks if individual count is over the limit by this much. |
(package private) boolean | ConnThrottler.shouldThrottle(Hash h)Checks both individual and total. |
| Modifier and Type | Method and Description |
|---|---|
Hash | SHA256Generator.calculateHash(byte[] source)Calculate the SHA-256 hash of the source and cache the result. |
Hash | SHA256Generator.calculateHash(byte[] source,
int start,
int len)Calculate the hash and cache the result. |
| Modifier and Type | Method and Description |
|---|---|
Signature | DSAEngine.sign(Hash hash,
SigningPrivateKey signingKey)Nonstandard. |
boolean | DSAEngine.verifySignature(Signature signature,
Hash hash,
SigningPublicKey verifyingKey)Nonstandard. |
| Modifier and Type | Field and Description |
|---|---|
protected Hash | Lease._gatewayGateway router hash. |
static Hash | Hash.FAKE_HASHPlaceholder all-zero hash for testing. |
| Modifier and Type | Method and Description |
|---|---|
Hash | DataStructureImpl.calculateHash() |
Hash | SimpleDataStructure.calculateHash()SHA256 hash of the byte array, or null if data is null. |
Hash | DataStructure.calculateHash()Calculate the SHA256 value of this object (useful for a few scenarios) |
Hash | KeysAndCert.calculateHash()Throws IllegalStateException if keys and cert are not initialized,
as of 0.9.12. |
static Hash | Hash.create(byte[] data)Pull from cache or return new
WARNING - If the SDS is found in the cache, the passed-in
byte array will be returned to the SimpleByteCache for reuse. |
static Hash | Hash.create(byte[] data,
int off)Pull from cache or return new |
static Hash | Hash.create(InputStream in)Pull from cache or return new |
Hash | BlindData.getBlindedHash()Gets the hash of the blinded key for the current day. |
Hash | LeaseSet2.getBlindedHash()The orignal blinded hash, where this came from. |
Hash | BlindData.getDestHash()Gets the destination hash if known. |
Hash | Lease.getGateway()Retrieve the router at which the destination can be contacted |
Hash | DatabaseEntry.getHash()A common interface to the Hash of the two subclasses. |
Hash | EncryptedLeaseSet.getHash()This must be used instead of getDestination().getHash(). |
Hash | KeysAndCert.getHash()Throws IllegalStateException if keys and cert are not initialized,
as of 0.9.12. |
Hash | DatabaseEntry.getReceivedBy()The Hash of the local client that received this LS,
null if the router or unknown. |
Hash | DatabaseEntry.getRoutingKey()Routing key for the structure using the current modifier in the RoutingKeyGenerator. |
abstract Hash | RoutingKeyGenerator.getRoutingKey(Hash origKey)Get the routing key for a key. |
| Modifier and Type | Method and Description |
|---|---|
abstract Hash | RoutingKeyGenerator.getRoutingKey(Hash origKey)Get the routing key for a key. |
void | LeaseSet2.setBlindedHash(Hash bh)Set this on creation if known |
void | Lease.setGateway(Hash ident)Configure the router at which the destination can be contacted |
void | LeaseSet.setReceivedBy(Hash localClient)As of 0.9.65, no longer sets receivedAsReply to true |
void | DatabaseEntry.setReceivedBy(Hash receivedBy)Sets the local client that received this entry. |
| Modifier and Type | Method and Description |
|---|---|
Hash | HostLookupMessage.getHash()Gets the hash for hash-type lookups. |
Hash | DestLookupMessage.getHash()Hash. |
Hash | DestReplyMessage.getHash()Gets the hash of the destination. |
Hash | BlindingInfoMessage.getHash()Gets the hash for hash-type endpoints. |
Hash | RequestLeaseSetMessage.getRouter(int endpoint)Router. |
| Modifier and Type | Method and Description |
|---|---|
void | RequestLeaseSetMessage.addEndpoint(Hash router,
TunnelId tunnel)addEndpoint. |
| Constructor and Description |
|---|
BlindingInfoMessage(Hash h,
SessionId id,
int expiration,
int authType,
SigType blindType,
PrivateKey privKey,
String secret)Deprecated. unimplemented on router side |
DestLookupMessage(Hash h)DestLookupMessage. |
DestReplyMessage(Hash h)Non-null with non-null data. |
HostLookupMessage(SessionId id,
Hash h,
long reqID,
long timeout)Session id. |
| Modifier and Type | Method and Description |
|---|---|
Hash | DeliveryInstructions.getDestination()default null |
Hash | DatabaseLookupMessage.getFrom()Contains the router who requested this lookup |
Hash | DatabaseSearchReplyMessage.getFromHash() |
Hash | DatabaseStoreMessage.getKey()Defines the key in the network database being stored. |
Hash | DatabaseSearchReplyMessage.getReply(int index) |
Hash | DatabaseStoreMessage.getReplyGateway()Get the reply gateway. |
Hash | DeliveryInstructions.getRouter()default null |
Hash | DatabaseLookupMessage.getSearchKey()Defines the key being searched for |
Hash | DatabaseSearchReplyMessage.getSearchKey()Defines the key being searched for |
Hash | BuildRequestRecord.readNextIdentity()Reads the next hop's identity hash. |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | DatabaseLookupMessage.getDontIncludePeers()Set of peers that a lookup reply should NOT include. |
| Modifier and Type | Method and Description |
|---|---|
void | DatabaseLookupMessage.addDontIncludePeer(Hash peer)Add to the set. |
void | DatabaseSearchReplyMessage.addReply(Hash peer)addReply. |
EncryptedBuildRecord | BuildRequestRecord.encryptECIESRecord(RouterContext ctx,
PublicKey toKey,
Hash toPeer)Encrypts the record using ECIES. |
EncryptedBuildRecord | BuildRequestRecord.encryptRecord(I2PAppContext ctx,
PublicKey toKey,
Hash toPeer)Encrypts the record using ElGamal. |
void | DeliveryInstructions.setDestination(Hash dest)required for DESTINATION |
void | DatabaseLookupMessage.setFrom(Hash from) |
void | DatabaseSearchReplyMessage.setFromHash(Hash from)setFromHash. |
void | DatabaseStoreMessage.setReplyGateway(Hash peer)Set the reply gateway. |
void | DeliveryInstructions.setRouter(Hash router)required for ROUTER or TUNNEL |
void | DatabaseLookupMessage.setSearchKey(Hash key) |
void | DatabaseSearchReplyMessage.setSearchKey(Hash key) |
| Modifier and Type | Method and Description |
|---|---|
void | DatabaseLookupMessage.addDontIncludePeers(Collection<Hash> peers)Add to the set. |
void | DatabaseLookupMessage.setDontIncludePeers(Collection<Hash> peers)Replace the dontInclude set with this set. |
| Constructor and Description |
|---|
BuildRequestRecord(I2PAppContext ctx,
long receiveTunnelId,
Hash peer,
long nextTunnelId,
Hash nextHop,
long nextMsgId,
SessionKey layerKey,
SessionKey ivKey,
SessionKey replyKey,
byte[] iv,
boolean isInGateway,
boolean isOutEndpoint)Creates a new ElGamal build request record. |
BuildRequestRecord(I2PAppContext ctx,
long receiveTunnelId,
long nextTunnelId,
Hash nextHop,
long nextMsgId,
boolean isInGateway,
boolean isOutEndpoint,
Properties options)Creates a new ECIES short build request record. |
BuildRequestRecord(I2PAppContext ctx,
long receiveTunnelId,
long nextTunnelId,
Hash nextHop,
long nextMsgId,
SessionKey layerKey,
SessionKey ivKey,
SessionKey replyKey,
byte[] iv,
boolean isInGateway,
boolean isOutEndpoint,
Properties options)Creates a new ECIES long build request record. |
| Modifier and Type | Method and Description |
|---|---|
Hash | RouterKeyGenerator.getNextRoutingKey(Hash origKey)Get the routing key using tomorrow's modData, not today's |
Hash | RouterKeyGenerator.getRoutingKey(Hash origKey)Generate a modified (yet consistent) hash from the origKey by generating the
SHA256 of the targetKey with the current modData appended to it
This makes Sybil's job a lot harder, as she needs to essentially take over the
whole keyspace. |
Hash | RouterKeyGenerator.getRoutingKey(Hash origKey,
long time)Get the routing key for the specified date, not today's |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | RouterInfo.getPeers()Retrieve a set of SHA-256 hashes of RouterIdentities from routers
this router can be reached through. |
| Modifier and Type | Method and Description |
|---|---|
Hash | RouterKeyGenerator.getNextRoutingKey(Hash origKey)Get the routing key using tomorrow's modData, not today's |
Hash | RouterKeyGenerator.getRoutingKey(Hash origKey)Generate a modified (yet consistent) hash from the origKey by generating the
SHA256 of the targetKey with the current modData appended to it
This makes Sybil's job a lot harder, as she needs to essentially take over the
whole keyspace. |
Hash | RouterKeyGenerator.getRoutingKey(Hash origKey,
long time)Get the routing key for the specified date, not today's |
| Modifier and Type | Method and Description |
|---|---|
void | RouterInfo.setPeers(Set<Hash> peers)Specify a set of SHA-256 hashes of RouterIdentities from routers
this router can be reached through. |
| Modifier and Type | Method and Description |
|---|---|
protected Socket | I2PTunnelServer.getSocket(Hash from,
InetAddress remoteHost,
int remotePort)Creates a TCP socket connection to the specified destination. |
protected Socket | I2PTunnelServer.getSocket(Hash from,
int incomingPort)Creates a TCP socket connection to the configured destination. |
boolean | ConnThrottler.shouldThrottle(Hash h)Checks if a peer or the total connection rate exceeds configured limits. |
| Modifier and Type | Method and Description |
|---|---|
protected static Hash | FilterDefinitionElement.fromBase32(String b32)Utility method to create a Hash object from a .b32 string |
(package private) Hash | DestTracker.getHash() |
| Modifier and Type | Method and Description |
|---|---|
(package private) abstract void | FilterDefinitionElement.update(Map<Hash,DestTracker> map)Updates the provided map with the hash(es) of remote destinations
mentioned in this element |
void | FileFilterDefinitionElement.update(Map<Hash,DestTracker> map) |
void | ExplicitFilterDefinitionElement.update(Map<Hash,DestTracker> map) |
| Constructor and Description |
|---|
DestTracker(Hash hash,
Threshold threshold) |
| Modifier and Type | Field and Description |
|---|---|
static Hash | Banlist.HASH_ZERORIhash of 387 zeros |
| Modifier and Type | Method and Description |
|---|---|
Hash | TunnelPoolSettings.getAliasOf()Other destination that this is an alias of (or null). |
Hash | TunnelInfo.getDestination()if this is a client tunnel, what destination is it for? |
Hash | TunnelPoolSettings.getDestination()what destination is this a client tunnel for (or null if exploratory) |
Hash | ClientMessage.getDestinationHash()Retrieve the destination to which this message is directed. |
Hash | TunnelInfo.getEndpoint()For convenience |
Hash | TunnelInfo.getFarEnd()For convenience |
Hash | TunnelInfo.getGateway()For convenience |
Hash | TunnelInfo.getPeer(int hop)retrieve the peer at the given hop. |
Hash | Router.getRouterHash()Our current router hash. |
Hash | RouterContext.routerHash()Convenience method for getting the router hash. |
| Modifier and Type | Method and Description |
|---|---|
abstract Set<Hash> | NetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Return the RouterInfo structures for the routers closest to the given key. |
Set<Hash> | TunnelPoolSettings.getAliases()Other destinations that use the same tunnel (or null if exploratory)
Modifiable, concurrent, not a copy |
abstract Set<Hash> | NetworkDatabaseFacade.getAllRouters()Get all known router hashes. |
Map<Hash,Banlist.Entry> | Banlist.getEntries()Get the banlist entries. |
abstract List<Hash> | CommSystemFacade.getEstablished()Get all the peers we are connected to. |
Set<Hash> | TunnelPoolSettings.getFirstPeerExclusions()Get the set of first peer exclusions for diversity. |
Map<Hash,TunnelPool> | TunnelManagerFacade.getInboundClientPools()for TunnelRenderer in router console |
Set<Hash> | TunnelPoolSettings.getLastPeerExclusions()Get the set of last peer exclusions for diversity. |
Map<Hash,TunnelPool> | TunnelManagerFacade.getOutboundClientPools()for TunnelRenderer in router console |
Set<Hash> | PeerManagerFacade.getPeersByCapability(char capability)capability). |
abstract Set<Hash> | ClientManagerFacade.getPrimaryHashes()get a set of all primary hashes |
Set<Hash> | TunnelManagerFacade.selectPeersInTooManyTunnels() |
| Modifier and Type | Method and Description |
|---|---|
abstract void | NetworkDatabaseFacade.accessLeaseSet(Hash key)Record access to a LeaseSet for refresh tracking. |
int | InNetMessagePool.add(I2NPMessage messageBody,
RouterIdentity fromRouter,
Hash fromRouterHash)Adds a new inbound message to be processed. |
int | InNetMessagePool.add(I2NPMessage messageBody,
RouterIdentity fromRouter,
Hash fromRouterHash,
long msgIDBloomXor)Adds a new inbound message with optional bloom filter XOR id. |
void | Banlist.badPacket(Hash hash,
String version)Record a bad packet from a peer identified by its Router hash. |
void | MessageHistory.banlist(Hash peer,
String reason)We banlisted the peer |
boolean | Banlist.banlistRouter(Hash peer)Ban a router with default duration. |
boolean | Banlist.banlistRouter(Hash peer,
String reason)Ban a router with default duration. |
boolean | Banlist.banlistRouter(Hash peer,
String reason,
String transport)Ban a router on a specific transport. |
boolean | Banlist.banlistRouter(Hash peer,
String reason,
String transport,
boolean forever)Ban a router with configurable duration and transport. |
boolean | Banlist.banlistRouter(Hash peer,
String reason,
String reasonCode,
String transport,
long expireOn)Ban a router with a specified expiration time. |
boolean | Banlist.banlistRouter(String reasonCode,
Hash peer,
String reason)Ban a router with default duration. |
boolean | Banlist.banlistRouterForever(Hash peer,
String reason)Permanently ban a router. |
boolean | Banlist.banlistRouterForever(Hash peer,
String reason,
String reasonCode)Permanently ban a router. |
NetworkDatabaseFacade | RouterContext.clientNetDb(Hash id)Get the client netDb for the given id. |
void | ProfileManager.commErrorOccurred(Hash peer)Note that there was some sort of communication error talking with the peer |
void | Banlist.corruptConnection(Hash hash,
String version)Record a corrupt connection from a peer identified by its Router hash. |
Job | HandlerJobBuilder.createJob(I2NPMessage receivedMessage,
RouterIdentity from,
Hash fromHash)Create a new job to handle the received message. |
void | ProfileManager.dbLookupFailed(Hash peer)Note that the peer was unable to reply to a db lookup - either with data or with
a lookupReply redirecting the user elsewhere |
void | ProfileManager.dbLookupReceived(Hash peer)Note that the local router received a db lookup from the given peer |
void | ProfileManager.dbLookupReply(Hash peer,
int newPeers,
int oldPeers,
int invalid,
int duplicate,
long responseTimeMs)Note that the peer replied to a db lookup with a redirect to other routers, where
the list of redirected users included newPeers routers that the local router didn't
know about, oldPeers routers that the local router already knew about, the given invalid
routers that were invalid in some way, and the duplicate number of routers that we explicitly
asked them not to send us, but they did anyway |
void | ProfileManager.dbLookupSuccessful(Hash peer,
long responseTimeMs)Note that the peer was able to return the valid data for a db lookup |
void | ProfileManager.dbStoreFailed(Hash peer)Note that we were unable to confirm a successful send of db data to
the peer, at least not within our timeout period |
void | ProfileManager.dbStoreReceived(Hash peer,
boolean wasNewKey)Note that the local router received an unprompted db store from the given peer |
void | ProfileManager.dbStoreSent(Hash peer,
long responseTimeMs)Note that we've confirmed a successful send of db data to the peer (though we haven't
necessarily requested it again from them, so they /might/ be lying) |
void | ProfileManager.dbStoreSuccessful(Hash peer)Note that we confirmed a successful send of db data to
the peer. |
void | MessageHistory.droppedInboundMessage(long messageId,
Hash from,
String info)droppedInboundMessage. |
void | MessageHistory.droppedOtherMessage(I2NPMessage message,
Hash from)We received another message we weren't waiting for and don't know how to handle |
void | MessageHistory.droppedTunnelMessage(TunnelId id,
long msgId,
Date expiration,
Hash from)We don't know about the given tunnel, so we are dropping a message sent to us by the
given router |
void | CommSystemFacade.exemptIncoming(Hash peer)Exempt this router hash from any incoming throttles or rejections |
abstract void | NetworkDatabaseFacade.fail(Hash dbEntry)Mark a database entry as failed. |
void | TunnelManagerFacade.fail(Hash peer) |
abstract Set<Hash> | NetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Return the RouterInfo structures for the routers closest to the given key. |
void | CommSystemFacade.forceDisconnect(Hash peer)Tell the comm system to disconnect from this peer. |
void | CommSystemFacade.forceDisconnect(Hash peer,
String reason)Tell the comm system to disconnect from this peer with a reason. |
abstract FloodfillNetworkDatabaseFacade | ClientManagerFacade.getClientFloodfillNetworkDatabaseFacade(Hash destHash)get the FloodfillNetworkDatabaseFacade associated with a particular client destination. |
abstract SessionKeyManager | ClientManagerFacade.getClientSessionKeyManager(Hash dest)Get the session key manager for a given client. |
String | CommSystemFacade.getCountry(Hash peer)Get the two-letter country code for the given peer's IP address. |
int | TunnelManagerFacade.getInboundClientTunnelCount(Hash destination)how many inbound client tunnels in this pool? |
TunnelPool | TunnelManagerFacade.getInboundPool(Hash client) |
TunnelPoolSettings | TunnelManagerFacade.getInboundSettings(Hash client)client). |
byte[] | CommSystemFacade.getIP(Hash dest)Get the IP address associated with the given destination. |
LeaseSetKeys | KeyManager.getKeys(Hash dest)Client session lease set keys. |
int | TunnelManagerFacade.getOutboundClientTunnelCount(Hash destination)how many outbound client tunnels in this pool? |
TunnelPool | TunnelManagerFacade.getOutboundPool(Hash client) |
TunnelPoolSettings | TunnelManagerFacade.getOutboundSettings(Hash client)client). |
void | ProfileManager.heardAbout(Hash peer)Note that the local router received a reference to the given peer, either
through an explicit dbStore or in a dbLookupReply. |
void | ProfileManager.heardAbout(Hash peer,
long when)Note that the local router received a reference to the given peer at a specific time. |
boolean | CommSystemFacade.isBacklogged(Hash peer)Check whether the given peer has excessive pending outbound messages. |
boolean | Banlist.isBanlisted(Hash peer)Check if a router is banlisted. |
boolean | Banlist.isBanlisted(Hash peer,
String transport)Check if a router is banlisted on a specific transport. |
boolean | Banlist.isBanlistedForever(Hash peer)Check if a router is permanently banlisted. |
boolean | Banlist.isBanlistedHostile(Hash peer)Check if a router is banlisted with a hostile duration (at least 1 hour). |
boolean | Blocklist.isBlocklisted(Hash peer)Check if a peer is blocklisted by IP address. |
boolean | CommSystemFacade.isConnecting(Hash peer)Check if any transport has a connection attempt in progress
for the given peer (handshake started but not yet complete). |
abstract boolean | CommSystemFacade.isEstablished(Hash peer)Check whether a transport connection exists with the given peer. |
boolean | CommSystemFacade.isInStrictCountry(Hash peer)Whether the given peer's country is blocked. |
abstract boolean | ClientManagerFacade.isLocal(Hash destHash)Determine if the destination hash specified is managed locally. |
boolean | NetworkDatabaseFacade.isNegativeCachedForever(Hash key)Is it permanently negative cached? |
boolean | TunnelManagerFacade.isValidTunnel(Hash client,
TunnelInfo tunnel)Is a tunnel a valid member of the pool? |
void | BanLogger.logBan(Hash hash,
RouterContext context,
String reason,
long durationMs)Log a ban by hash with RouterContext (IP will be looked up from banlist). |
void | BanLogger.logBan(Hash hash,
String ip,
String reason,
long durationMs)Log a ban by hash with IP address. |
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,
RouterContext context,
String reason)Log a permanent ban with RouterContext. |
void | BanLogger.logBanForever(Hash hash,
String ip,
String reason)Log a permanent ban (forever). |
void | BanLogger.logBanForever(Hash hash,
String ip,
String reason,
RouterInfo ri)Log a permanent ban with RouterInfo for direct caps extraction. |
abstract void | NetworkDatabaseFacade.lookupDestination(Hash key,
Job onFinishedJob,
long timeoutMs,
Hash fromLocalDest)Lookup using the client's tunnels
Succeeds even if LS validation fails due to unsupported sig type |
abstract Destination | NetworkDatabaseFacade.lookupDestinationLocally(Hash key)Lookup locally in netDB and in badDest cache
Succeeds even if LS validation failed due to unsupported sig type |
abstract void | NetworkDatabaseFacade.lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)Lookup a LeaseSet in the network database. |
abstract void | NetworkDatabaseFacade.lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Lookup using the client's tunnels |
abstract LeaseSet | NetworkDatabaseFacade.lookupLeaseSetLocally(Hash key)key). |
abstract void | NetworkDatabaseFacade.lookupLeaseSetRemotely(Hash key,
Hash fromLocalDest)Unconditionally lookup using the client's tunnels. |
abstract void | NetworkDatabaseFacade.lookupLeaseSetRemotely(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Unconditionally lookup using the client's tunnels. |
abstract DatabaseEntry | NetworkDatabaseFacade.lookupLocally(Hash key)Lookup a database entry locally. |
abstract DatabaseEntry | NetworkDatabaseFacade.lookupLocallyWithoutValidation(Hash key)Not for use without validation |
abstract void | NetworkDatabaseFacade.lookupRouterInfo(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)timeoutMs). |
abstract RouterInfo | NetworkDatabaseFacade.lookupRouterInfoLocally(Hash key)key). |
void | CommSystemFacade.mayDisconnect(Hash peer)Tell the comm system that we may disconnect from this peer. |
void | ProfileManager.messageFailed(Hash peer)Note that the router failed to send a message to the peer over any transport |
void | ProfileManager.messageFailed(Hash peer,
String transport)Note that the router failed to send a message to the peer over the transport specified |
void | ProfileManager.messageReceived(Hash peer,
String style,
long msToReceive,
int bytesRead)Note that the router received a message from the given peer on the specified
transport. |
void | ProfileManager.messageSent(Hash peer,
String transport,
long msToSend,
long bytesSent)Note that it took msToSend to send a message of size bytesSent to the peer over the transport. |
void | Banlist.portHopping(Hash hash)Record a port hopping attempt from a peer identified by its Router hash. |
Properties | StatisticsManager.publishStatistics(Hash h)Retrieve a snapshot of the statistics that should be published. |
SessionKey | PersistentKeyRing.put(Hash h,
SessionKey sk)put. |
void | MessageHistory.receiveMessage(String messageType,
long messageId,
long expiration,
Hash from,
boolean isValid)We just received a message from the peer |
void | PeerManagerFacade.removeCapabilities(Hash peer)peer). |
abstract void | NetworkDatabaseFacade.removeLeaseSetFromTracking(Hash key)Remove a LeaseSet from refresh tracking. |
String | CommSystemFacade.renderPeerCaps(Hash peer,
boolean inline)Render the peer's capabilities as HTML, optionally inline. |
String | CommSystemFacade.renderPeerFlag(Hash peer)Render the country flag for the given peer as HTML. |
String | CommSystemFacade.renderPeerHTML(Hash peer,
boolean extended)Render an HTML snippet identifying the given peer, optionally with extended details. |
abstract void | ClientManagerFacade.requestLeaseSet(Hash dest,
LeaseSet set)Request that the client authorize the Leases contained in the
LeaseSet, identified by destination hash. |
TunnelInfo | TunnelManagerFacade.selectInboundExploratoryTunnel(Hash closestTo)Pick the inbound exploratory tunnel with the gateway closest to the given hash. |
TunnelInfo | TunnelManagerFacade.selectInboundTunnel(Hash destination)Pick a random inbound tunnel from the given destination's pool |
TunnelInfo | TunnelManagerFacade.selectInboundTunnel(Hash destination,
Hash closestTo)Pick the inbound tunnel with the gateway closest to the given hash
from the given destination's pool. |
TunnelInfo | TunnelManagerFacade.selectOutboundExploratoryTunnel(Hash closestTo)Pick the outbound exploratory tunnel with the endpoint closest to the given hash. |
TunnelInfo | TunnelManagerFacade.selectOutboundTunnel(Hash destination)Pick a random outbound tunnel from the given destination's pool |
TunnelInfo | TunnelManagerFacade.selectOutboundTunnel(Hash destination,
Hash closestTo)Pick the outbound tunnel with the endpoint closest to the given hash
from the given destination's pool. |
void | MessageHistory.sendMessage(String messageType,
long messageId,
long expiration,
Hash peer,
boolean sentOk,
String info)We just sent a message to the peer |
void | TunnelPoolSettings.setAliasOf(Hash h)Set other destination that this is an alias of (or null). |
void | PeerManagerFacade.setCapabilities(Hash peer,
String caps)caps). |
void | TunnelManagerFacade.setInboundSettings(Hash client,
TunnelPoolSettings settings)settings). |
void | TunnelManagerFacade.setOutboundSettings(Hash client,
TunnelPoolSettings settings)settings). |
boolean | ClientManagerFacade.shouldPublishLeaseSet(Hash destinationHash)Does the client specified want their leaseSet published? |
DatabaseEntry | NetworkDatabaseFacade.store(Hash key,
DatabaseEntry entry)Store a DatabaseEntry in the network database. |
abstract LeaseSet | NetworkDatabaseFacade.store(Hash key,
LeaseSet leaseSet) |
abstract RouterInfo | NetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo) |
void | ProfileManager.tunnelDataPushed(Hash peer,
long rtt,
int size)Note that we were able to push some data through a tunnel that the peer
is participating in (detected after rtt). |
void | ProfileManager.tunnelDataPushed1m(Hash peer,
int size)Note that the peer is participating in a tunnel that pushed the given amount of data
over the last minute. |
void | MessageHistory.tunnelDispatched(long messageId,
long tunnelId,
long toTunnel,
Hash toPeer,
String type) |
void | ProfileManager.tunnelFailed(Hash peer,
int pct)Note that the peer participated in a tunnel that failed. |
void | ProfileManager.tunnelJoined(Hash peer,
long responseTimeMs)Note that the router agreed to participate in a tunnel |
void | ProfileManager.tunnelLifetimePushed(Hash peer,
long lifetime,
long size)Note that we were able to push the given amount of data through a tunnel
that the peer is participating in |
void | MessageHistory.tunnelParticipantRejected(Hash peer,
String msg) |
void | ProfileManager.tunnelRejected(Hash peer,
long responseTimeMs,
int severity)Note that a router explicitly rejected joining a tunnel |
void | MessageHistory.tunnelRejected(Hash peer,
TunnelId tunnel,
Hash replyThrough,
String reason)The peer did not accept the tunnel join for the given reason |
void | MessageHistory.tunnelRequestTimedOut(Hash peer,
TunnelId tunnel)The peer did not accept the tunnel join for the given reason (this may be because
of a timeout or an explicit refusal). |
void | ProfileManager.tunnelTestSucceeded(Hash peer,
long responseTimeMs)Note that a tunnel that the router is participating in
was successfully tested with the given round trip latency |
void | ProfileManager.tunnelTimedOut(Hash peer)Note that a router timed out joining a tunnel |
void | MessageHistory.unbanlist(Hash peer)We unbanlisted the peer |
void | Banlist.unbanlistRouter(Hash peer)Remove a router from the banlist. |
void | Banlist.unbanlistRouter(Hash peer,
String transport)Remove a router from the banlist for a specific transport. |
boolean | CommSystemFacade.wasUnreachable(Hash peer)Check whether the given peer was recently unreachable. |
| Modifier and Type | Method and Description |
|---|---|
abstract Set<Hash> | NetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Return the RouterInfo structures for the routers closest to the given key. |
void | TunnelPoolSettings.setFirstPeerExclusions(Set<Hash> exclusions)Set the first peer exclusions for diversity. |
void | TunnelPoolSettings.setLastPeerExclusions(Set<Hash> exclusions)Set the last peer exclusions for diversity. |
| Constructor and Description |
|---|
ClientMessage(Hash toDestHash,
Payload payload)For inbound (from remote dest) |
ClientTunnelSettings(Hash dest)Create tunnel settings for the given destination. |
TunnelPoolSettings(Hash dest,
boolean isInbound)Client tunnel unless dest == null |
| Modifier and Type | Method and Description |
|---|---|
Hash | ClientConnectionRunner.getDestHash()Equivalent to getConfig().getDestination().calculateHash();
will be null before session is established
Not subsession aware. |
Hash | ClientConnectionRunner.getDestHash(SessionId id)Return the hash for the given ID |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | ClientManager.getPrimaryHashes()get all the primary hashes for all the clients and return them as a set |
Set<Hash> | ClientManagerFacadeImpl.getPrimaryHashes()get all the primary hashes for all the clients and return them as a set |
| Modifier and Type | Method and Description |
|---|---|
FloodfillNetworkDatabaseFacade | ClientManager.getClientFloodfillNetworkDatabaseFacade(Hash destHash)get the FloodfillNetworkDatabaseFacade associated with a particular client destination. |
FloodfillNetworkDatabaseFacade | ClientManagerFacadeImpl.getClientFloodfillNetworkDatabaseFacade(Hash destHash)get the FloodfillNetworkDatabaseFacade associated with a particular client destination. |
SessionKeyManager | ClientManager.getClientSessionKeyManager(Hash dest)Return the client's SessionKeyManager
Use this instead of the RouterContext.sessionKeyManager()
to prevent correlation attacks across destinations |
SessionKeyManager | ClientManagerFacadeImpl.getClientSessionKeyManager(Hash dest)Return the client's current manager or null if not connected |
SessionConfig | ClientConnectionRunner.getConfig(Hash h)Current client's config,
will be null if session not found
IS subsession aware. |
(package private) LeaseRequestState | ClientConnectionRunner.getLeaseRequest(Hash h)Data for the current leaseRequest, or null if there is no active leaseSet request. |
LeaseSet | ClientConnectionRunner.getLeaseSet(Hash h)Currently allocated leaseSet. |
(package private) SessionId | ClientConnectionRunner.getSessionId(Hash h)Subsession aware. |
boolean | ClientManager.isLocal(Hash destHash)Unsynchronized. |
boolean | ClientManagerFacadeImpl.isLocal(Hash destHash)Determine if the destination specified is managed locally. |
(package private) boolean | ClientConnectionRunner.receiveMessage(Hash toHash,
Destination fromDest,
Payload payload)Synchronously deliver the message to the current runner
Failure indication is available as of 0.9.29. |
boolean | ClientManager.registerEncryptedDestination(ClientConnectionRunner runner,
Hash hash)Call after destinationEstablished(),
when an encrypted leaseset is created, so we know it's local. |
boolean | ClientConnectionRunner.registerEncryptedLS(Hash hash)Call after destinationEstablished(),
when an encrypted leaseset is created, so we know it's local. |
void | ClientManager.requestLeaseSet(Hash dest,
LeaseSet ls)Request that a particular client authorize the Leases contained in the
LeaseSet. |
void | ClientManagerFacadeImpl.requestLeaseSet(Hash dest,
LeaseSet set)Request that a particular client authorize the Leases contained in the LeaseSet. |
(package private) void | ClientConnectionRunner.requestLeaseSet(Hash h,
LeaseSet set,
long expirationTime,
Job onCreateJob,
Job onFailedJob)Request that a particular client authorize the Leases contained in the
LeaseSet, after which the onCreateJob is queued up. |
(package private) void | ClientConnectionRunner.setSessionId(Hash hash,
SessionId id)To be called only by ClientManager. |
boolean | ClientManager.shouldPublishLeaseSet(Hash destHash)Determine if we should publish a leaseSet for this hash. |
boolean | ClientManagerFacadeImpl.shouldPublishLeaseSet(Hash destinationHash) |
void | ClientManager.unregisterEncryptedDestination(ClientConnectionRunner runner,
Hash hash)Remove the hash for the encrypted LS. |
| Constructor and Description |
|---|
LookupDestJob(RouterContext context,
ClientConnectionRunner runner,
Hash h,
Hash fromLocalDest) |
LookupDestJob(RouterContext context,
ClientConnectionRunner runner,
long reqID,
long timeout,
SessionId sessID,
Hash h,
String name,
Hash fromLocalDest)One of h or name non-null. |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | FamilyKeyCrypto.getOurFamily()Get verified members of our family. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> | FamilyKeyCrypto.sign(String family,
Hash h)Caller must add family to RI also. |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | DummyNetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore) |
Set<Hash> | DummyNetworkDatabaseFacade.getAllRouters() |
List<Hash> | VMCommSystem.getEstablished()Return the established |
Map<Hash,TunnelPool> | DummyTunnelManagerFacade.getInboundClientPools() |
Map<Hash,TunnelPool> | DummyTunnelManagerFacade.getOutboundClientPools() |
Set<Hash> | DummyPeerManagerFacade.getPeersByCapability(char capability) |
Set<Hash> | DummyClientManagerFacade.getPrimaryHashes()Return the set of primary hashes. |
Set<Hash> | DummyTunnelManagerFacade.selectPeersInTooManyTunnels() |
| Modifier and Type | Method and Description |
|---|---|
void | DummyNetworkDatabaseFacade.accessLeaseSet(Hash key) |
NetworkDatabaseFacade | DummyNetworkDatabaseSegmentor.clientNetDB(Hash id) |
void | DummyTunnelManagerFacade.fail(Hash peer) |
void | DummyNetworkDatabaseFacade.fail(Hash dbEntry)Record a lookup failure |
Set<Hash> | DummyNetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore) |
FloodfillNetworkDatabaseFacade | DummyClientManagerFacade.getClientFloodfillNetworkDatabaseFacade(Hash dbid)Return the floodfill network database facade. |
SessionKeyManager | DummyClientManagerFacade.getClientSessionKeyManager(Hash _dest) |
int | DummyTunnelManagerFacade.getInboundClientTunnelCount(Hash destination) |
TunnelPool | DummyTunnelManagerFacade.getInboundPool(Hash client) |
TunnelPoolSettings | DummyTunnelManagerFacade.getInboundSettings(Hash client) |
int | DummyTunnelManagerFacade.getOutboundClientTunnelCount(Hash destination) |
TunnelPool | DummyTunnelManagerFacade.getOutboundPool(Hash client) |
TunnelPoolSettings | DummyTunnelManagerFacade.getOutboundSettings(Hash client) |
boolean | VMCommSystem.isEstablished(Hash peer)Return whether established |
boolean | DummyClientManagerFacade.isLocal(Hash destHash) |
boolean | DummyTunnelManagerFacade.isValidTunnel(Hash client,
TunnelInfo tunnel) |
void | DummyNetworkDatabaseFacade.lookupDestination(Hash key,
Job onFinishedJob,
long timeoutMs,
Hash fromLocalDest)lookupDestination. |
Destination | DummyNetworkDatabaseFacade.lookupDestinationLocally(Hash key)lookupDestinationLocally. |
void | DummyNetworkDatabaseFacade.lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)lookupLeaseSet. |
void | DummyNetworkDatabaseFacade.lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest) |
LeaseSet | DummyNetworkDatabaseFacade.lookupLeaseSetLocally(Hash key) |
void | DummyNetworkDatabaseFacade.lookupLeaseSetRemotely(Hash key,
Hash fromLocalDest) |
void | DummyNetworkDatabaseFacade.lookupLeaseSetRemotely(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest) |
DatabaseEntry | DummyNetworkDatabaseFacade.lookupLocally(Hash key) |
DatabaseEntry | DummyNetworkDatabaseFacade.lookupLocallyWithoutValidation(Hash key) |
void | DummyNetworkDatabaseFacade.lookupRouterInfo(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)lookupRouterInfo. |
RouterInfo | DummyNetworkDatabaseFacade.lookupRouterInfoLocally(Hash key)lookupRouterInfoLocally. |
void | VMCommSystem.receive(byte[] message,
Hash fromPeer)We send messages between comms as bytes so that we strip any router-local
info. |
void | DummyPeerManagerFacade.removeCapabilities(Hash peer) |
void | DummyNetworkDatabaseFacade.removeLeaseSetFromTracking(Hash key)Remove a lease set from tracking |
void | DummyClientManagerFacade.requestLeaseSet(Hash dest,
LeaseSet set) |
TunnelInfo | DummyTunnelManagerFacade.selectInboundExploratoryTunnel(Hash closestTo) |
TunnelInfo | DummyTunnelManagerFacade.selectInboundTunnel(Hash destination) |
TunnelInfo | DummyTunnelManagerFacade.selectInboundTunnel(Hash destination,
Hash closestTo) |
TunnelInfo | DummyTunnelManagerFacade.selectOutboundExploratoryTunnel(Hash closestTo) |
TunnelInfo | DummyTunnelManagerFacade.selectOutboundTunnel(Hash destination) |
TunnelInfo | DummyTunnelManagerFacade.selectOutboundTunnel(Hash destination,
Hash closestTo) |
void | DummyPeerManagerFacade.setCapabilities(Hash peer,
String caps) |
void | DummyTunnelManagerFacade.setInboundSettings(Hash client,
TunnelPoolSettings settings) |
void | DummyTunnelManagerFacade.setOutboundSettings(Hash client,
TunnelPoolSettings settings) |
LeaseSet | DummyNetworkDatabaseFacade.store(Hash key,
LeaseSet leaseSet)Store a key locally |
RouterInfo | DummyNetworkDatabaseFacade.store(Hash key,
RouterInfo routerInfo)Store a key locally |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | DummyNetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore) |
| Modifier and Type | Field and Description |
|---|---|
ConcurrentHashMap<Hash,LeaseSet> | OutboundCache.multihomedCacheCache for LeaseSets associated with multihomed routers or hosted destinations. |
| Modifier and Type | Method and Description |
|---|---|
(package private) static GarlicMessage | GarlicMessageBuilder.buildECIESMessage(RouterContext ctx,
GarlicConfig config,
Hash from,
Destination to,
SessionKeyManager skm,
ReplyCallback callback)ECIES_X25519 and PQ only. |
(package private) static GarlicMessage | OutboundClientMessageJobHelper.createGarlicMessage(RouterContext ctx,
long replyToken,
long expiration,
PublicKey recipientPK,
PayloadGarlicConfig dataClove,
Hash from,
Destination dest,
TunnelInfo replyTunnel,
int tagsToSendOverride,
int lowTagsOverride,
SessionKey wrappedKey,
Set<SessionTag> wrappedTags,
boolean requireAck,
LeaseSet bundledReplyLeaseSet,
ReplyCallback callback)Allow the app to specify the data clove directly, which enables OutboundClientMessage to resend the
same payload (including expiration and unique id) in different garlics (down different tunnels)
This is called from OCMOSJ |
Job | GarlicMessageHandler.createJob(I2NPMessage receivedMessage,
RouterIdentity from,
Hash fromHash)Create and return a job to handle this message |
(package private) static boolean | GarlicMessageBuilder.needsTags(RouterContext ctx,
PublicKey key,
Hash local,
int minTagOverride)ELGAMAL_2048 only; returns false for others |
| Constructor and Description |
|---|
GarlicMessageReceiver(RouterContext context,
GarlicMessageReceiver.CloveReceiver receiver,
Hash clientDestination)Constructs a GarlicMessageReceiver targeting a specific client destination. |
HandleGarlicMessageJob(RouterContext context,
GarlicMessage msg,
RouterIdentity from,
Hash fromHash,
long msgIDBloomXorLocal,
long msgIDBloomXorRouter,
long msgIDBloomXorTunnel)Constructs a job to handle an inbound garlic message. |
HashPair(Hash s,
Hash d)Hash pair |
SendMessageDirectJob(RouterContext ctx,
I2NPMessage message,
Hash toPeer,
int timeoutMs,
int priority)Send a message directly to a peer. |
SendMessageDirectJob(RouterContext ctx,
I2NPMessage message,
Hash toPeer,
int timeoutMs,
int priority,
long msgIDBloomXor)Send a message directly to a peer with an XOR mask. |
SendMessageDirectJob(RouterContext ctx,
I2NPMessage message,
Hash toPeer,
Job onSend,
ReplyJob onSuccess,
Job onFail,
MessageSelector selector,
int timeoutMs,
int priority,
long msgIDBloomXor)Send a message directly to a peer with full options. |
SendMessageDirectJob(RouterContext ctx,
I2NPMessage message,
Hash toPeer,
ReplyJob onSuccess,
Job onFail,
MessageSelector selector,
int timeoutMs,
int priority)Send a message directly to a peer with reply handling. |
SendMessageDirectJob(RouterContext ctx,
I2NPMessage message,
Hash toPeer,
ReplyJob onSuccess,
Job onFail,
MessageSelector selector,
int timeoutMs,
int priority,
long msgIDBloomXor)Send a message directly to a peer with reply handling and XOR mask. |
| Modifier and Type | Method and Description |
|---|---|
String | BlockfileNamingService.reverseLookup(Hash h)Look up a hostname from a hash. |
List<String> | BlockfileNamingService.reverseLookupAll(Hash h)Return all hostnames registered for this hash. |
| Modifier and Type | Method and Description |
|---|---|
protected void | HandleDatabaseLookupMessageJob.sendClosest(Hash key,
Set<Hash> routerHashes,
Hash toPeer,
TunnelId replyTunnel)Send the closest routers to the requesting peer. |
protected void | HandleDatabaseLookupMessageJob.sendMessage(I2NPMessage message,
Hash toPeer,
TunnelId replyTunnel)Send an I2NP message to the specified peer. |
| Modifier and Type | Method and Description |
|---|---|
protected void | HandleDatabaseLookupMessageJob.sendClosest(Hash key,
Set<Hash> routerHashes,
Hash toPeer,
TunnelId replyTunnel)Send the closest routers to the requesting peer. |
| Constructor and Description |
|---|
HandleDatabaseLookupMessageJob(RouterContext ctx,
DatabaseLookupMessage receivedMessage,
RouterIdentity _from,
Hash _fromHash,
long msgIDBloomXor)Creates a new HandleDatabaseLookupMessageJob. |
| Modifier and Type | Class and Description |
|---|---|
(package private) class | LocalHashPull the caching used only by KBucketImpl out of Hash and put it here. |
| Modifier and Type | Field and Description |
|---|---|
protected Hash | FloodSearchJob._keyTarget database entry hash being searched. |
static Hash | FloodfillNetworkDatabaseSegmentor.MAIN_DBIDMAIN_DBID. |
| Modifier and Type | Field and Description |
|---|---|
(package private) static ConcurrentHashMap<Hash,Long> | FloodfillNetworkDatabaseFacade._recentlyQueriedFloodfillsTracks recently-queried floodfill peers across all concurrent searches
to avoid hammering the same floodfill. |
| Modifier and Type | Method and Description |
|---|---|
Hash | BlindCache.getBlindedHash(Destination dest)The hash to lookup for a dest. |
Hash | BlindCache.getBlindedHash(SigningPublicKey spk)The hash to lookup for a SPK known to be blinded. |
(package private) Hash | RepublishLeaseSetJob.getDestHash()The destination hash this job publishes for. |
Hash | IterativeSearchJob.getFromHash()Hash of the dest this query is from |
Hash | BlindCache.getHash(Destination dest)The hash to lookup for a dest. |
Hash | BlindCache.getHash(Hash h)The hash to lookup for a dest hash. |
Hash | FloodSearchJob.getKey() |
(package private) static Hash | PersistentDataStore.getRouterInfoHash(String filename)Package private for installer BundleRouterInfos |
Hash | StoreState.getSuccessful()Return a successful peer (a random one if more than one was successful)
or null. |
Hash | StoreState.getTarget() |
Hash | SearchState.getTarget() |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | KademliaNetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Get the routers closest to that key in response to a remote lookup
Only used by ../HDLMJ
Set MAY INCLUDE our own router - add to peersToIgnore if you don't want |
Set<Hash> | KademliaNetworkDatabaseFacade.getAllRouters()Get the hashes for all known routers |
Set<Hash> | StoreState.getAttempted()The peers attempted OR skipped. |
Set<Hash> | SearchState.getAttempted() |
Set<Hash> | SearchState.getClosestAttempted(int max) |
Set<Hash> | KademliaNetworkDatabaseFacade.getExploreKeys()Gets the set of keys to explore. |
Set<Hash> | SearchState.getFailed() |
List<Hash> | FloodfillNetworkDatabaseFacade.getFloodfillPeers()List of the hashes of currently known floodfill peers. |
(package private) KBucketSet<Hash> | KademliaNetworkDatabaseFacade.getKBuckets()Get the KBucketSet for the main DB. |
Set<Hash> | DataStore.getKeys()Get all keys stored in the data store. |
Set<Hash> | TransientDataStore.getKeys() |
Set<Map.Entry<Hash,DatabaseEntry>> | DataStore.getMapEntries()Gets all map entries in the data store. |
Set<Map.Entry<Hash,DatabaseEntry>> | TransientDataStore.getMapEntries() |
Set<Hash> | SearchState.getPending() |
Set<Hash> | SearchState.getRepliedPeers() |
Set<Hash> | SearchState.getSuccessful() |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int maxNumRouters,
KBucketSet<Hash> kbuckets)Sort the floodfills. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int howMany,
Set<Hash> toIgnore,
KBucketSet<Hash> kbuckets)See above for description
List will not include our own hash
Returns new list, may be modified. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(KBucketSet<Hash> kbuckets)List will not include our own hash. |
(package private) abstract List<Hash> | PeerSelector.selectMostReliablePeers(Hash key,
int numClosest,
Set<Hash> alreadyChecked,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectMostReliablePeers(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) abstract List<Hash> | PeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Floodfill peers only. |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets,
boolean preferConnected)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
| Modifier and Type | Method and Description |
|---|---|
void | KademliaNetworkDatabaseFacade.accessLeaseSet(Hash key)Record access to a LeaseSet for refresh tracking. |
(package private) boolean | ExploreJob.add(Hash peer)This is called from SearchReplyJob |
(package private) boolean | SearchJob.add(Hash peer)Adds a peer to the search. |
void | SearchState.addInitialLeaseSetResponse(Hash peer,
LeaseSet ls)addInitialLeaseSetResponse. |
void | SearchState.addLeaseSetResponse(Hash peer,
LeaseSet ls)addLeaseSetResponse. |
void | StoreState.addPending(Hash peer)Increments attempted count |
void | SearchState.addPending(Hash peer)addPending. |
void | StoreState.addPending(Hash peer,
MessageWrapper.WrappedMessage msg)Adds a pending message for tracking. |
void | StoreState.addSkipped(Hash peer)we aren't even going to try to contact this peer |
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 |
void | NegativeLookupCache.cache(Hash h)Negative cache the hash until the next clean time. |
byte[] | LocalHash.cachedXor(Hash key)Calculate the xor with the current object and the specified hash,
caching values where possible. |
static void | IterativeSearchJob.clearRecentlyQueried(Hash peer)Clear peer from grace period cache (received their response). |
NetworkDatabaseFacade | FloodfillNetworkDatabaseSegmentor.clientNetDB(Hash id)get the client netDb for the given id
Will return the "main" netDb if
the dbid is null. |
abstract NetworkDatabaseFacade | SegmentedNetworkDatabaseFacade.clientNetDB(Hash dbid)Get a client netDb for a given client Hash identifier. |
(package private) void | FloodfillNetworkDatabaseFacade.complete(Hash key)Must be called by the search job queued by search() on success or failure |
long | StoreState.confirmed(Hash peer)confirmed. |
void | FloodfillNetworkDatabaseFacade.contactHeardFrom(Hash peer)Notify that we heard from or about a peer (e.g. |
Job | FloodfillDatabaseStoreMessageHandler.createJob(I2NPMessage receivedMessage,
RouterIdentity from,
Hash fromHash) |
Job | FloodfillDatabaseLookupMessageHandler.createJob(I2NPMessage receivedMessage,
RouterIdentity from,
Hash fromHash)Creates a job to handle an incoming DatabaseLookupMessage, or returns null if the lookup should be dropped. |
long | SearchState.dataFound(Hash peer)how long did it take to get the reply, or -1 if we don't know |
(package private) static void | FloodfillNetworkDatabaseFacade.decrementActiveFloodfillQuery(Hash floodfill)Decrement the active outbound query count for a floodfill peer. |
(package private) int | FloodOnlySearchJob.decrementRemaining(Hash peer)Note that we heard from the peer |
(package private) boolean | KademliaNetworkDatabaseFacade.dropAfterLookupFailed(Hash peer)Final remove for a router info. |
void | KademliaNetworkDatabaseFacade.fail(Hash dbEntry)Final remove for a leaseset. |
(package private) void | IterativeSearchJob.failed(Hash peer,
boolean timedOut)Note that the peer did not respond with a DSM (either a DSRM, timeout, or failure). |
Set<Hash> | KademliaNetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Get the routers closest to that key in response to a remote lookup
Only used by ../HDLMJ
Set MAY INCLUDE our own router - add to peersToIgnore if you don't want |
boolean | DataStore.forcePut(Hash key,
DatabaseEntry data)data). |
boolean | TransientDataStore.forcePut(Hash key,
DatabaseEntry data)forcePut. |
boolean | PersistentDataStore.forcePut(Hash key,
DatabaseEntry data) |
static MessageWrapper.OneTimeSession | MessageWrapper.generateSession(RouterContext ctx,
Hash localDest,
long expiration,
boolean forceElG)Create a single key and tag, for receiving a single encrypted message,
and register it with the client's session key manager, to expire in the time specified. |
DatabaseEntry | DataStore.get(Hash key)Retrieve the database entry for the given key. |
DatabaseEntry | TransientDataStore.get(Hash key)get. |
DatabaseEntry | PersistentDataStore.get(Hash key) |
DatabaseEntry | DataStore.get(Hash key,
boolean persist)Retrieve the database entry for the given key with optional persistence control. |
DatabaseEntry | TransientDataStore.get(Hash key,
boolean persist)for PersistentDataStore only - don't use here |
DatabaseEntry | PersistentDataStore.get(Hash key,
boolean persist)Prepare for having only a partial set in memory and the rest on disk |
Destination | NegativeLookupCache.getBadDest(Hash h)Get a cached bad destination. |
Hash | BlindCache.getHash(Hash h)The hash to lookup for a dest hash. |
int | KademliaNetworkDatabaseFacade.getPeerTimeout(Hash peer)Get the timeout for a peer, based on the profile data, or the default timeout. |
MessageWrapper.WrappedMessage | StoreState.getPendingMessage(Hash peer)Returns the pending message for the specified peer. |
protected int | SearchJob.getPerPeerTimeoutMs(Hash peer)Per-peer timeout adjusted for floodfill and remaining time. |
static File | PersistentDataStore.getRouterInfoFile(RouterContext ctx,
Hash hash)The persistent RI file for a hash. |
(package private) boolean | KademliaNetworkDatabaseFacade.hasActiveRepublishJob(Hash hash)Check if an active republish job exists for the given destination. |
(package private) void | ContactDrivenRefreshJob.heardFrom(Hash peer)Called when we hear from or about a peer. |
(package private) static int | FloodfillNetworkDatabaseFacade.incrementActiveFloodfillQuery(Hash floodfill)Increment the active outbound query count for a floodfill peer. |
boolean | NegativeLookupCache.isCached(Hash h)Check if the hash is in the negative cache. |
(package private) static boolean | FloodfillNetworkDatabaseFacade.isFloodfillOverloaded(Hash floodfill)Check if a floodfill peer already has too many active outbound queries
from this router. |
boolean | DataStore.isKnown(Hash key)Check if the given key exists in the data store. |
boolean | TransientDataStore.isKnown(Hash key) |
(package private) boolean | KademliaNetworkDatabaseFacade.isNegativeCached(Hash key)Is the key in the negative lookup cache? |
boolean | KademliaNetworkDatabaseFacade.isNegativeCachedForever(Hash key)Is it permanently negative cached? |
(package private) static boolean | FloodfillNetworkDatabaseFacade.isRecentlyQueried(Hash peer)Check if a floodfill peer was queried recently (within cooldown period). |
(package private) boolean | FloodfillNetworkDatabaseFacade.isVerifyInProgress(Hash h)Checks if verification is in progress for the specified hash. |
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. |
void | KademliaNetworkDatabaseFacade.lookupDestination(Hash key,
Job onFinishedJob,
long timeoutMs,
Hash fromLocalDest)Lookup using the client's tunnels
Succeeds even if LS validation and store fails due to unsupported sig type, expired, etc. |
Destination | KademliaNetworkDatabaseFacade.lookupDestinationLocally(Hash key)Lookup locally in netDB and in badDest cache
Succeeds even if LS validation fails due to unsupported sig type, expired, etc. |
void | NegativeLookupCache.lookupFailed(Hash h)Record a failed lookup for the given hash. |
(package private) void | KademliaNetworkDatabaseFacade.lookupFailed(Hash key)Increment in the negative lookup cache |
void | KademliaNetworkDatabaseFacade.lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs) |
void | KademliaNetworkDatabaseFacade.lookupLeaseSet(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Lookup using the client's tunnels
Use lookupDestination() if you don't need the LS or don't need it validated. |
LeaseSet | KademliaNetworkDatabaseFacade.lookupLeaseSetLocally(Hash key) |
void | KademliaNetworkDatabaseFacade.lookupLeaseSetRemotely(Hash key,
Hash fromLocalDest)Unconditionally lookup using the client's tunnels. |
void | KademliaNetworkDatabaseFacade.lookupLeaseSetRemotely(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
Hash fromLocalDest)Unconditionally lookup using the client's tunnels. |
DatabaseEntry | KademliaNetworkDatabaseFacade.lookupLocally(Hash key) |
DatabaseEntry | KademliaNetworkDatabaseFacade.lookupLocallyWithoutValidation(Hash key)Not for use without validation |
void | KademliaNetworkDatabaseFacade.lookupRouterInfo(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs) |
RouterInfo | KademliaNetworkDatabaseFacade.lookupRouterInfoLocally(Hash key)This will return immediately with the result or null. |
void | KademliaNetworkDatabaseFacade.lookupRouterInfoRemote(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs)Look up a RouterInfo by hash, performing a network search if not locally cached. |
void | KademliaNetworkDatabaseFacade.markHostCheckerLeaseSet(Hash hash)Mark a destination hash as being looked up on behalf of HostChecker. |
(package private) static void | FloodfillNetworkDatabaseFacade.markQueried(Hash peer)Mark a floodfill peer as recently queried. |
(package private) void | KademliaNetworkDatabaseFacade.negativeCacheNow(Hash key)Immediately negative-cache a key (set to its max fail count) so the next
lookup short-circuits via KademliaNetworkDatabaseFacade.isNegativeCached(net.i2p.data.Hash) instead of running a
full search. |
(package private) void | IterativeSearchJob.newPeerToTry(Hash peer)A new (floodfill) peer was discovered that may have the answer. |
(package private) void | FloodfillNetworkDatabaseFacade.probeStalePeer(Hash peer,
RouterInfo ri)Fire a DirectLookupJob for a stale peer, deduplicated via _activeFloodQueries. |
boolean | DataStore.put(Hash key,
DatabaseEntry data)Store a database entry with the given key. |
boolean | TransientDataStore.put(Hash key,
DatabaseEntry data) |
boolean | PersistentDataStore.put(Hash key,
DatabaseEntry data) |
boolean | DataStore.put(Hash key,
DatabaseEntry data,
boolean persist)Store a database entry with the given key and persistence control. |
boolean | TransientDataStore.put(Hash key,
DatabaseEntry data,
boolean persist)for PersistentDataStore only - don't use here |
boolean | PersistentDataStore.put(Hash key,
DatabaseEntry data,
boolean persist) |
void | FloodfillNetworkDatabaseFacade.registerSearchTimeout(Hash peer,
IterativeSearchJob search,
long timeoutMs)Register a search timeout to be processed in batches. |
DatabaseEntry | DataStore.remove(Hash key)Remove the entry for the given key. |
DatabaseEntry | TransientDataStore.remove(Hash key)remove. |
DatabaseEntry | PersistentDataStore.remove(Hash key) |
DatabaseEntry | DataStore.remove(Hash key,
boolean persist)Remove the entry for the given key with optional persistence control. |
DatabaseEntry | TransientDataStore.remove(Hash key,
boolean persist)for PersistentDataStore only - don't use here |
DatabaseEntry | PersistentDataStore.remove(Hash key,
boolean persist) |
void | KademliaNetworkDatabaseFacade.removeFromCache(Hash hash)Remove a remote LeaseSet from local cache (e.g. |
void | KademliaNetworkDatabaseFacade.removeLeaseSetFromTracking(Hash key)Remove a LeaseSet from refresh tracking. |
void | SearchState.removePending(Hash peer)we didn't actually want to add this peer as part of the pending list... |
(package private) void | KademliaNetworkDatabaseFacade.removePublishingJob(Hash hash,
RepublishLeaseSetJob job)Remove a specific job from the tracking set. |
void | KademliaNetworkDatabaseFacade.removeRouterInfo(Hash key)Remove a RouterInfo from the local netdb. |
(package private) void | ExploreJob.replyFound(DatabaseSearchReplyMessage message,
Hash peer) |
(package private) void | SearchJob.replyFound(DatabaseSearchReplyMessage message,
Hash peer)Found a reply |
long | SearchState.replyFound(Hash peer)how long did it take to get the reply, or -1 if we dont know |
void | StoreState.replyTimeout(Hash peer)replyTimeout. |
void | SearchState.replyTimeout(Hash peer)replyTimeout. |
(package private) SearchJob | FloodfillNetworkDatabaseFacade.search(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
boolean isLease)Lookup using exploratory tunnels. |
(package private) SearchJob | KademliaNetworkDatabaseFacade.search(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
boolean isLease)Begin a kademlia style search for the key specified, which can take up to timeoutMs and
will fire the appropriate jobs on success or timeout (or if the kademlia search completes
without any match)
Unused - called only by FNDF.searchFull() from FloodSearchJob which is overridden - don't use this. |
(package private) SearchJob | FloodfillNetworkDatabaseFacade.search(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
boolean isLease,
Hash fromLocalDest)Lookup using the client's tunnels. |
(package private) SearchJob | KademliaNetworkDatabaseFacade.search(Hash key,
Job onFindJob,
Job onFailedLookupJob,
long timeoutMs,
boolean isLease,
Hash fromLocalDest)Unused - see FNDF |
(package private) void | KademliaNetworkDatabaseFacade.searchComplete(Hash key)The search for the given key is no longer active. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int maxNumRouters,
KBucketSet<Hash> kbuckets)Sort the floodfills. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int howMany,
Set<Hash> toIgnore,
KBucketSet<Hash> kbuckets)See above for description
List will not include our own hash
Returns new list, may be modified. |
(package private) abstract List<Hash> | PeerSelector.selectMostReliablePeers(Hash key,
int numClosest,
Set<Hash> alreadyChecked,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectMostReliablePeers(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) abstract List<Hash> | PeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Floodfill peers only. |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets,
boolean preferConnected)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
protected void | HandleFloodfillDatabaseLookupMessageJob.sendClosest(Hash key,
Set<Hash> routerInfoSet,
Hash toPeer,
TunnelId replyTunnel)We extend this here to send our routerInfo back as well, if we are not floodfill. |
(package private) void | FloodfillNetworkDatabaseFacade.sendStore(Hash key,
DatabaseEntry ds,
Job onSuccess,
Job onFailure,
long sendTimeout,
Set<Hash> toIgnore)Send out a store. |
(package private) abstract void | KademliaNetworkDatabaseFacade.sendStore(Hash key,
DatabaseEntry ds,
Job onSuccess,
Job onFailure,
long sendTimeout,
Set<Hash> toIgnore)See implementation in FNDF |
(package private) boolean | LookupBanHammer.shouldBan(Hash key,
TunnelId id)Record a lookup and check if the requester should be banned. |
(package private) boolean | FloodfillNetworkDatabaseFacade.shouldBanLookup(Hash from,
TunnelId id)Check if lookup from a peer should be banned. |
(package private) boolean | FloodThrottler.shouldThrottle(Hash h)Increments the counter and checks if the hash should be throttled |
(package private) boolean | LookupThrottler.shouldThrottle(Hash key,
TunnelId id)Increment and check throttling for the given peer and tunnel. |
(package private) boolean | FloodfillNetworkDatabaseFacade.shouldThrottleFlood(Hash key)Increments and tests. |
(package private) boolean | FloodfillNetworkDatabaseFacade.shouldThrottleLookup(Hash from,
TunnelId id)Increments and tests. |
(package private) void | KademliaNetworkDatabaseFacade.stopPublishing(Hash target) |
LeaseSet | KademliaNetworkDatabaseFacade.store(Hash key,
LeaseSet leaseSet) |
LeaseSet | KademliaNetworkDatabaseFacade.store(Hash key,
LeaseSet leaseSet,
boolean force)Store the leaseSet. |
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) long | IterativeSearchJob.timeSent(Hash peer)When did we send the query to the peer? |
String | KademliaNetworkDatabaseFacade.validate(Hash key,
LeaseSet leaseSet)Validates whether the given LeaseSet is acceptable as valid and current based on current known parameters. |
(package private) void | FloodfillNetworkDatabaseFacade.verifyFinished(Hash h)Marks verification as finished for the specified hash. |
(package private) void | FloodfillNetworkDatabaseFacade.verifyStarted(Hash h)Marks verification as started for the specified hash. |
boolean | SearchState.wasAttempted(Hash peer)wasAttempted. |
(package private) boolean | SearchJob.wasAttempted(Hash peer) |
boolean | IterativeSearchJob.wasQueried(Hash peer)Did we send a request to this peer? |
static boolean | IterativeSearchJob.wasRecentlyQueried(Hash peer)Was this peer recently queried (within grace period)?
Used to avoid false positive bans for late but legitimate replies. |
(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. |
| Modifier and Type | Method and Description |
|---|---|
void | SearchState.addPending(Collection<Hash> pending)addPending. |
Set<Hash> | KademliaNetworkDatabaseFacade.findNearestRouters(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore)Get the routers closest to that key in response to a remote lookup
Only used by ../HDLMJ
Set MAY INCLUDE our own router - add to peersToIgnore if you don't want |
void | KademliaNetworkDatabaseFacade.queueForExploration(Collection<Hash> keys)Queue keys for exploration. |
void | KademliaNetworkDatabaseFacade.removeFromExploreKeys(Collection<Hash> toRemove)Remove keys from the exploration set. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int maxNumRouters,
KBucketSet<Hash> kbuckets)Sort the floodfills. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int howMany,
Set<Hash> toIgnore,
KBucketSet<Hash> kbuckets)See above for description
List will not include our own hash
Returns new list, may be modified. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(Hash key,
int howMany,
Set<Hash> toIgnore,
KBucketSet<Hash> kbuckets)See above for description
List will not include our own hash
Returns new list, may be modified. |
(package private) List<Hash> | FloodfillPeerSelector.selectFloodfillParticipants(KBucketSet<Hash> kbuckets)List will not include our own hash. |
(package private) abstract List<Hash> | PeerSelector.selectMostReliablePeers(Hash key,
int numClosest,
Set<Hash> alreadyChecked,
KBucketSet<Hash> kbuckets)List |
(package private) abstract List<Hash> | PeerSelector.selectMostReliablePeers(Hash key,
int numClosest,
Set<Hash> alreadyChecked,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectMostReliablePeers(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) List<Hash> | FloodfillPeerSelector.selectMostReliablePeers(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) abstract List<Hash> | PeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) abstract List<Hash> | PeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Floodfill peers only. |
(package private) List<Hash> | FloodfillPeerSelector.selectNearest(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Floodfill peers only. |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicit(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) abstract List<Hash> | PeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets)List |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets) |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets,
boolean preferConnected)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
(package private) List<Hash> | FloodfillPeerSelector.selectNearestExplicitThin(Hash key,
int maxNumRouters,
Set<Hash> peersToIgnore,
KBucketSet<Hash> kbuckets,
boolean preferConnected)Pick out peers with the floodfill capacity set, returning them first, but then
after they're complete, sort via kademlia. |
protected void | HandleFloodfillDatabaseLookupMessageJob.sendClosest(Hash key,
Set<Hash> routerInfoSet,
Hash toPeer,
TunnelId replyTunnel)We extend this here to send our routerInfo back as well, if we are not floodfill. |
(package private) void | FloodfillNetworkDatabaseFacade.sendStore(Hash key,
DatabaseEntry ds,
Job onSuccess,
Job onFailure,
long sendTimeout,
Set<Hash> toIgnore)Send out a store. |
(package private) abstract void | KademliaNetworkDatabaseFacade.sendStore(Hash key,
DatabaseEntry ds,
Job onSuccess,
Job onFailure,
long sendTimeout,
Set<Hash> toIgnore)See implementation in FNDF |
| Constructor and Description |
|---|
DirectLookupJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash peer,
RouterInfo oldRI,
Job onFind,
Job onFail) |
ExploreJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key,
boolean isRealExplore,
long msgIDBloomXor)Constructs a new ExploreJob with given parameters and calculates concurrency level. |
FloodfillNetworkDatabaseFacade(RouterContext context,
Hash dbid)Sub DBs |
FloodfillStoreJob(RouterContext context,
FloodfillNetworkDatabaseFacade facade,
Hash key,
DatabaseEntry data,
Job onSuccess,
Job onFailure,
long timeoutMs)Create a new FloodfillStoreJob to send data to floodfills. |
FloodfillStoreJob(RouterContext context,
FloodfillNetworkDatabaseFacade facade,
Hash key,
DatabaseEntry data,
Job onSuccess,
Job onFailure,
long timeoutMs,
Set<Hash> toSkip)Create a new FloodfillStoreJob to send data to floodfills. |
FloodfillVerifyStoreJob(RouterContext ctx,
Hash key,
Hash client,
long published,
int type,
Hash sentTo,
Set<Hash> toSkip,
FloodfillNetworkDatabaseFacade facade)Delay a few seconds, then start the verify |
FloodOnlySearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs)For DirectLookupJob extension, RI only, different match job |
FloodOnlySearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs,
boolean isLease) |
FloodSearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs,
boolean isLease) |
HandleFloodfillDatabaseLookupMessageJob(RouterContext ctx,
DatabaseLookupMessage receivedMessage,
RouterIdentity from,
Hash fromHash,
long msgIDBloomXor)Creates a new job to handle a floodfill database lookup message |
HandleFloodfillDatabaseStoreMessageJob(RouterContext ctx,
DatabaseStoreMessage receivedMessage,
RouterIdentity from,
Hash fromHash,
FloodfillNetworkDatabaseFacade facade,
long msgIDBloomXor) |
IterativeFollowupJob(RouterContext ctx,
Hash key,
Hash to,
IterativeSearchJob search)IterativeFollowupJob. |
IterativeSearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs,
boolean isLease)Lookup using exploratory tunnels |
IterativeSearchJob(RouterContext ctx,
FloodfillNetworkDatabaseFacade facade,
Hash key,
Job onFind,
Job onFailed,
int timeoutMs,
boolean isLease,
Hash fromLocalDest)Lookup using the client's tunnels. |
IterativeTimeoutJob(RouterContext ctx,
Hash peer,
IterativeSearchJob job)Create a timeout job for an iterative search |
KademliaNetworkDatabaseFacade(RouterContext context,
Hash dbid)Initializes the Kademlia-based network database facade. |
LocalHash(Hash h)LocalHash. |
RepublishLeaseSetJob(RouterContext ctx,
KademliaNetworkDatabaseFacade facade,
Hash destHash)Creates a new job to republish a LeaseSet for the given destination. |
SearchJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key,
Job onSuccess,
Job onFailure,
long timeoutMs,
boolean keepStats,
boolean isLease,
long msgIDBloomXor)Create a new search for the routingKey specified |
SearchReplyJob(RouterContext enclosingContext,
SearchJob job,
DatabaseSearchReplyMessage message,
Hash peer,
long duration)SearchReplyJob. |
SearchState(RouterContext context,
Hash key)SearchState. |
SingleSearchJob(RouterContext ctx,
Hash key,
Hash to) |
StoreJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key,
DatabaseEntry data,
Job onSuccess,
Job onFailure,
long timeoutMs)Send a data structure to the floodfills |
StoreJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key,
DatabaseEntry data,
Job onSuccess,
Job onFailure,
long timeoutMs,
Set<Hash> toSkip)Send a data structure to the floodfills, skipping certain peers |
StoreState(RouterContext ctx,
Hash key,
DatabaseEntry data)StoreState. |
StoreState(RouterContext ctx,
Hash key,
DatabaseEntry data,
Set<Hash> toSkip)Constructs a new StoreState for tracking store operations. |
| Constructor and Description |
|---|
FloodfillStoreJob(RouterContext context,
FloodfillNetworkDatabaseFacade facade,
Hash key,
DatabaseEntry data,
Job onSuccess,
Job onFailure,
long timeoutMs,
Set<Hash> toSkip)Create a new FloodfillStoreJob to send data to floodfills. |
FloodfillVerifyStoreJob(RouterContext ctx,
Hash key,
Hash client,
long published,
int type,
Hash sentTo,
Set<Hash> toSkip,
FloodfillNetworkDatabaseFacade facade)Delay a few seconds, then start the verify |
StoreJob(RouterContext context,
KademliaNetworkDatabaseFacade facade,
Hash key,
DatabaseEntry data,
Job onSuccess,
Job onFailure,
long timeoutMs,
Set<Hash> toSkip)Send a data structure to the floodfills, skipping certain peers |
StoreState(RouterContext ctx,
Hash key,
DatabaseEntry data,
Set<Hash> toSkip)Constructs a new StoreState for tracking store operations. |
| Modifier and Type | Method and Description |
|---|---|
Hash | PeerProfile.getPeer()what peer is being profiled |
Hash | ProfileOrganizer.getUs()Self-exclusion hash for this router instance. |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | PeerManagerFacadeImpl.getPeersByCapability(char capability) |
Set<Hash> | PeerManager.getPeersByCapability(char capability) |
Set<Hash> | ProfileOrganizer.selectAllPeers()Gather the union of all peers from fast, high-capacity, and not-failing tiers. |
(package private) Set<Hash> | PeerManager.selectPeers() |
(package private) List<Hash> | PeerManager.selectPeers(PeerSelectionCriteria criteria)Find some peers that meet the criteria and we have the netDb info for locally. |
| Modifier and Type | Method and Description |
|---|---|
void | ProfileManagerImpl.commErrorOccurred(Hash peer)Deprecated. unused |
void | ProfileManagerImpl.dbLookupFailed(Hash peer)Note that the peer was unable to reply to a db lookup - either with data or with
a lookupReply redirecting the user elsewhere
This will force creation of DB stats
Non-blocking. |
void | ProfileManagerImpl.dbLookupReceived(Hash peer)Note that the local router received a db lookup from the given peer
Non-blocking. |
void | ProfileManagerImpl.dbLookupReply(Hash peer,
int newPeers,
int oldPeers,
int invalid,
int duplicate,
long responseTimeMs)Note that the peer replied to a db lookup with a redirect to other routers, where
the list of redirected users included newPeers routers that the local router didn't
know about, oldPeers routers that the local router already knew about, the given invalid
routers that were invalid in some way, and the duplicate number of routers that we explicitly
asked them not to send us, but they did anyway
Non-blocking. |
void | ProfileManagerImpl.dbLookupSuccessful(Hash peer,
long responseTimeMs)Note that the peer was able to return the valid data for a db lookup
This will force creation of DB stats
Non-blocking. |
void | ProfileManagerImpl.dbStoreFailed(Hash peer)Note that we were unable to confirm a successful send of db data to
the peer, at least not within our timeout period
This will force creation of DB stats |
void | ProfileManagerImpl.dbStoreReceived(Hash peer,
boolean wasNewKey)Note that the local router received an unprompted db store from the given peer
Non-blocking. |
void | ProfileManagerImpl.dbStoreSent(Hash peer,
long responseTimeMs)Note that we've confirmed a successful send of db data to the peer (though we haven't
necessarily requested it again from them, so they /might/ be lying)
As of 0.9.53 we update the DbResponseTime. |
void | ProfileManagerImpl.dbStoreSuccessful(Hash peer)Note that we've verified a successful send of db data to the floodfill peer
by querying another floodfill. |
void | ProfileOrganizer.demoteIfCongested(Hash peer)Immediately demote a peer from fast/high-cap tiers if it has a congestion cap (D/E). |
void | ProfileOrganizer.demoteIfHighLatency(Hash peer)Immediately demote a peer from fast/high-cap tiers if its capacityBonus is -30
(UI shows ✖ for high latency). |
(package private) void | ProfileOrganizer.demoteIfHighRTT(Hash peer,
long responseTimeMs)Immediately demote a peer from fast/high-cap tiers if its tunnel test RTT
exceeds the low-latency threshold (timeout * 2), matching the PeerTestJob metric. |
void | ProfileOrganizer.demoteIfNoTunnel(Hash peer)Immediately demote a peer from fast/high-cap tiers if it has G cap (no tunnels). |
void | ProfileOrganizer.demoteIfStale(Hash peer)Immediately demote a peer from fast/high-cap tiers if its RouterInfo is stale
and it has no recent proof of life (fails isSelectable). |
void | ProfileOrganizer.demoteIfUnreachable(Hash peer)Immediately demote a peer from fast/high-cap tiers when our transport
connection to it failed during tunnel build (first hop unreachable). |
boolean | ProfileOrganizer.exportProfile(Hash profile,
OutputStream out)Write a peer profile to the given output stream for persistence. |
(package private) PeerProfile | ProfileOrganizer.getOrCreateProfileNonblocking(Hash peer)Retrieve an existing profile or create a new one, without blocking on contention. |
PeerProfile | ProfileOrganizer.getProfile(Hash peer)Retrieve the profile for a peer, or null if unknown. |
PeerProfile | ProfileOrganizer.getProfileNonblocking(Hash peer)Retrieve the profile for a peer without blocking. |
void | ProfileManagerImpl.heardAbout(Hash peer)Note that the local router received a reference to the given peer, either
through an explicit dbStore or in a dbLookupReply
Non-blocking. |
void | ProfileManagerImpl.heardAbout(Hash peer,
long when)Note that the local router received a reference to the given peer
at a certain time. |
(package private) boolean | ProfileOrganizer.isExcludedFromProfiling(Hash peer)Check if a peer should be excluded from profiling. |
boolean | ProfileOrganizer.isFast(Hash peer)Check whether a peer is classified in the fast tier. |
boolean | ProfileOrganizer.isHighCapacity(Hash peer)Check whether a peer is classified in the high-capacity tier. |
(package private) boolean | ProfileOrganizer.isLowBandwidthTier(Hash peer)Check if a peer is in a low bandwidth tier (K, L, M, or Unknown). |
boolean | ProfileOrganizer.isSelectable(Hash peer) |
boolean | ProfileOrganizer.isWellIntegrated(Hash peer)Check whether a peer is classified in the well-integrated tier. |
void | ProfileManagerImpl.messageFailed(Hash peer)Note that the router failed to send a message to the peer over any transport. |
void | ProfileManagerImpl.messageFailed(Hash peer,
String transport)Note that the router failed to send a message to the peer over the transport specified. |
void | ProfileManagerImpl.messageReceived(Hash peer,
String style,
long msToReceive,
int bytesRead)Note that the router received a message from the given peer on the specified
transport. |
void | ProfileManagerImpl.messageSent(Hash peer,
String transport,
long msToSend,
long bytesSent)Note that it took msToSend to send a message of size bytesSent to the peer over the transport. |
boolean | ProfileOrganizer.peerSendsBadReplies(Hash peer)Check whether a peer sends an excessive rate of invalid or failed
netDb lookup replies (potential misbehavior indicator). |
void | PeerManagerFacadeImpl.removeCapabilities(Hash peer)removeCapabilities. |
void | PeerManager.removeCapabilities(Hash peer)removeCapabilities. |
void | PeerManagerFacadeImpl.setCapabilities(Hash peer,
String caps) |
void | PeerManager.setCapabilities(Hash peer,
String caps) |
void | ProfileOrganizer.setUs(Hash us)Set the local router hash for self-exclusion from peer selection. |
void | ProfilePersistenceHelper.setUs(Hash routerIdentHash)setUs. |
void | ProfileManagerImpl.tunnelDataPushed(Hash peer,
long rtt,
int size)Non-blocking. |
void | ProfileManagerImpl.tunnelDataPushed1m(Hash peer,
int size)Non-blocking. |
void | ProfileManagerImpl.tunnelFailed(Hash peer,
int pct)Note that the peer participated in a tunnel that failed. |
void | ProfileManagerImpl.tunnelJoined(Hash peer,
long responseTimeMs)Note that the router agreed to participate in a tunnel |
void | ProfileManagerImpl.tunnelLifetimePushed(Hash peer,
long lifetime,
long size)Non-blocking. |
void | ProfileManagerImpl.tunnelRejected(Hash peer,
long responseTimeMs,
int severity)Note that a router explicitly rejected joining a tunnel. |
void | ProfileManagerImpl.tunnelTestSucceeded(Hash peer,
long responseTimeMs)Note that a tunnel that the router is participating in
was successfully tested with the given round trip latency
Non-blocking. |
void | ProfileManagerImpl.tunnelTimedOut(Hash peer)Note that a router did not respond to a tunnel join. |
| Modifier and Type | Method and Description |
|---|---|
void | ProfilePersistenceHelper.purgeExcessProfiles(Set<Hash> keepPeers,
int maxProfiles)Delete profile files not in 'keepPeers', if total file count > maxProfiles. |
void | PeerTestJob.schedulePriorityTests(List<Hash> peers)Schedule peers for priority testing (e.g., from slow tunnels). |
void | ProfileOrganizer.selectActiveNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select from currently connected (established) not-failing peers. |
void | ProfileOrganizer.selectActiveNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select from currently connected (established) not-failing peers. |
void | ProfileOrganizer.selectActiveNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select from currently connected peers with IP-subnet diversity. |
void | ProfileOrganizer.selectActiveNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select from currently connected peers with IP-subnet diversity. |
void | ProfileOrganizer.selectAllNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing)Select from all not-failing peers randomly, falling through to general
peers if the not-failing set is insufficient. |
void | ProfileOrganizer.selectAllNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing)Select from all not-failing peers randomly, falling through to general
peers if the not-failing set is insufficient. |
void | ProfileOrganizer.selectFastPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select up to howMany fast-tier peers, filling shortfalls from high-capacity. |
void | ProfileOrganizer.selectFastPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select up to howMany fast-tier peers, filling shortfalls from high-capacity. |
void | ProfileOrganizer.selectFastPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select fast-tier peers with IP-subnet diversity constraints. |
void | ProfileOrganizer.selectFastPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select fast-tier peers with IP-subnet diversity constraints. |
void | ProfileOrganizer.selectFastPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
SessionKey randomKey,
ProfileOrganizer.Slice subTierMode,
int mask,
MaskedIPSet ipSet)Select fast-tier peers deterministically sliced by a random key. |
void | ProfileOrganizer.selectFastPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
SessionKey randomKey,
ProfileOrganizer.Slice subTierMode,
int mask,
MaskedIPSet ipSet)Select fast-tier peers deterministically sliced by a random key. |
void | ProfileOrganizer.selectHighBandwidthPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select up to howMany peers from O/P/X bandwidth tiers (high shared bandwidth)
that are not failing. |
void | ProfileOrganizer.selectHighBandwidthPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select up to howMany peers from O/P/X bandwidth tiers (high shared bandwidth)
that are not failing. |
void | ProfileOrganizer.selectHighBandwidthPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing,
int mask,
MaskedIPSet ipSet)Select high-bandwidth peers with tier-exclusion and IP-subnet diversity. |
void | ProfileOrganizer.selectHighBandwidthPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing,
int mask,
MaskedIPSet ipSet)Select high-bandwidth peers with tier-exclusion and IP-subnet diversity. |
void | ProfileOrganizer.selectHighCapacityPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select high-capacity peers, filling shortfalls from not-failing peers. |
void | ProfileOrganizer.selectHighCapacityPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select high-capacity peers, filling shortfalls from not-failing peers. |
void | ProfileOrganizer.selectHighCapacityPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select high-capacity peers with IP-subnet diversity. |
void | ProfileOrganizer.selectHighCapacityPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select high-capacity peers with IP-subnet diversity. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select from not-failing peers, excluding high-capacity tier if requested. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches)Select from not-failing peers, excluding high-capacity tier if requested. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing)Select from not-failing peers, optionally excluding the high-capacity tier. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing)Select from not-failing peers, optionally excluding the high-capacity tier. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing,
int mask,
MaskedIPSet ipSet)Full-parameter select from not-failing peers. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
boolean onlyNotFailing,
int mask,
MaskedIPSet ipSet)Full-parameter select from not-failing peers. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select from not-failing peers with IP-subnet diversity. |
void | ProfileOrganizer.selectNotFailingPeers(int howMany,
Set<Hash> exclude,
Set<Hash> matches,
int mask,
MaskedIPSet ipSet)Select from not-failing peers with IP-subnet diversity. |
| Constructor and Description |
|---|
PeerProfile(RouterContext context,
Hash peer)Caller should call setLastHeardAbout() and setFirstHeardAbout() |
| Modifier and Type | Method and Description |
|---|---|
Map<Hash,Points> | Analysis.backgroundAnalysis(boolean includeAll)Analyze threats. |
Map<Hash,Points> | PersistSybil.load(long date)Load the analysis for a certain date. |
| Modifier and Type | Method and Description |
|---|---|
void | Analysis.calculateRouterInfo(Hash us,
String usName,
List<RouterInfo> ris,
Map<Hash,Points> points)Build the version comparison report. |
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. |
Map<Long,Points> | PersistSybil.load(Hash h)Load all the analysis for a certain hash. |
| 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. |
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. |
void | PersistSybil.store(long date,
Map<Hash,Points> entries)Store each entry. |
| Modifier and Type | Method and Description |
|---|---|
List<Hash> | CommSystemFacadeImpl.getEstablished() |
List<Hash> | Transport.getEstablished()Get list of peers that this transport has established connections with. |
List<Hash> | TransportManager.getEstablished() |
| Modifier and Type | Method and Description |
|---|---|
void | CommSystemFacadeImpl.exemptIncoming(Hash peer)Exempt this router hash from any incoming throttles or rejections |
void | CommSystemFacadeImpl.forceDisconnect(Hash peer)Tell the comm system to disconnect from this peer. |
void | Transport.forceDisconnect(Hash peer)Force immediate disconnection from specified peer. |
(package private) void | TransportManager.forceDisconnect(Hash peer)Tell the transports to disconnect from this peer. |
void | CommSystemFacadeImpl.forceDisconnect(Hash peer,
String reason)forceDisconnect. |
void | Transport.forceDisconnect(Hash peer,
String reason)Forcefully disconnect from a peer with a reason for logging. |
(package private) void | TransportManager.forceDisconnect(Hash peer,
String reason)Tell the transports to disconnect from this peer with a reason for logging. |
String | CommSystemFacadeImpl.getCountry(Hash peer)Uses the transport IP first because that lookup is fast, then the IP from the netDb. |
static byte[] | TransportImpl.getIP(Hash peer)IP of the peer from the last connection (in or out, any transport). |
byte[] | CommSystemFacadeImpl.getIP(Hash peer) |
(package private) byte[] | TransportManager.getIP(Hash peer)IP of the peer from the last connection (in or out, any transport). |
boolean | TransportImpl.isBacklogged(Hash peer) |
boolean | CommSystemFacadeImpl.isBacklogged(Hash peer) |
boolean | Transport.isBacklogged(Hash peer) |
(package private) boolean | TransportManager.isBacklogged(Hash peer) |
boolean | TransportImpl.isConnecting(Hash peer)Check if a connection attempt is in progress for the given peer. |
boolean | CommSystemFacadeImpl.isConnecting(Hash peer) |
boolean | Transport.isConnecting(Hash peer)Check if a connection attempt is in progress for the given peer. |
(package private) boolean | TransportManager.isConnecting(Hash peer)Check if any transport has a connection attempt in progress for the peer. |
boolean | TransportImpl.isEstablished(Hash peer) |
boolean | CommSystemFacadeImpl.isEstablished(Hash peer) |
boolean | Transport.isEstablished(Hash peer) |
(package private) boolean | TransportManager.isEstablished(Hash peer) |
boolean | CommSystemFacadeImpl.isInStrictCountry(Hash peer)Are they in a strict country. |
boolean | TransportImpl.isUnreachable(Hash peer) |
boolean | Transport.isUnreachable(Hash peer) |
void | TransportImpl.markReachable(Hash peer,
boolean isInbound)called when we establish a peer connection (outbound or inbound) |
void | TransportImpl.markUnreachable(Hash peer)called when we can't reach a peer |
void | TransportImpl.mayDisconnect(Hash peer)Tell the transport that we may disconnect from this peer. |
void | CommSystemFacadeImpl.mayDisconnect(Hash peer)Tell the comm system that we may disconnect from this peer. |
void | Transport.mayDisconnect(Hash peer)Suggest that transport may disconnect from specified peer. |
(package private) void | TransportManager.mayDisconnect(Hash peer)Tell the transports that we may disconnect from this peer. |
void | TransportEventListener.messageReceived(I2NPMessage message,
RouterIdentity fromRouter,
Hash fromRouterHash)Message received |
void | TransportManager.messageReceived(I2NPMessage message,
RouterIdentity fromRouter,
Hash fromRouterHash)Handle incoming I2NP message from a peer. |
void | TransportImpl.messageReceived(I2NPMessage inMsg,
RouterIdentity remoteIdent,
Hash remoteIdentHash,
long msToReceive,
int bytesReceived)Message received from the I2NPMessageReader - send it to the listener |
String | CommSystemFacadeImpl.renderPeerCaps(Hash peer,
boolean inline)Renders the peer's capability HTML block. |
String | CommSystemFacadeImpl.renderPeerFlag(Hash peer)renderPeerFlag. |
String | CommSystemFacadeImpl.renderPeerHTML(Hash peer,
boolean extended)Renders HTML for a peer with optional extended info. |
void | TransportImpl.setIP(Hash peer,
byte[] ip)IP of the peer from the last connection (in or out, any transport). |
boolean | TransportImpl.wasUnreachable(Hash peer)Was the peer unreachable (outbound only) the last time we tried it?
This is NOT reset if the peer contacts us. |
boolean | CommSystemFacadeImpl.wasUnreachable(Hash peer)wasUnreachable. |
boolean | Transport.wasUnreachable(Hash peer)Check if peer was unreachable on last outbound attempt. |
(package private) boolean | TransportManager.wasUnreachable(Hash peer)Was the peer unreachable (outbound only) on any transport,
based on the last time we tried it for each transport?
This is NOT reset if the peer contacts us. |
| Modifier and Type | Method and Description |
|---|---|
List<Hash> | NTCPTransport.getEstablished()Connected peers. |
| Modifier and Type | Method and Description |
|---|---|
void | NTCPTransport.forceDisconnect(Hash peer)Tell the transport to disconnect from this peer. |
void | NTCPTransport.forceDisconnect(Hash peer,
String reason)Tell the transport to disconnect from this peer with a reason for logging. |
boolean | NTCPTransport.isBacklogged(Hash dest) |
boolean | NTCPTransport.isConnecting(Hash dest) |
boolean | NTCPTransport.isEstablished(Hash dest) |
void | NTCPTransport.mayDisconnect(Hash peer)Tell the transport that we may disconnect from this peer. |
void | EventPumper.trackFailedInboundHandshake(byte[] ip,
Hash hash)Track failed inbound handshake for diagnostic stats. |
void | EventPumper.trackInvalidEncryption(byte[] ip,
Hash hash)Track failed inbound handshake with invalid encryption and ban if too many failures. |
| Modifier and Type | Field and Description |
|---|---|
protected Hash | PeerState._remotePeerThe peer are we talking to. |
| Modifier and Type | Method and Description |
|---|---|
Hash | PeerTestState.getCharlieHash()Return Charlie's Hash (SSU2 only). |
Hash | InboundMessageState.getFrom()Returns the Hash of the sender. |
(package private) Hash | UDPAddress.getIntroducerHash(int i)Introducer hash for the given introducer. |
Hash | RemoteHostId.getPeerHash()Get the peer hash, or null if direct |
Hash | PeerState.getRemotePeer()remote peer hash. |
| Modifier and Type | Method and Description |
|---|---|
List<Hash> | UDPTransport.getEstablished()Identities of all currently established peers. |
List<Hash> | PeerTestState.getPreviousCharlies()Return previous Charlie hashes (SSU2 only, Bob only). |
| Modifier and Type | Method and Description |
|---|---|
UDPPacket | PacketBuilder2.buildPeerTestToAlice(int code,
Hash charlieHash,
byte[] signedData,
PeerState2 alice)Build a packet as Bob to Alice, with the response from Charlie,
or a rejection by Bob. |
UDPPacket | PacketBuilder2.buildPeerTestToAlice(int code,
Hash charlieHash,
byte[] signedData,
SSU2Payload.Block riBlock,
PeerState2 alice)Build a packet as Bob to Alice, with the response from Charlie,
or a rejection by Bob. |
UDPPacket | PacketBuilder2.buildPeerTestToCharlie(Hash aliceHash,
byte[] signedData,
SSU2Payload.Block riBlock,
PeerState2 charlie)Build a packet as Bob to Charlie to help test Alice. |
static byte[] | SSU2Util.createPeerTestData(I2PAppContext ctx,
Hash h,
Hash h2,
PeerTestState.Role role,
long nonce,
byte[] ip,
int port,
SigningPrivateKey spk)Make the data for the peer test block |
static byte[] | SSU2Util.createRelayRequestData(I2PAppContext ctx,
Hash h,
Hash h2,
long nonce,
long tag,
byte[] ip,
int port,
SigningPrivateKey spk)Make the data for the relay request block |
static byte[] | SSU2Util.createRelayResponseData(I2PAppContext ctx,
Hash h,
int code,
long nonce,
byte[] ip,
int port,
SigningPrivateKey spk,
long token)Make the data for the relay response block |
(package private) void | UDPTransport.dropPeer(Hash peer,
boolean shouldBanlist,
String why)This does not send a session destroy, caller must do that if desired. |
(package private) void | UDPTransport.externalAddressReceived(Hash from,
byte[] hisIP,
byte[] ourIP,
int ourPort)Someone we tried to contact gave us what they think our IP address is. |
void | UDPTransport.forceDisconnect(Hash peer)Force disconnect a peer. |
void | UDPTransport.forceDisconnect(Hash peer,
String reason)Force disconnect with reason. |
OutboundEstablishState2.IntroState | OutboundEstablishState2.getIntroState(Hash h)Get the current state for the SSU2 introducer specified |
(package private) PeerState | UDPTransport.getPeerState(Hash remotePeer)get the state for the peer with the given ident, or null
if no state exists |
void | SSU2Payload.PayloadCallback.gotPeerTest(int msg,
int status,
Hash h,
byte[] data)Receive a peer test block. |
void | OutboundEstablishState2.gotPeerTest(int msg,
int status,
Hash h,
byte[] data) |
void | InboundEstablishState2.gotPeerTest(int msg,
int status,
Hash h,
byte[] data)gotPeerTest. |
void | PeerStateDestroyed.gotPeerTest(int msg,
int status,
Hash h,
byte[] data)gotPeerTest. |
void | PeerState2.gotPeerTest(int msg,
int status,
Hash h,
byte[] data)gotPeerTest. |
void | SSU2Payload.PayloadCallback.gotRelayIntro(Hash aliceHash,
byte[] data)Receive a relay introduction. |
void | OutboundEstablishState2.gotRelayIntro(Hash aliceHash,
byte[] data) |
void | InboundEstablishState2.gotRelayIntro(Hash aliceHash,
byte[] data)gotRelayIntro. |
void | PeerStateDestroyed.gotRelayIntro(Hash aliceHash,
byte[] data)gotRelayIntro. |
void | PeerState2.gotRelayIntro(Hash aliceHash,
byte[] data)gotRelayIntro. |
void | OutboundEstablishState2.introSent(Hash h)A relay request was sent to the SSU2 introducer specified |
boolean | UDPTransport.isBacklogged(Hash dest) |
boolean | EstablishmentManager.isConnecting(Hash dest)Check if an outbound SSU handshake is in progress for the given peer. |
boolean | UDPTransport.isConnecting(Hash dest) |
boolean | UDPTransport.isEstablished(Hash dest) |
void | UDPTransport.mayDisconnect(Hash peer)Tell the transport that we may disconnect from this peer. |
void | UDPTransport.messageReceived(I2NPMessage inMsg,
RouterIdentity remoteIdent,
Hash remoteIdentHash,
long msToReceive,
int bytesReceived)messageReceived. |
(package private) void | IntroductionManager.receiveRelayIntro(PeerState2 bob,
Hash alice,
byte[] data)Processes a relay introduction message received from another peer. |
void | PeerTestManager.receiveTest(RemoteHostId from,
PeerState2 fromPeer,
int msg,
int status,
Hash h,
byte[] data)Entry point for all in-session incoming packets. |
void | PeerTestState.setAlice(InetAddress ip,
int port,
Hash hash)Set Alice's IP, port, and hash. |
void | PeerTestState.setCharlie(InetAddress ip,
int port,
Hash hash)Set Charlie's IP, port, and hash. |
void | OutboundEstablishState2.setIntroState(Hash h,
OutboundEstablishState2.IntroState state)Set the current state for the SSU2 introducer specified |
static Signature | SSU2Util.sign(I2PAppContext ctx,
byte[] prologue,
Hash h,
Hash h2,
byte[] data,
int datalen,
SigningPrivateKey spk)Sign the relay or peer test data, using
the prologue and hash as the initial data,
and then the provided data. |
static boolean | SSU2Util.validateSig(I2PAppContext ctx,
byte[] prologue,
Hash h,
Hash h2,
byte[] data,
SigningPublicKey spk)Validate the signed relay or peer test data, using
the prologue and hash as the initial data,
and then the provided data which ends with a signature of the specified type. |
| Constructor and Description |
|---|
InboundMessageState(RouterContext ctx,
long messageId,
Hash from)Constructs a new InboundMessageState with no fragments. |
InboundMessageState(RouterContext ctx,
long messageId,
Hash from,
byte[] data,
int off,
int len,
int fragmentNum,
boolean isLast)Constructs and initializes by receiving one fragment. |
PeerState(RouterContext ctx,
UDPTransport transport,
InetSocketAddress addr,
Hash remotePeer,
boolean isInbound,
int rtt)For SSU2 |
PeerState2(RouterContext ctx,
UDPTransport transport,
InetSocketAddress remoteAddress,
Hash remotePeer,
boolean isInbound,
int rtt,
CipherState sendCha,
CipherState rcvCha,
long sendID,
long rcvID,
byte[] sendHdrKey1,
byte[] sendHdrKey2,
byte[] rcvHdrKey2)If inbound, caller MUST immediately call setWeRelayToThemAs() (if nonzero) and sendAck0(). |
PeerTestBlock(int msgNum,
int code,
Hash hash,
byte[] data) |
RemoteHostId(Hash peerHash)indirect |
| Modifier and Type | Field and Description |
|---|---|
protected Hash | PendingGatewayMessage._toRouterthe destination router |
| Modifier and Type | Method and Description |
|---|---|
Hash | TunnelCreatorConfig.getBlankHash()Checksum for blank record |
Hash | InboundEndpointProcessor.getDestination() |
Hash | TunnelCreatorConfig.getDestination()If this is a client tunnel, what destination is it for? |
Hash | TunnelCreatorConfig.getEndpoint()For convenience |
Hash | TunnelCreatorConfig.getFarEnd()For convenience |
Hash | TunnelCreatorConfig.getGateway()For convenience |
Hash | TunnelCreatorConfig.getPeer(int hop)retrieve the peer at the given hop. |
Hash | HopConfig.getReceiveFrom()what is the previous peer in the tunnel (null if gateway) |
Hash | InboundGatewayReceiver.getSendTo()The next hop |
Hash | HopConfig.getSendTo()what is the next peer in the tunnel (null if endpoint) |
Hash | TunnelGateway.Receiver.getSendTo() |
Hash | OutboundReceiver.getSendTo()The next hop |
Hash | FragmentedMessage.getTargetRouter() |
Hash | PendingGatewayMessage.getToRouter()The destination router. |
| Modifier and Type | Method and Description |
|---|---|
boolean | TunnelGatewayZeroHop.add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)Add a message to be sent down the tunnel (immediately forwarding it to the
InboundMessageDistributor or OutboundMessageDistributor, as
necessary). |
boolean | PumpedTunnelGateway.add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)Adds a message to be sent down the tunnel. |
boolean | ThrottledPumpedTunnelGateway.add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)Adds a message to the inbound gateway after a bandwidth-based drop check. |
boolean | TunnelGateway.add(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)Add a message to be sent down the tunnel, either sending it now (perhaps
coalesced with other pending messages) or after a brief pause (_flushFrequency). |
void | TunnelParticipant.dispatch(TunnelDataMessage msg,
Hash recvFrom)Process an incoming tunnel data message. |
void | TunnelDispatcher.dispatch(TunnelDataMessage msg,
Hash recvFrom)Dispatch a TunnelDataMessage to the appropriate participant or endpoint |
void | OutboundTunnelEndpoint.dispatch(TunnelDataMessage msg,
Hash recvFrom)dispatch. |
boolean | TunnelDispatcher.dispatchOutbound(I2NPMessage msg,
TunnelId outboundTunnel,
Hash targetPeer)Dispatch an outbound message through a tunnel. |
boolean | TunnelDispatcher.dispatchOutbound(I2NPMessage msg,
TunnelId outboundTunnel,
TunnelId targetTunnel,
Hash targetPeer)Dispatch an outbound message through a tunnel. |
void | InboundMessageDistributor.distribute(I2NPMessage msg,
Hash target)distribute. |
void | OutboundMessageDistributor.distribute(I2NPMessage msg,
Hash target)Warning - as of 0.9.63, msg will be an UnknownI2NPMessage,
and must be converted before handling locally. |
void | InboundMessageDistributor.distribute(I2NPMessage msg,
Hash target,
TunnelId tunnel)distribute. |
void | OutboundMessageDistributor.distribute(I2NPMessage msg,
Hash target,
TunnelId tunnel)Warning - as of 0.9.63, msg will be an UnknownI2NPMessage,
and must be converted before handling locally. |
boolean | HopProcessor.process(byte[] orig,
int offset,
int length,
Hash prev)Process the data for the current hop, overwriting the original data with
what should be sent to the next peer. |
boolean | FragmentedMessage.receive(byte[] payload,
int offset,
int length,
boolean isLast,
Hash toRouter,
TunnelId toTunnel)Receive the first fragment (#0) and related metadata. |
void | FragmentHandler.DefragmentedReceiver.receiveComplete(I2NPMessage msg,
Hash toRouter,
TunnelId toTunnel)Receive a fully formed I2NPMessage out of the tunnel |
boolean | InboundEndpointProcessor.retrievePreprocessedData(byte[] orig,
int offset,
int length,
Hash prev)Undo all of the encryption done by the peers in the tunnel, recovering the
preprocessed data sent by the gateway. |
void | TunnelCreatorConfig.setBlankHash(Hash h)Checksum for blank record |
void | TunnelCreatorConfig.setPeer(int hop,
Hash peer)setPeer. |
void | HopConfig.setReceiveFrom(Hash from)Do not set for gateway |
void | HopConfig.setSendTo(Hash to)Do not set for endpoint |
| Constructor and Description |
|---|
InboundMessageDistributor(RouterContext ctx,
Hash client)Create a new inbound message distributor. |
OutboundGatewayMessage(I2NPMessage message,
Hash toRouter,
TunnelId toTunnel)OutboundGatewayMessage. |
PendingGatewayMessage(I2NPMessage message,
Hash toRouter,
TunnelId toTunnel)PendingGatewayMessage. |
TunnelCreatorConfig(RouterContext ctx,
int length,
boolean isInbound,
Hash destination) |
| Modifier and Type | Field and Description |
|---|---|
protected static Map<Hash,Long> | TunnelPeerSelector._firstHopFailsTracks when a peer last failed as first hop |
protected static Map<Hash,Long> | TunnelPeerSelector._peerCooldownsShared cooldown map across all peer selectors |
protected Map<Hash,String> | ExcluderBase._reasonsMaps peer hash to the reason it was excluded, for diagnostic logging. |
protected Set<Hash> | ExcluderBase.ss. |
| Modifier and Type | Method and Description |
|---|---|
protected Set<Hash> | TunnelPeerSelector.getClosestHopExclude(boolean isInbound,
Set<Hash> toAdd)Pick peers that we want to avoid for the first OB hop or last IB hop. |
protected Set<Hash> | TunnelPeerSelector.getExclude(boolean isInbound,
boolean isExploratory)As of 0.9.58, this returns a set populated only by TunnelManager.selectPeersInTooManyTunnels(),
for passing to ProfileOrganizer. |
Map<Hash,TunnelPool> | TunnelPoolManager.getInboundClientPools()for TunnelRenderer in router console |
Map<Hash,TunnelPool> | TunnelPoolManager.getOutboundClientPools()for TunnelRenderer in router console |
protected static Set<Hash> | TunnelPeerSelector.getPeersInPool(RouterContext ctx,
TunnelPool pool)Get all non-self peers in active tunnels of the given pool. |
Iterator<Hash> | ExcluderBase.iterator()iterator. |
protected List<Hash> | TunnelPeerSelector.regeneratePeers(TunnelPoolSettings settings,
List<Hash> peers)Regenerate tunnel peers to avoid duplicate sequence. |
protected List<Hash> | TunnelPeerSelector.selectExplicit(TunnelPoolSettings settings,
int length)For debugging, also possibly for restricted routes. |
List<Hash> | ExploratoryPeerSelector.selectPeers(TunnelPoolSettings settings)Returns ENDPOINT FIRST, GATEWAY LAST!!!!
In: us .. |
abstract List<Hash> | TunnelPeerSelector.selectPeers(TunnelPoolSettings settings)Which peers should go into the next tunnel for the given settings? |
List<Hash> | ClientPeerSelector.selectPeers(TunnelPoolSettings settings)Returns ENDPOINT FIRST, GATEWAY LAST!!!!
In: us .. |
Set<Hash> | TunnelPoolManager.selectPeersInTooManyTunnels()For reliability reasons, don't allow a peer in more than x% of
client and exploratory tunnels. |
| Modifier and Type | Method and Description |
|---|---|
boolean | ExcluderBase.add(Hash h)add. |
protected boolean | TunnelPeerSelector.allowAsIBGW(Hash h)Should we allow as IBGW?
This just checks for the "R" capability and IPv4 support. |
protected boolean | TunnelPeerSelector.allowAsOBEP(Hash h)Should we allow as OBEP?
This just checks for IPv4 support. |
boolean | ConnectChecker.canConnect(Hash from,
Hash to)Can "from" connect to "to" based on published addresses?
This is intended for tunnel candidates, where we already have
the RI. |
void | GhostPeerManager.clearGhost(Hash peer)Clear ghost status for a peer (manual intervention). |
static void | BuildMessageGenerator.createRecord(int recordNum,
int hop,
TunnelBuildMessage msg,
TunnelCreatorConfig cfg,
Hash replyRouter,
long replyTunnel,
RouterContext ctx,
PublicKey peerKey,
Properties props)Place the asymmetrically encrypted record in the specified record slot,
containing the hop's configuration (as well as the reply info, if it is an outbound endpoint) |
BuildRequestRecord | BuildMessageProcessor.decrypt(TunnelBuildMessage msg,
Hash ourHash,
PrivateKey privKey)Decrypt the record targeting us, encrypting all of the other records with the included
reply key and IV. |
void | TunnelPoolManager.fail(Hash peer)Fail all outbound tunnels with this peer as first hop,
and all inbound tunnels with this peer as the last hop,
baecause we can't contact it any more. |
void | TunnelPoolManager.forceRemoveTunnels(Hash destination)Force immediate removal of a pool - used for router shutdown. |
int | TunnelPoolManager.getInboundClientTunnelCount(Hash destination)Use to verify a tunnel pool is alive. |
TunnelPool | TunnelPoolManager.getInboundPool(Hash client) |
TunnelPoolSettings | TunnelPoolManager.getInboundSettings(Hash client)Get settings for a client's inbound tunnel pool. |
int | TunnelPoolManager.getOutboundClientTunnelCount(Hash destination)Use to verify a tunnel pool is alive. |
TunnelPool | TunnelPoolManager.getOutboundPool(Hash client) |
TunnelPoolSettings | TunnelPoolManager.getOutboundSettings(Hash client)Get settings for a client's outbound tunnel pool. |
int | TunnelPoolManager.getUsableInboundClientTunnelCount(Hash destination)Get USABLE inbound client tunnel count for a specific destination. |
int | TunnelPoolManager.getUsableOutboundClientTunnelCount(Hash destination)Get USABLE outbound client tunnel count for a specific destination. |
protected static boolean | TunnelPeerSelector.hasRecoveredFromFailure(RouterContext ctx,
Hash peer)Check if a peer has recovered from failure and can be reconsidered. |
protected static boolean | TunnelPeerSelector.hasValidTransportAddress(RouterContext ctx,
Hash peer)Check if a peer's RouterInfo has at least one reachable SSU or NTCP address. |
static boolean | TunnelPeerSelector.isFirstHopFailing(RouterContext ctx,
Hash peer)Check if a peer recently failed as first hop and should be excluded. |
boolean | GhostPeerManager.isGhost(Hash peer)Check if a peer should be excluded from tunnel selection. |
protected static boolean | TunnelPeerSelector.isLowAcceptanceRatio(RouterContext ctx,
Hash peer)Check if a peer has a history of rejecting tunnel build requests. |
(package private) static boolean | TunnelPeerSelector.isStalePeer(RouterContext ctx,
Hash peer)Check if a peer is stale — no contact (heard from or heard about) within
the dynamic activity window. |
boolean | TunnelPoolManager.isValidTunnel(Hash client,
TunnelInfo tunnel)Check if a tunnel is valid and belongs to the client's pool. |
protected static void | TunnelPeerSelector.preConnectTo(RouterContext ctx,
Hash peer)Trigger an outbound connection establishment to a peer. |
protected void | ExcluderBase.recordExclusion(Hash h,
String reason)Record why a peer was excluded, for diagnostic logging. |
protected static void | TunnelPeerSelector.recordFirstHopFail(RouterContext ctx,
Hash peer)Record that a peer failed as first hop (first hop unreachable). |
protected static void | TunnelPeerSelector.recordPeerFailure(RouterContext ctx,
Hash peer)Record that a peer failed during peer selection (first-hop or adjacent). |
void | GhostPeerManager.recordSuccess(Hash peer)Record successful tunnel participation by a peer. |
void | GhostPeerManager.recordTimeout(Hash peer)Record that a peer timed out during tunnel build. |
void | TunnelPoolManager.removeTunnels(Hash destination)This will be called twice, once by the inbound and once by the outbound pool. |
TunnelInfo | TunnelPoolManager.selectInboundExploratoryTunnel(Hash closestTo)Pick the inbound exploratory tunnel with the gateway closest to the given hash. |
TunnelInfo | TunnelPoolManager.selectInboundTunnel(Hash destination)Pick a random inbound tunnel from the given destination's pool. |
TunnelInfo | TunnelPoolManager.selectInboundTunnel(Hash destination,
Hash closestTo)Pick the inbound tunnel with the gateway closest to the given hash
from the given destination's pool. |
TunnelInfo | TunnelPoolManager.selectOutboundExploratoryTunnel(Hash closestTo)Pick the outbound exploratory tunnel with the endpoint closest to the given hash. |
TunnelInfo | TunnelPoolManager.selectOutboundTunnel(Hash destination)Pick a random outbound tunnel from the given destination's pool. |
TunnelInfo | TunnelPoolManager.selectOutboundTunnel(Hash destination,
Hash closestTo)Pick the outbound tunnel with the endpoint closest to the given hash
from the given destination's pool. |
(package private) TunnelInfo | AliasedTunnelPool.selectTunnel(Hash closestTo) |
(package private) TunnelInfo | TunnelPool.selectTunnel(Hash closestTo)Return the tunnel from the pool that is XOR-closest to the target. |
void | TunnelPoolManager.setInboundSettings(Hash client,
TunnelPoolSettings settings)Set settings for a client's inbound tunnel pool. |
void | TunnelPoolManager.setOutboundSettings(Hash client,
TunnelPoolSettings settings)Set settings for a client's outbound tunnel pool. |
(package private) ParticipatingThrottler.Result | ParticipatingThrottler.shouldThrottle(Hash h)Determines whether to throttle tunnel participation for the given router. |
(package private) boolean | RequestThrottler.shouldThrottle(Hash h)Checks if the given router's tunnel requests should be throttled. |
protected static boolean | TunnelPeerSelector.supportsNTCP2(RouterContext ctx,
Hash peer)Check if a peer supports NTCP2 transport. |
(package private) void | AliasedTunnelPool.tunnelFailed(TunnelInfo cfg,
Hash blamePeer) |
(package private) void | TunnelPool.tunnelFailed(TunnelInfo cfg,
Hash blamePeer)Remove the tunnel and blame only one peer. |
| Modifier and Type | Method and Description |
|---|---|
boolean | ExcluderBase.addAll(Collection<? extends Hash> c)addAll. |
protected boolean | TunnelPeerSelector.checkTunnel(boolean isInbound,
boolean isExploratory,
List<Hash> tunnel)Connectivity check. |
protected Set<Hash> | TunnelPeerSelector.getClosestHopExclude(boolean isInbound,
Set<Hash> toAdd)Pick peers that we want to avoid for the first OB hop or last IB hop. |
protected boolean | TunnelPeerSelector.isDuplicateSequence(TunnelPoolSettings settings,
List<Hash> newPeers)Check if the selected peer sequence matches an existing tunnel in the pool. |
protected void | TunnelPeerSelector.orderPeers(List<Hash> rv,
SessionKey key)Order peers using the given key. |
protected List<Hash> | TunnelPeerSelector.regeneratePeers(TunnelPoolSettings settings,
List<Hash> peers)Regenerate tunnel peers to avoid duplicate sequence. |
| Constructor and Description |
|---|
PooledTunnelCreatorConfig(RouterContext ctx,
int length,
boolean isInbound,
Hash destination,
TunnelPool pool)Creates a new instance of PooledTunnelCreatorConfig |
| Constructor and Description |
|---|
Excluder(boolean isInbound,
boolean isExploratory,
Set<Hash> toAdd)Does not add selectPeersInTooManyTunnels(). |
ExcluderBase(Set<Hash> set)Automatically check if peer is connected
and add the Hash to the set if not. |
| Modifier and Type | Method and Description |
|---|---|
static int | HashDistance.compare(Hash a,
Hash b,
Hash c,
Hash d)Compare two XOR distances without allocating BigInteger. |
static BigInteger | HashDistance.getDistance(Hash targetKey,
Hash routerInQuestion)Compute XOR distance between two hashes. |
| Constructor and Description |
|---|
MaskedIPSet(RouterContext ctx,
Hash peer,
int mask)The Set of IPs for this peer, with a given mask. |
MaskedIPSet(RouterContext ctx,
Hash peer,
RouterInfo pinfo,
int mask)The Set of IPs for this peer, with a given mask. |
| Modifier and Type | Method and Description |
|---|---|
static int | HashComparator.comp(Hash l,
Hash r)comp. |
int | HashComparator.compare(Hash l,
Hash r)compare. |
String | NetDbRenderer.getPeerProfileTier(Hash peer,
boolean fullname)Gets the peer profile tier name. |
boolean | ConfigPeerHelper.isBanned(Hash h)Determine whether the given peer hash is banned. |
void | NetDbRenderer.renderLeaseSetHTML(Writer out,
boolean debug,
Hash client)Renders all leasesets. |
| Modifier and Type | Method and Description |
|---|---|
static void | SybilRenderer.renderSybilHTML(Writer out,
RouterContext ctx,
List<Hash> sybils,
String victim)Called from NetDbRenderer |
| Modifier and Type | Method and Description |
|---|---|
static Hash | ConvertToHash.getHash(String peer)Convert any kind of destination String to a hash |
| Modifier and Type | Method and Description |
|---|---|
Set<Hash> | UDPTrackerClient.TrackerResponse.getPeers() |
| Constructor and Description |
|---|
TrackerInfo(Set<Hash> hashes,
int interval,
int complete,
int incomplete,
String error,
byte[] my_id,
byte[] infohash,
MetaInfo metainfo,
I2PSnarkUtil util)To convert returned UDPTracker data to the standard structure |
TrackerResponse(int interval,
int seeds,
int leeches,
Set<Hash> peers)success |
| Modifier and Type | Class and Description |
|---|---|
(package private) class | PeerRepresents a single peer participating in a specific torrent within the DHT tracker. |
| Modifier and Type | Method and Description |
|---|---|
Hash | NodeInfo.calculateHash()calculateHash. |
Hash | NodeInfo.getHash() |
| Modifier and Type | Method and Description |
|---|---|
(package private) List<Hash> | DHTTracker.getPeers(InfoHash ih,
int max,
boolean noSeeds)Get peers for a torrent. |
Collection<Hash> | DHT.getPeersAndAnnounce(byte[] ih,
int max,
long maxWait,
int annMax,
long annMaxWait,
boolean isSeed,
boolean noSeeds)Get peers for a torrent, and announce to the closest annMax nodes we find. |
Collection<Hash> | KRPC.getPeersAndAnnounce(byte[] ih,
int max,
long maxWait,
int annMax,
long annMaxWait,
boolean isSeed,
boolean noSeeds)Get peers for a torrent, and announce to the closest annMax nodes we find. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | DHTTracker.announce(InfoHash ih,
Hash hash,
boolean isSeed)Announce a peer for a torrent. |
static NID | NodeInfo.generateNID(Hash h,
int p,
RandomSource random)Generate a secure NID that matches the Hash and port. |
(package private) void | DHTTracker.unannounce(InfoHash ih,
Hash hash)Remove a peer from a torrent's peer list. |
| Constructor and Description |
|---|
NodeInfo(NID nID,
Hash hash,
int port)No Destination yet available. |