Class Banlist


  • public class Banlist
    extends Object
    Routers are banlisted only if none of our transports can talk to them or their signed router info is completely screwy. Individual transports manage their own unreachable lists and do not generally add to the overall banlist.
    • Field Detail

      • HASH_ZERORI

        public static final Hash HASH_ZERORI
        hash of 387 zeros
        Since:
        0.9.66
      • BANLIST_DURATION_MS

        public static final long BANLIST_DURATION_MS
        Don't make this too long as the failure may be transient due to connection limits.
        See Also:
        Constant Field Values
      • BANLIST_DURATION_PARTIAL

        public static final long BANLIST_DURATION_PARTIAL
        See Also:
        Constant Field Values
      • BANLIST_DURATION_FOREVER

        public static final long BANLIST_DURATION_FOREVER
        See Also:
        Constant Field Values
      • BANLIST_DURATION_NO_NETWORK

        public static final long BANLIST_DURATION_NO_NETWORK
        Buggy i2pd fork
        Since:
        0.9.52
        See Also:
        Constant Field Values
      • BANLIST_DURATION_LOCALHOST

        public static final long BANLIST_DURATION_LOCALHOST
        See Also:
        Constant Field Values
    • Method Detail

      • getRouterCount

        public int getRouterCount()
      • getEntries

        public Map<Hash,​Banlist.Entry> getEntries()
        For BanlistRenderer in router console. Note - may contain expired entries.
      • banlistRouter

        public boolean banlistRouter​(Hash peer)
        Returns:
        true if it WAS previously on the list
      • banlistRouter

        public boolean banlistRouter​(Hash peer,
                                     String reason)
        Returns:
        true if it WAS previously on the list
      • banlistRouter

        public boolean banlistRouter​(String reasonCode,
                                     Hash peer,
                                     String reason)
        Returns:
        true if it WAS previously on the list
      • banlistRouter

        public boolean banlistRouter​(Hash peer,
                                     String reason,
                                     String transport)
        Returns:
        true if it WAS previously on the list
      • banlistRouterForever

        public boolean banlistRouterForever​(Hash peer,
                                            String reason)
        Returns:
        true if it WAS previously on the list
      • banlistRouterForever

        public boolean banlistRouterForever​(Hash peer,
                                            String reason,
                                            String reasonCode)
        Returns:
        true if it WAS previously on the list
      • banlistRouter

        public boolean banlistRouter​(Hash peer,
                                     String reason,
                                     String transport,
                                     boolean forever)
        Returns:
        true if it WAS previously on the list
      • banlistRouter

        public boolean banlistRouter​(Hash peer,
                                     String reason,
                                     String reasonCode,
                                     String transport,
                                     long expireOn)
        So that we may specify an expiration
        Parameters:
        reason - may be null
        reasonCode - may be null
        expireOn - absolute time, not a duration
        transport - may be null
        Returns:
        true if it WAS previously on the list
        Since:
        0.9.18
      • unbanlistRouter

        public void unbanlistRouter​(Hash peer)
      • unbanlistRouter

        public void unbanlistRouter​(Hash peer,
                                    String transport)
      • isBanlisted

        public boolean isBanlisted​(Hash peer)
      • isBanlisted

        public boolean isBanlisted​(Hash peer,
                                   String transport)
      • isBanlistedForever

        public boolean isBanlistedForever​(Hash peer)