Packages that use LeaseSet
Package
Description
Address book application for fetching and maintaining I2P host databases from subscription sources.
Internal implementation of the I2P client SDK - the client side of the Invisible Internet Client Protocol (I2CP), separating implementation from the interfaces in
net.i2p.client. Common data structures used by the I2P protocols: Destination, LeaseSet, PublicKey, Signature, Certificate and their friends.
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).
The I2P router application handles I2P network communication.
Router-side implementation of the Invisible Internet Client Protocol (I2CP): client sessions over plain or TLS sockets, message delivery, and lease and tunnel management on behalf of clients.
Simplified fake implementations of router interfaces (comm system and friends) for testing and embedded builds.
Garlic message creation, parsing and handling, and the outbound message jobs: one-shot sends, source routing and delivery status handling.
The Kademlia distributed hash table (DHT) network database: lookup, store and explore jobs, the data store, the floodfill variants, and lookup throttling.
Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
Helpers and handlers for the router console user interface, packaged in routerconsole.war and accessible only from JSP files.
Uses of LeaseSet in net.i2p.addressbook
Methods in net.i2p.addressbook with parameters of type LeaseSetModifier and TypeMethodDescriptionprivate static StringHostChecker.formatLeaseSetTypes(LeaseSet leaseSet) Format LeaseSet encryption types as a string like "[0]" or "[4,0]".Uses of LeaseSet in net.i2p.client.impl
Fields in net.i2p.client.impl declared as LeaseSetModifier and TypeFieldDescriptionprotected LeaseSetI2PSessionImpl._leaseSetCurrently granted lease set, or null.Methods in net.i2p.client.impl that return LeaseSetModifier and TypeMethodDescriptionI2PSessionImpl.getLeaseSet()Current lease set published by this session.Methods in net.i2p.client.impl with parameters of type LeaseSetModifier and TypeMethodDescriptionvoidI2CPMessageProducer.createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, List<PrivateKey> privs) In response to a RequestLeaseSet Message from the router, send a CreateLeaseset Message back to the router.(package private) static booleanRequestLeaseSetMessageHandler.isSignable(LeaseSet leaseSet) Whether a LeaseSet can be signed.(package private) voidI2PSessionImpl.setLeaseSet(LeaseSet ls) Lease set published by this session.protected booleanRequestLeaseSetMessageHandler.signLeaseSet(LeaseSet leaseSet, boolean isLS2, I2PSessionImpl session) Finish creating and signing the new LeaseSet and submitting it to the router.protected booleanRequestLeaseSetMessageHandler.signLeaseSet(LeaseSet leaseSet, boolean isLS2, I2PSessionImpl session, I2CPMessage message, int attempt) Finish creating and signing the new LeaseSet and submitting it to the router, with the originating request attached so a transient signing failure can schedule a prompt re-run instead of leaving the router to wait out its 60-second check timeout.Uses of LeaseSet in net.i2p.data
Subclasses of LeaseSet in net.i2p.dataModifier and TypeClassDescriptionclassImplementation of EncryptedLeaseSet as specified in Proposal 123: New NetDb Entries.classImplementation of LeaseSet2 as specified in Proposal 123: New NetDb Entries.classImplementation of MetaLeaseSet as specified in Proposal 123: New NetDb Entries.Uses of LeaseSet in net.i2p.data.i2cp
Fields in net.i2p.data.i2cp declared as LeaseSetMethods in net.i2p.data.i2cp that return LeaseSetMethods in net.i2p.data.i2cp with parameters of type LeaseSetModifier and TypeMethodDescriptionvoidCreateLeaseSetMessage.setLeaseSet(LeaseSet leaseSet) Lease set being created.Uses of LeaseSet in net.i2p.router
Methods in net.i2p.router that return LeaseSetModifier and TypeMethodDescriptionabstract LeaseSetNetworkDatabaseFacade.lookupLeaseSetLocally(Hash key) Look up a LeaseSet in the local network database.abstract LeaseSetStore a LeaseSet in the network database.Methods in net.i2p.router that return types with arguments of type LeaseSetModifier and TypeMethodDescriptionNetworkDatabaseFacade.getClientLeases()The known client LeaseSets.NetworkDatabaseFacade.getFloodfillLeases()The known floodfill LeaseSets.NetworkDatabaseFacade.getLeases()All known LeaseSets for display.NetworkDatabaseFacade.getPublishedLeases()The known published LeaseSets.NetworkDatabaseFacade.getUnpublishedLeases()The known unpublished LeaseSets.Methods in net.i2p.router with parameters of type LeaseSetModifier and TypeMethodDescriptionabstract voidPublish a LeaseSet to the network database.abstract voidClientManagerFacade.requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob) Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.abstract voidClientManagerFacade.requestLeaseSet(Hash dest, LeaseSet set) Request that the client authorize the Leases contained in the LeaseSet, identified by destination hash.abstract LeaseSetStore a LeaseSet in the network database.abstract voidUnpublish a LeaseSet from the network database.Uses of LeaseSet in net.i2p.router.client
Fields in net.i2p.router.client declared as LeaseSetModifier and TypeFieldDescriptionprivate final LeaseSetClientConnectionRunner.Rerequest._lsThe lease set being published.private final LeaseSetLeaseRequestState._requestedLeaseSetThe lease set being requested.(package private) LeaseSetClientConnectionRunner.SessionParams.currentEncryptedLeaseSetEncrypted lease set, present only if the client uses encrypted lease sets.(package private) LeaseSetClientConnectionRunner.SessionParams.currentLeaseSetCurrent lease set, possibly decrypted.Methods in net.i2p.router.client that return LeaseSetModifier and TypeMethodDescriptionClientConnectionRunner.getLeaseSet(Hash h) Currently allocated leaseSet.LeaseRequestState.getRequested()The lease set this request is for.Methods in net.i2p.router.client with parameters of type LeaseSetModifier and TypeMethodDescription(package private) voidClientConnectionRunner.leaseSetCreated(LeaseSet ls) Called after a new leaseSet is granted by the client and the NetworkDb has been updated.(package private) voidClientConnectionRunner.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.voidClientManager.requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob) Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.voidClientManager.requestLeaseSet(Hash dest, LeaseSet ls) Request that a particular client authorize the Leases contained in the LeaseSet.voidClientManagerFacadeImpl.requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob) Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.voidClientManagerFacadeImpl.requestLeaseSet(Hash dest, LeaseSet set) Request that a particular client authorize the Leases contained in the LeaseSet.Constructors in net.i2p.router.client with parameters of type LeaseSetUses of LeaseSet in net.i2p.router.dummy
Methods in net.i2p.router.dummy that return LeaseSetModifier and TypeMethodDescriptionDummyNetworkDatabaseFacade.lookupLeaseSetLocally(Hash key) Store a key locally.Methods in net.i2p.router.dummy with parameters of type LeaseSetModifier and TypeMethodDescriptionvoidPublish a key to the network.voidDummyClientManagerFacade.requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob) voidDummyClientManagerFacade.requestLeaseSet(Hash dest, LeaseSet set) Store a key locally.voidRemove a key from publication.Uses of LeaseSet in net.i2p.router.message
Fields in net.i2p.router.message declared as LeaseSetModifier and TypeFieldDescriptionprivate final LeaseSetOutboundClientMessageOneShotJob.SendSuccessJob._deliveredLSLease set the message was delivered to.private LeaseSetOutboundClientMessageOneShotJob._leaseSetThe target's lease set, if known.Fields in net.i2p.router.message with type parameters of type LeaseSetModifier and TypeFieldDescription(package private) final ConcurrentHashMap<OutboundCache.HashPair, LeaseSet> OutboundCache.leaseSetCacheLeaseSet cache keyed by source-destination pairs.final ConcurrentHashMap<Hash, LeaseSet> OutboundCache.multihomedCacheCache for LeaseSets associated with multihomed routers or hosted destinations.Methods in net.i2p.router.message that return LeaseSetModifier and TypeMethodDescriptionprivate LeaseSetOutboundClientMessageOneShotJob.getReplyLeaseSet(boolean force) Reply lease set, checking the cache first.Methods in net.i2p.router.message with parameters of type LeaseSetModifier and TypeMethodDescriptionprivate static PayloadGarlicConfigOutboundClientMessageJobHelper.buildLeaseSetClove(RouterContext ctx, long expiration, LeaseSet replyLeaseSet) Build a clove that stores the leaseSet locally.private static GarlicConfigOutboundClientMessageJobHelper.createGarlicConfig(RouterContext ctx, long replyToken, long expiration, PublicKey recipientPK, PayloadGarlicConfig dataClove, Hash from, Destination dest, TunnelInfo replyTunnel, boolean requireAck, LeaseSet bundledReplyLeaseSet, SessionKeyManager skm) Make the top-level config, with a data clove, an optional ack clove, and an optional leaseset clove.(package private) static GarlicMessageOutboundClientMessageJobHelper.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) Build a garlic message that will be delivered to the router on which the target is located.Method parameters in net.i2p.router.message with type arguments of type LeaseSetModifier and TypeMethodDescriptionprivate static voidOutboundCache.cleanLeaseSetCache(RouterContext ctx, Map<OutboundCache.HashPair, LeaseSet> tc) Removes expired LeaseSets from the provided cache.private static voidOutboundCache.cleanMultihomedCache(RouterContext ctx, Map<Hash, LeaseSet> mc) Removes expired LeaseSets from the multihomed cache.Constructors in net.i2p.router.message with parameters of type LeaseSetModifierConstructorDescriptionHandles an ECIES reply with no ratchet keys.SendSuccessJob(SessionKey key, TagSetHandle tags, LeaseSet ls, OutboundClientMessageOneShotJob.SendTimeoutJob timeout) Create a new success job that will be fired when the message encrypted with the given session key and bearing the specified tags are confirmed delivered.Uses of LeaseSet in net.i2p.router.networkdb.kademlia
Classes in net.i2p.router.networkdb.kademlia that implement interfaces with type arguments of type LeaseSetModifier and TypeClassDescriptionprivate static classOldest first.Fields in net.i2p.router.networkdb.kademlia declared as LeaseSetModifier and TypeFieldDescriptionprivate final LeaseSetRepublishLeaseSetJob.OnRepublishFailure._lsLeaseSet that failed to publish.Fields in net.i2p.router.networkdb.kademlia with type parameters of type LeaseSetMethods in net.i2p.router.networkdb.kademlia that return LeaseSetModifier and TypeMethodDescriptionSearchState.getBestInitialLeaseSet()LeaseSet with the newest lease date among the initial responses.private LeaseSetRepublishLeaseSetJob.getFreshPoolLeaseSet()The inbound pool's current tunnels as a re-mintable LeaseSet, or null if the client has no inbound pool or no usable leases.private LeaseSetKademliaNetworkDatabaseFacade.getLocalLeaseSet(Hash key) Read a current LeaseSet from this facade's store only.SearchState.getNewestLeaseSet()LeaseSet with the newest lease date among the responses.KademliaNetworkDatabaseFacade.lookupLeaseSetLocally(Hash key) LeaseSet stored locally.Store the LeaseSet without persisting it to disk.Store the leaseSet.Methods in net.i2p.router.networkdb.kademlia that return types with arguments of type LeaseSetModifier and TypeMethodDescriptionKademliaNetworkDatabaseFacade.getClientLeases()LeaseSets published by this router's clients.KademliaNetworkDatabaseFacade.getFloodfillLeases()LeaseSets stored in the floodfill database.KademliaNetworkDatabaseFacade.getLeases()KademliaNetworkDatabaseFacade.getPublishedLeases()LeaseSets published to the network.KademliaNetworkDatabaseFacade.getUnpublishedLeases()LeaseSets not published to the network.Methods in net.i2p.router.networkdb.kademlia with parameters of type LeaseSetModifier and TypeMethodDescriptionvoidSearchState.addInitialLeaseSetResponse(Hash peer, LeaseSet ls) Record the peer's LeaseSet response from the initial phase.voidSearchState.addLeaseSetResponse(Hash peer, LeaseSet ls) Record the peer's LeaseSet response.private StringKademliaNetworkDatabaseFacade.checkExpiredLeaseSet(Hash key, LeaseSet leaseSet, long earliest, long latest, long now, String idShort) Reject a LeaseSet whose timestamps are outdated (stale).private voidKademliaNetworkDatabaseFacade.checkForHashCollision(LeaseSet rv, LeaseSet leaseSet, boolean force) Reject a store whose LeaseSet hash collides with an existing LeaseSet for a different destination.private StringKademliaNetworkDatabaseFacade.checkFutureExpiration(LeaseSet leaseSet, int type, long latest, long now, String idShort) Reject a LeaseSet that expires too far into the future, to handle clock skew issues.private voidKademliaNetworkDatabaseFacade.checkLeaseSetSigType(Hash h, LeaseSet ls) Reject LeaseSets with unsupported signature types; negative-cache the destination permanently.intCompare lease sets by latest lease date, oldest first.private voidKademliaNetworkDatabaseFacade.copyStoreMetadata(LeaseSet rv, LeaseSet leaseSet) Copy the received-by / received-as-reply / received-as-published metadata flags from the incoming LeaseSet onto the stored copy, without re-storing the entry.private intRepublishLeaseSetJob.countFreshLeases(LeaseSet ls, long now) Counts the leases that are still fresh.private voidKademliaNetworkDatabaseFacade.handleBlindStore(EncryptedLeaseSet encls, LeaseSet leaseSet) After storing, handle the blind data bookkeeping: an encrypted LeaseSet we have now decrypted is stored under its own key, and a blinded-when-published LeaseSet marks its destination as blinded.private voidRepublishLeaseSetJob.handleExpiredLeaseSet(LeaseSet ls, String name) Handle expired lease set: request a fresh one and check back soon.private voidRepublishLeaseSetJob.handleValidLeaseSet(LeaseSet ls, String name, long now, long timeUntilExpiry) Handle valid lease set: publish it.static booleanUtility to determine if a is newer than b.private voidKademliaNetworkDatabaseFacade.mirrorToMainFacade(LeaseSet localLeaseSet) A locally-published LeaseSet legitimately occupies both the client facade (where the client pushed it) and the floodfill facade (where the router console and the network look it up).private LeaseStoreJob.pickReplyTunnel(LeaseSet ls, int attempts, Hash to) Pick a reply tunnel from a LeaseSet for the store response.private booleanRepublishLeaseSetJob.poolHasAnyViableLease(LeaseSet fresh, long now) Whether the pool can sign anything at all right now.voidPublishes a local LeaseSet to the network: stores it in this facade and, for a client facade, also in the floodfill facade, then schedules republishing.private voidRepublishLeaseSetJob.refloatLeaseSet(LeaseSet storedLeaseSet, String name, long now, long timeUntilExpiry) Re-publish the lease set before it expires from the network DB.private booleanSearchJob.resend(RouterInfo toPeer, LeaseSet ls) Resend the leaseSet to the peer who had previously failed to provide us with the data when we asked them.private voidKademliaNetworkDatabaseFacade.resolveBlindData(EncryptedLeaseSet encls, LeaseSet leaseSet) Resolve blind data for an encrypted LeaseSet so validate() can verify the signature, setting the secret before the destination.(package private) static booleanRepublishLeaseSetJob.sameLeaseTunnels(LeaseSet stored, LeaseSet fresh) Whether two lease sets advertise exactly the same tunnels.(package private) static booleanKademliaNetworkDatabaseFacade.shouldAcceptLeaseSet(LeaseSet stored, LeaseSet incoming, long now) Determine whether an incoming LeaseSet may replace the currently stored copy.booleanSearchState.shouldUpdateStored(LeaseSet ls) Whether the given LeaseSet is newer than the stored one.Store the LeaseSet without persisting it to disk.Store the leaseSet.private voidKademliaNetworkDatabaseFacade.storeLocalLeaseSetCopy(LeaseSet localLeaseSet) Store the local copy, forcing overwrite; propagate IAE to the caller.voidValidates whether the given LeaseSet is acceptable as valid and current based on current known parameters.private StringKademliaNetworkDatabaseFacade.validateKeyMatch(Hash key, LeaseSet leaseSet) Check that the key matches the LeaseSet hash.private voidKademliaNetworkDatabaseFacade.validateLeaseSetExpiry(LeaseSet leaseSet) Reject a LeaseSet whose leases are already in the past, allowingKademliaNetworkDatabaseFacade.EXPIRY_GRACE_PERIODof slack for clock skew.private StringKademliaNetworkDatabaseFacade.validateSignature(Hash key, LeaseSet leaseSet, String leaseBase32) Verify the LeaseSet's cryptographic signature validity.private voidRepublishLeaseSetJob.OnRepublishFailure.verifyAndRetry(LeaseSet ls) Verify and retry: ask the floodfill whether the lease set is published, and re-queue the republish if it is not confirmed.Constructors in net.i2p.router.networkdb.kademlia with parameters of type LeaseSetUses of LeaseSet in net.i2p.router.tunnel.pool
Fields in net.i2p.router.tunnel.pool declared as LeaseSetModifier and TypeFieldDescriptionprivate LeaseSetTunnelPool._cachedLeaseSetMinimum interval between LeaseSet builds (matches getRefreshThrottle(_context)).Methods in net.i2p.router.tunnel.pool that return LeaseSetModifier and TypeMethodDescriptionprivate LeaseSetTunnelPool.buildNewLeaseSetFromTunnels(List<TunnelInfo> tunnels, boolean isServerPool, boolean rotateForPropagation, List<TunnelInfo> rotatedOut) Build a LeaseSet from a list of tunnels.private LeaseSetTunnelPool.finalizeLeaseSet(TreeSet<Lease> leases, int wanted, long now) Builds the lease set from the chosen leases.TunnelPool.getInboundTunnelsAsLeaseSet()Build and return current LeaseSet from our tunnels.protected LeaseSetAliasedTunnelPool.locked_buildNewLeaseSet()protected LeaseSetTunnelPool.locked_buildNewLeaseSet()Build a leaseSet with the required tunnels that aren't about to expire.private LeaseSetTunnelPool.rebuildLeaseSetForServerPool()Build a fresh LeaseSet from the surviving tunnels after a removal.Methods in net.i2p.router.tunnel.pool with parameters of type LeaseSetModifier and TypeMethodDescriptionTunnelPool.collectPublishedGateways(LeaseSet publishedLS) Gateway hashes already used by the published lease set.private booleanTunnelPool.isCachedLeaseSetValid(LeaseSet cached, long now) Whether the cached LeaseSet can be reused.private voidTunnelPool.pruneNonPublishedTunnels(LeaseSet publishedLS) After publishing a LeaseSet, prune GOOD tunnels that weren't included in the published LeaseSet.private voidTunnelPool.publishLeaseSetIfNeeded(TunnelInfo info, LeaseSet ls, long now) Publish a freshly-built LeaseSet, bypassing the refresh throttle when the pool is nearly empty AND the published LeaseSet is missing or expiring soon.private voidTunnelPool.republishAfterSynchronousRemoval(LeaseSet ls, int remaining) Republish the rebuilt LeaseSet, or fall back to a fresh build when no LeaseSet could be built.private voidTunnelPool.requestLeaseSet(LeaseSet ls) Request lease set from client for the primary and all aliases.private voidTunnelPool.requestLeaseSet(LeaseSet ls, boolean force) Request LeaseSet with optional force bypass of throttle.Uses of LeaseSet in net.i2p.router.web.helpers
Classes in net.i2p.router.web.helpers that implement interfaces with type arguments of type LeaseSetModifier and TypeClassDescription(package private) static classComparator for LeaseSets, used in the leaseset listing.(package private) static classComparator for LeaseSets sorted by hash distance from local router.Methods in net.i2p.router.web.helpers with parameters of type LeaseSetModifier and TypeMethodDescriptionintintprivate voidNetDbRenderer.renderLeaseSet(StringBuilder buf, LeaseSet ls, boolean debug, long now, boolean linkSusi, String distance) Renders a single LeaseSet as HTML.