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

public class ConfigReseedHelperextends HelperBase
Helper for reseed configuration page rendering and form processing.
  • Constructor Details

    • ConfigReseedHelper

      public ConfigReseedHelper()
      Create a new helper for reseed configuration.
  • Method Details

    • getPort

      public String getPort()
      Retrieve the configured proxy port for reseeding.
      Returns:
      the proxy port, or empty string if not set
    • getHost

      public String getHost()
      Retrieve the configured proxy host for reseeding.
      Returns:
      the proxy host, or empty string if not set
    • getUsername

      public String getUsername()
      Retrieve the configured proxy username for reseeding.
      Returns:
      the proxy username
    • getNofilter_password

      public String getNofilter_password()
      Retrieve the configured proxy password for reseeding.
      Returns:
      the proxy password
    • getSport

      public String getSport()
      Retrieve the configured SSL proxy port for reseeding.
      Returns:
      the SSL proxy port
    • getShost

      public String getShost()
      Retrieve the configured SSL proxy host for reseeding.
      Returns:
      the SSL proxy host
    • getSusername

      public String getSusername()
      Retrieve the configured SSL proxy username for reseeding.
      Returns:
      the SSL proxy username
    • getNofilter_spassword

      public String getNofilter_spassword()
      Retrieve the configured SSL proxy password for reseeding.
      Returns:
      the SSL proxy password
    • modeChecked

      public String modeChecked(int mode)
      Check whether the given SSL mode matches the current configuration.
      Parameters:
      mode - the mode to check (0=optional, 1=required, 2=disabled)
      Returns:
      the CHECKED constant if mode matches, empty string otherwise
    • pmodeChecked

      public String pmodeChecked(int mode)
      Check whether the given proxy mode matches the current proxy configuration.
      Parameters:
      mode - the proxy mode to check (0=disabled, 1=HTTP, 2=SOCKS4, 3=SOCKS5, 4=INTERNAL)
      Returns:
      the CHECKED constant if mode matches, empty string otherwise
    • getEnable

      public String getEnable()
      Retrieve whether proxy reseeding is enabled.
      Returns:
      the CHECKED constant if enabled, empty string otherwise
    • getAuth

      public String getAuth()
      Retrieve whether proxy authentication is enabled.
      Returns:
      the CHECKED constant if auth enabled, empty string otherwise
    • getSauth

      public String getSauth()
      Retrieve whether SSL proxy authentication is enabled.
      Returns:
      the CHECKED constant if auth enabled, empty string otherwise
    • reseedList

      private List<String> reseedList()
      The reseed URLs the reseed job is currently working through.
      Returns:
      the URLs, an empty list if the job is not running
    • getReseedURL

      public String getReseedURL()
      Retrieve the configured reseed URLs as a newline-separated string.
      Returns:
      the reseed URLs, one per line
    • shouldShowSelect

      public boolean shouldShowSelect()
      Determine if both HTTP and HTTPS reseed URLs are available.
      Returns:
      true only if we have both http and https URLs
    • shouldShowHTTPProxy

      public boolean shouldShowHTTPProxy()
      Determine if any HTTP reseed URLs are configured.
      Returns:
      true only if we have a http URL
    • shouldShowHTTPSProxy

      public boolean shouldShowHTTPSProxy()
      Determine if any HTTPS reseed URLs are configured.
      Returns:
      true only if we have a https URL