java.lang.Object
net.i2p.router.web.HelperBase
net.i2p.router.web.helpers.ConfigPeerHelper

public class ConfigPeerHelperextends HelperBase
Helper for peer configuration page rendering and form processing.
  • Field Details

    • MAX_DISPLAY

      private static final int MAX_DISPLAY
      Most peers listed on the page, however many are configured.
      See Also:
  • Constructor Details

    • ConfigPeerHelper

      public ConfigPeerHelper()
      Constructs a new ConfigPeerHelper.
  • Method Details

    • getBlocklistSummary

      public String getBlocklistSummary()
      Get the blocklist summary HTML.
      Returns:
      the blocklist summary HTML
    • isBanned

      public boolean isBanned(Hash h)
      Determine whether the given peer hash is banned.
      Parameters:
      h - the peer hash to check
      Returns:
      true if banned, false otherwise
    • toIPBytes

      private static byte[] toIPBytes(BigInteger bi)
      Convert a (non-negative) two's complement IP to exactly 16 bytes.
      Parameters:
      bi - the IP address as a non-negative integer
      Returns:
      the address as exactly 16 big-endian bytes, zero-padded