net.i2p.router.web.helpers

## Class ConfigNetHelper

- java.lang.Object
- - net.i2p.router.web.HelperBase
  - - net.i2p.router.web.helpers.ConfigNetHelper

-     public class ConfigNetHelper
      extends HelperBase

  Helper for network configuration page rendering and form processing. Used for both /config and /confignet pages.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_SHARE_KBPS`
    `(package private) static String` | `PROP_I2NP_NTCP_AUTO_IP`
    `(package private) static String` | `PROP_I2NP_NTCP_AUTO_PORT`
    `(package private) static String` | `PROP_I2NP_NTCP_HOSTNAME` copied from various private components
    `(package private) static String` | `PROP_I2NP_NTCP_PORT`

    - ### Fields inherited from class net.i2p.router.web.HelperBase

      `_context, _out, CHECKED, PROP_ADVANCED, SELECTED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigNetHelper()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<String>` | `getAddresses()`
    `String` | `getAddressSelector()`
    `String` | `getConfiguredUdpPort()` This should always be the actual internal SSU port, as UDPTransport udpates the config when it changes.
    `String` | `getDynamicKeysChecked()`
    `String` | `getInboundBurstRate()`
    `String` | `getInboundBurstRateBits()`
    `String` | `getInboundRate()`
    `String` | `getIPv4FirewalledChecked()`
    `String` | `getIPv6Checked(String mode)` Combined SSU/NTCP Use SSU setting, then NTCP setting, then default
    `String` | `getIPv6FirewalledChecked()`
    `String` | `getLaptopChecked()`
    `String` | `getNtcphostname()`
    `String` | `getNtcpport()`
    `String` | `getOutboundBurstRate()`
    `String` | `getOutboundBurstRateBits()`
    `String` | `getOutboundRate()`
    `int` | `getShareBandwidth()`
    `String` | `getSharePercentageBox()`
    `String` | `getShareRateBits()`
    `String` | `getShareRateMegabits()`
    `String` | `getTcpAutoIPChecked(int mode)`
    `String` | `getTcpAutoPortChecked(int mode)`
    `String` | `getUdpAutoIPChecked(int mode)`
    `String` | `getUdpDisabledChecked()` default false, inverse of default true property
    `String` | `getUdpEnabledChecked()` default true
    `String` | `getUdphostname()`
    `String` | `getUdpIP()`
    `String` | `getUdpPort()` To reduce confusion caused by NATs, this is the current internal SSU port, not the external port.
    `String` | `getUpnpChecked()` default true

    - ### Methods inherited from class net.i2p.router.web.HelperBase

      `_t, _t, _t, _x, getChecked, getCheckedDefaultTrue, isAdvanced, ngettext, setContextId, storeWriter`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_SHARE_KBPS

          public static final int DEFAULT_SHARE_KBPS

      See Also:
        Constant Field Values

    - #### PROP_I2NP_NTCP_AUTO_IP

          static final String PROP_I2NP_NTCP_AUTO_IP

      See Also:
        Constant Field Values

    - #### PROP_I2NP_NTCP_AUTO_PORT

          static final String PROP_I2NP_NTCP_AUTO_PORT

      See Also:
        Constant Field Values

    - #### PROP_I2NP_NTCP_HOSTNAME

          static final String PROP_I2NP_NTCP_HOSTNAME

      copied from various private components
      See Also:
        Constant Field Values

    - #### PROP_I2NP_NTCP_PORT

          static final String PROP_I2NP_NTCP_PORT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ConfigNetHelper

          public ConfigNetHelper()

  - ### Method Detail

    - #### getAddresses

          public Set<String> getAddresses()

    - #### getAddressSelector

          public String getAddressSelector()

    - #### getConfiguredUdpPort

          public String getConfiguredUdpPort()

      This should always be the actual internal SSU port, as UDPTransport udpates the config when it changes.

    - #### getDynamicKeysChecked

          public String getDynamicKeysChecked()

    - #### getInboundBurstRate

          public String getInboundBurstRate()

      Returns:
        decimal

    - #### getInboundBurstRateBits

          public String getInboundBurstRateBits()

      Returns:
        decimal

    - #### getInboundRate

          public String getInboundRate()

      Returns:
        decimal

    - #### getIPv4FirewalledChecked

          public String getIPv4FirewalledChecked()

    - #### getIPv6Checked

          public String getIPv6Checked(String mode)

      Combined SSU/NTCP Use SSU setting, then NTCP setting, then default

    - #### getIPv6FirewalledChecked

          public String getIPv6FirewalledChecked()

    - #### getLaptopChecked

          public String getLaptopChecked()

    - #### getNtcphostname

          public String getNtcphostname()

    - #### getNtcpport

          public String getNtcpport()

    - #### getOutboundBurstRate

          public String getOutboundBurstRate()

      Returns:
        decimal

    - #### getOutboundBurstRateBits

          public String getOutboundBurstRateBits()

      Returns:
        decimal

    - #### getOutboundRate

          public String getOutboundRate()

      Returns:
        decimal

    - #### getShareBandwidth

          public int getShareBandwidth()

      Returns:
        in binary KBytes per second

    - #### getSharePercentageBox

          public String getSharePercentageBox()

    - #### getShareRateBits

          public String getShareRateBits()

      Returns:
        decimal

    - #### getShareRateMegabits

          public String getShareRateMegabits()

      Returns:
        decimal

    - #### getTcpAutoIPChecked

          public String getTcpAutoIPChecked(int mode)

    - #### getTcpAutoPortChecked

          public String getTcpAutoPortChecked(int mode)

    - #### getUdpAutoIPChecked

          public String getUdpAutoIPChecked(int mode)

    - #### getUdpDisabledChecked

          public String getUdpDisabledChecked()

      default false, inverse of default true property

    - #### getUdpEnabledChecked

          public String getUdpEnabledChecked()

      default true

    - #### getUdphostname

          public String getUdphostname()

    - #### getUdpIP

          public String getUdpIP()

      Returns:
        host or "unknown"

    - #### getUdpPort

          public String getUdpPort()

      To reduce confusion caused by NATs, this is the current internal SSU port, not the external port.

    - #### getUpnpChecked

          public String getUpnpChecked()

      default true