net.i2p.i2ptunnel.web

## Class EditBean

- java.lang.Object
- - net.i2p.i2ptunnel.web.IndexBean
  - - net.i2p.i2ptunnel.web.EditBean

-     public class EditBean
      extends IndexBean

  Web interface bean for editing and configuring I2P tunnel settings

- - ### Field Summary

    - ### Fields inherited from class net.i2p.i2ptunnel.web.IndexBean

      `_context, _group, _helper, _log, NOT_RUNNING, RUNNING, STANDBY, STARTING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EditBean()` Default constructor @since 0.8.3

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canChangeEncType(int tunnel)`
    `boolean` | `canChangePort(int tunnel)`
    `boolean` | `canChangeSigType(int tunnel)`
    `String` | `getAccessList(int tunnel)`
    `String` | `getAccessMode(int tunnel)`
    `boolean` | `getAllowAccept(int tunnel)`
    `boolean` | `getAllowInternalSSL(int tunnel)`
    `boolean` | `getAllowReferer(int tunnel)`
    `boolean` | `getAllowUserAgent(int tunnel)`
    `String` | `getAltPrivateKeyFile(int tunnel)`
    `String` | `getBlindedPassword(int tunnel)`
    `int` | `getCert(int tunnel)`
    `List<String>` | `getClientAuths(int tunnel, boolean isDH)` List of b64 name : b64key Pubkeys for DH, privkeys for PSK
    `boolean` | `getClose(int tunnel)`
    `int` | `getCloseTime(int tunnel)`
    `String` | `getCustomOptions(int tunnel)`
    `boolean` | `getDCC(int tunnel)`
    `boolean` | `getDelayOpen(int tunnel)`
    `int` | `getEffort(int tunnel)`
    `boolean` | `getEncrypt(int tunnel)`
    `String` | `getEncryptKey(int tunnel)`
    `String` | `getEncryptMode(int tunnel)`
    `String` | `getFilterDefinition(int tunnel)`
    `String` | `getI2CPHost(int tunnel)`
    `String` | `getI2CPPort(int tunnel)`
    `String` | `getJumpList(int tunnel)`
    `String` | `getKey1(int tunnel)` Random keys, hidden in forms
    `String` | `getKey2(int tunnel)`
    `String` | `getKey3(int tunnel)`
    `String` | `getKey4(int tunnel)`
    `int` | `getLimitDay(int tunnel)`
    `int` | `getLimitHour(int tunnel)`
    `int` | `getLimitMinute(int tunnel)`
    `int` | `getMaxStreams(int tunnel)`
    `boolean` | `getMultihome(int tunnel)`
    `boolean` | `getNewDest(int tunnel)`
    `boolean` | `getOutproxyAuth(int tunnel)`
    `String` | `getOutproxyPassword(int tunnel)`
    `String` | `getOutproxyType(int tunnel)`
    `String` | `getOutproxyUsername(int tunnel)`
    `boolean` | `getPersistentClientKey(int tunnel)`
    `int` | `getPostBanTime(int tunnel)`
    `int` | `getPostCheckTime(int tunnel)`
    `int` | `getPostMax(int tunnel)` POST limits
    `int` | `getPostTotalBanTime(int tunnel)`
    `int` | `getPostTotalMax(int tunnel)`
    `String` | `getPrivateKeyFile(int tunnel)`
    `boolean` | `getProxyAuth(int tunnel)`
    `String` | `getQuantityOptions(int tunnel, int mode)`
    `boolean` | `getReduce(int tunnel)`
    `int` | `getReduceCount(int tunnel)`
    `int` | `getReduceTime(int tunnel)`
    `int` | `getShutdownDelayMax(int tunnel)`
    `int` | `getShutdownDelayMin(int tunnel)`
    `String` | `getSigner(int tunnel)`
    `SigningPrivateKey` | `getSigningPrivateKey(int tunnel)`
    `int` | `getSigType(int tunnel, String newTunnelType)`
    `String` | `getSslProxies(int tunnel)`
    `int` | `getStartupDelayMax(int tunnel)`
    `int` | `getStartupDelayMin(int tunnel)`
    `String` | `getTargetHost(int tunnel)`
    `String` | `getTargetPort(int tunnel)`
    `int` | `getTotalDay(int tunnel)`
    `int` | `getTotalHour(int tunnel)`
    `int` | `getTotalMinute(int tunnel)`
    `int` | `getTunnelBackupQuantity(int tunnel, int defaultBackupQuantity)` in or both in/out
    `int` | `getTunnelBackupQuantityOut(int tunnel, int defaultBackupQuantity)`
    `int` | `getTunnelDepth(int tunnel, int defaultLength)`
    `int` | `getTunnelDepthOut(int tunnel, int defaultLength)`
    `int` | `getTunnelQuantity(int tunnel, int defaultQuantity)` in or both in/out
    `int` | `getTunnelQuantityOut(int tunnel, int defaultQuantity)`
    `int` | `getTunnelVariance(int tunnel, int defaultVariance)` in or both in/out
    `int` | `getTunnelVarianceOut(int tunnel, int defaultVariance)`
    `boolean` | `getUniqueLocal(int tunnel)`
    `boolean` | `getUseOutproxyPlugin(int tunnel)`
    `String` | `getUserAgents(int tunnel)`
    `boolean` | `hasEncType(int tunnel, int encType)`
    `Set<String>` | `interfaceSet()`
    `boolean` | `isAdvanced()`
    `boolean` | `isInteractive(int tunnel)`
    `boolean` | `isRouterContext()`
    `boolean` | `isSigTypeAvailable(int code)`
    `boolean` | `shouldDelay(int tunnel)`
    `boolean` | `startAutomatically(int tunnel)`
    `static boolean` | `staticIsClient(int tunnel)` Is it a client or server in the UI and I2P side? Note that a streamr client is a UI and I2P client but a server on the localhost side.
    `String` | `unlessAdvanced(String s)`

    - ### Methods inherited from class net.i2p.i2ptunnel.web.IndexBean

      `_t, encrypt, getAltDestHashBase32, getAltDestination, getAltDestinationBase64, getClientDestination, getClientInterface, getClientPort, getClientPort2, getController, getControllerNumbers, getDestHashBase32, getDestination, getDestinationBase64, getEncryptedBase32, getInternalType, getIsOfflineKeys, getIsUsingOutproxyPlugin, getLastMessageID, getMessages, getNextNonce, getRemainingStartupDelay, getServerTarget, getSharedClient, getSpoofedHost, getTheme, getThemeName, getTunnelCount, getTunnelDescription, getTunnelName, getTunnelStatus, getTunnelType, getType, getTypeName, haveNonce, isClient, isClient, isInitialized, isRejectInproxy, isRejectReferer, isRejectUserAgents, isServer, isServerTargetLinkValid, isSharedClient, isSSLEnabled, isValidIRCServer, ngettext, setAccessList, setAccessMode, setAction, setAddClient, setAllowAccept, setAllowInternalSSL, setAllowReferer, setAllowUserAgent, setAltPrivKeyFile, setCert, setClientHost, setclientKey, setClientport, setClose, setCloseTime, setConnectDelay, setDCC, setDelayOpen, setEncrypt, setEncryptKey, setEncryptMode, setEncType, setFilterDefinition, setJumpList, setKey1, setKey2, setKey3, setKey4, setLimitDay, setLimitHour, setLimitMinute, setMaxStreams, setMsgid, setMultihome, setNewClientKey, setNewDest, setNofilter_blindedPassword, setNofilter_clientName, setNofilter_customOptions, setNofilter_description, setNofilter_name, setNofilter_newClientName, setNofilter_outproxyPassword, setNofilter_proxyPassword, setNonce, setOutproxyAuth, setOutproxyType, setOutproxyUsername, setPort, setPostBanTime, setPostCheckTime, setPostMax, setPostTotalBanTime, setPostTotalMax, setPrivKeyFile, setProfile, setProxyAuth, setProxyList, setProxyUsername, setReachableBy, setReduce, setReduceCount, setReduceTime, setRejectInproxy, setRejectReferer, setRejectUserAgents, setRemoveConfirm, setRevokeClient, setShared, setShared, setShutdownDelayMax, setShutdownDelayMin, setSigner, setSigType, setSpoofedHost, setSslProxies, setStartOnLoad, setStartupDelayMax, setStartupDelayMin, setTargetDestination, setTargetHost, setTargetPort, setTotalDay, setTotalHour, setTotalMinute, setTunnel, setTunnelBackupQuantity, setTunnelBackupQuantityOut, setTunnelDepth, setTunnelDepthOut, setTunnelQuantity, setTunnelQuantityOut, setTunnelVariance, setTunnelVarianceOut, setType, setUniqueLocal, setUseOutproxyPlugin, setUserAgents, setUseSSL, useSoraFont`

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

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

- - ### Constructor Detail

    - #### EditBean

          public EditBean()

      Default constructor @since 0.8.3

  - ### Method Detail

    - #### canChangeEncType

          public boolean canChangeEncType(int tunnel)

    - #### canChangePort

          public boolean canChangePort(int tunnel)

    - #### canChangeSigType

          public boolean canChangeSigType(int tunnel)

    - #### getAccessList

          public String getAccessList(int tunnel)

      Returns:
        the access list for the tunnel @since 0.8.3

    - #### getAccessMode

          public String getAccessMode(int tunnel)

      Returns:
        the access mode for the tunnel @since 0.8.3

    - #### getAllowAccept

          public boolean getAllowAccept(int tunnel)

    - #### getAllowInternalSSL

          public boolean getAllowInternalSSL(int tunnel)

    - #### getAllowReferer

          public boolean getAllowReferer(int tunnel)

    - #### getAllowUserAgent

          public boolean getAllowUserAgent(int tunnel)

    - #### getAltPrivateKeyFile

          public String getAltPrivateKeyFile(int tunnel)

      Returns:
        path or ""

    - #### getBlindedPassword

          public String getBlindedPassword(int tunnel)

    - #### getCert

          public int getCert(int tunnel)

      Returns:
        the certificate for the tunnel @since 0.8.3

    - #### getClientAuths

          public List<String> getClientAuths(int tunnel,
                                             boolean isDH)

      List of b64 name : b64key Pubkeys for DH, privkeys for PSK
      Parameters:
        `isDH` - true for DH, false for PSK
      Returns:
        non-null

    - #### getClose

          public boolean getClose(int tunnel)

      Returns:
        true if the tunnel should close on idle @since 0.8.3

    - #### getCloseTime

          public int getCloseTime(int tunnel)

      Returns:
        the close time in minutes for the tunnel @since 0.8.3

    - #### getCustomOptions

          public String getCustomOptions(int tunnel)

      Returns:
        the custom options string for the tunnel @since 0.8.3

    - #### getDCC

          public boolean getDCC(int tunnel)

      Returns:
        true if DCC is enabled for the tunnel @since 0.8.9

    - #### getDelayOpen

          public boolean getDelayOpen(int tunnel)

      Returns:
        true if the tunnel open should be delayed @since 0.8.3

    - #### getEffort

          public int getEffort(int tunnel)

      Returns:
        the encryption effort for the tunnel @since 0.8.3

    - #### getEncrypt

          public boolean getEncrypt(int tunnel)

      Returns:
        true if encryption is enabled for the tunnel @since 0.8.3

    - #### getEncryptKey

          public String getEncryptKey(int tunnel)

      Returns:
        the encryption key for the tunnel @since 0.8.3

    - #### getEncryptMode

          public String getEncryptMode(int tunnel)

    - #### getFilterDefinition

          public String getFilterDefinition(int tunnel)

    - #### getI2CPHost

          public String getI2CPHost(int tunnel)

      Returns:
        the I2CP host for the tunnel @since 0.8.3

    - #### getI2CPPort

          public String getI2CPPort(int tunnel)

      Returns:
        the I2CP port for the tunnel @since 0.8.3

    - #### getJumpList

          public String getJumpList(int tunnel)

      Returns:
        the jump list for the tunnel @since 0.8.3

    - #### getKey1

          public String getKey1(int tunnel)

      Random keys, hidden in forms

    - #### getKey2

          public String getKey2(int tunnel)

      Returns:
        the encrypted outbound random key @since 0.8.3

    - #### getKey3

          public String getKey3(int tunnel)

      Returns:
        the encrypted lease set signing private key @since 0.8.3

    - #### getKey4

          public String getKey4(int tunnel)

      Returns:
        the encrypted lease set private key @since 0.8.3

    - #### getLimitDay

          public int getLimitDay(int tunnel)

      Returns:
        the per-day limit for the tunnel @since 0.8.3

    - #### getLimitHour

          public int getLimitHour(int tunnel)

      Returns:
        the per-hour limit for the tunnel @since 0.8.3

    - #### getLimitMinute

          public int getLimitMinute(int tunnel)

      Returns:
        the per-minute limit for the tunnel @since 0.8.3

    - #### getMaxStreams

          public int getMaxStreams(int tunnel)

      Returns:
        the maximum number of streams for the tunnel @since 0.8.3

    - #### getMultihome

          public boolean getMultihome(int tunnel)

      Returns:
        true if multihoming is enabled @since 0.9.18

    - #### getNewDest

          public boolean getNewDest(int tunnel)

      Returns:
        true if a new destination should be created @since 0.8.3

    - #### getOutproxyAuth

          public boolean getOutproxyAuth(int tunnel)

      Returns:
        true if outproxy authentication is enabled @since 0.8.3

    - #### getOutproxyPassword

          public String getOutproxyPassword(int tunnel)

      Returns:
        the outproxy password @since 0.8.3

    - #### getOutproxyType

          public String getOutproxyType(int tunnel)

      Returns:
        the outproxy type @since 0.9.57

    - #### getOutproxyUsername

          public String getOutproxyUsername(int tunnel)

      Returns:
        the outproxy username @since 0.8.3

    - #### getPersistentClientKey

          public boolean getPersistentClientKey(int tunnel)

      Returns:
        true if the client key should be persistent @since 0.8.3

    - #### getPostBanTime

          public int getPostBanTime(int tunnel)

      Returns:
        the POST ban time for the tunnel @since 0.9.9

    - #### getPostCheckTime

          public int getPostCheckTime(int tunnel)

      Returns:
        the POST check time for the tunnel @since 0.9.9

    - #### getPostMax

          public int getPostMax(int tunnel)

      POST limits

    - #### getPostTotalBanTime

          public int getPostTotalBanTime(int tunnel)

      Returns:
        the POST total ban time for the tunnel @since 0.9.9

    - #### getPostTotalMax

          public int getPostTotalMax(int tunnel)

      Returns:
        the POST total max for the tunnel @since 0.9.9

    - #### getPrivateKeyFile

          public String getPrivateKeyFile(int tunnel)

      Returns:
        the private key file for the tunnel @since 0.8.3

    - #### getProxyAuth

          public boolean getProxyAuth(int tunnel)

      Returns:
        true if proxy authentication is enabled @since 0.8.2

    - #### getQuantityOptions

          public String getQuantityOptions(int tunnel,
                                           int mode)

      Parameters:
        `mode` - 0=both, 1=in, 2=out

    - #### getReduce

          public boolean getReduce(int tunnel)

      Returns:
        true if the tunnel should reduce on idle @since 0.8.3

    - #### getReduceCount

          public int getReduceCount(int tunnel)

      Returns:
        the reduce count for the tunnel @since 0.8.3

    - #### getReduceTime

          public int getReduceTime(int tunnel)

      Returns:
        the reduce time in minutes for the tunnel @since 0.8.3

    - #### getShutdownDelayMax

          public int getShutdownDelayMax(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        the maximum shutdown delay in seconds for server tunnels

    - #### getShutdownDelayMin

          public int getShutdownDelayMin(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        the minimum shutdown delay in seconds for server tunnels

    - #### getSigner

          public String getSigner(int tunnel)

      Returns:
        the signer for the tunnel @since 0.8.3

    - #### getSigningPrivateKey

          public SigningPrivateKey getSigningPrivateKey(int tunnel)

      Returns:
        key or null

    - #### getSigType

          public int getSigType(int tunnel,
                                String newTunnelType)

      Parameters:
        `newTunnelType` - used if tunnel < 0

    - #### getSslProxies

          public String getSslProxies(int tunnel)

      Returns:
        the SSL proxies string @since 0.9.11

    - #### getStartupDelayMax

          public int getStartupDelayMax(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        the maximum startup delay in seconds for server tunnels

    - #### getStartupDelayMin

          public int getStartupDelayMin(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        the minimum startup delay in seconds for server tunnels

    - #### getTargetHost

          public String getTargetHost(int tunnel)

      Returns:
        the target host for the tunnel @since 0.8.3

    - #### getTargetPort

          public String getTargetPort(int tunnel)

      Returns:
        the target port for the tunnel, or empty string if none @since 0.8.3

    - #### getTotalDay

          public int getTotalDay(int tunnel)

      Returns:
        the per-day total for the tunnel @since 0.8.3

    - #### getTotalHour

          public int getTotalHour(int tunnel)

      Returns:
        the per-hour total for the tunnel @since 0.8.3

    - #### getTotalMinute

          public int getTotalMinute(int tunnel)

      Returns:
        the per-minute total for the tunnel @since 0.8.3

    - #### getTunnelBackupQuantity

          public int getTunnelBackupQuantity(int tunnel,
                                             int defaultBackupQuantity)

      in or both in/out

    - #### getTunnelBackupQuantityOut

          public int getTunnelBackupQuantityOut(int tunnel,
                                                int defaultBackupQuantity)

    - #### getTunnelDepth

          public int getTunnelDepth(int tunnel,
                                    int defaultLength)

      Parameters:
        `tunnel` - the tunnel index
        `defaultLength` - the default depth if not configured
      Returns:
        the tunnel depth (number of hops) for inbound tunnels, or -1 for default

    - #### getTunnelDepthOut

          public int getTunnelDepthOut(int tunnel,
                                       int defaultLength)

    - #### getTunnelQuantity

          public int getTunnelQuantity(int tunnel,
                                       int defaultQuantity)

      in or both in/out

    - #### getTunnelQuantityOut

          public int getTunnelQuantityOut(int tunnel,
                                          int defaultQuantity)

    - #### getTunnelVariance

          public int getTunnelVariance(int tunnel,
                                       int defaultVariance)

      in or both in/out

    - #### getTunnelVarianceOut

          public int getTunnelVarianceOut(int tunnel,
                                          int defaultVariance)

    - #### getUniqueLocal

          public boolean getUniqueLocal(int tunnel)

      Returns:
        true if unique local addresses should be used @since 0.9.13

    - #### getUseOutproxyPlugin

          public boolean getUseOutproxyPlugin(int tunnel)

      Returns:
        true if the outproxy plugin should be used @since 0.9.11

    - #### getUserAgents

          public String getUserAgents(int tunnel)

      Returns:
        the user agents string @since 0.9.25

    - #### hasEncType

          public boolean hasEncType(int tunnel,
                                    int encType)

      Parameters:
        `encType` - code

    - #### interfaceSet

          public Set<String> interfaceSet()

      Returns:
        the set of network interfaces @since 0.8.3

    - #### isAdvanced

          public boolean isAdvanced()

      Returns:
        true if advanced mode is enabled @since 0.9.12

    - #### isInteractive

          public boolean isInteractive(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        true if the tunnel is interactive (requires immediate response)

    - #### isRouterContext

          public boolean isRouterContext()

      Returns:
        true if running in router context @since 0.8.3

    - #### isSigTypeAvailable

          public boolean isSigTypeAvailable(int code)

    - #### shouldDelay

          public boolean shouldDelay(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        true if the tunnel connection should be delayed until the first client connects

    - #### startAutomatically

          public boolean startAutomatically(int tunnel)

      Parameters:
        `tunnel` - the tunnel index
      Returns:
        true if the tunnel is configured to start when the router starts

    - #### staticIsClient

          public static boolean staticIsClient(int tunnel)

      Is it a client or server in the UI and I2P side? Note that a streamr client is a UI and I2P client but a server on the localhost side. Note that a streamr server is a UI and I2P server but a client on the localhost side.

    - #### unlessAdvanced

          public String unlessAdvanced(String s)

      Returns:
        translated s or ""