java.lang.Object
net.i2p.i2ptunnel.web.IndexBean
net.i2p.i2ptunnel.web.EditBean
Web interface bean for editing and configuring I2P tunnel settings.
Warning - This class is not part of the i2ptunnel API, it has been moved from the jar to the war. Usage by classes outside of i2ptunnel.war is deprecated.
Field Summary
Fields inherited from class IndexBean
_context, _group, _helper, _log, NOT_RUNNING, RUNNING, STANDBY, STARTINGModifier and TypeFieldDescriptionprotected final I2PAppContextApp context, for properties, randomness and key generation.protected final TunnelControllerGroupThe configured tunnels, null if the group is not initialized.protected final GeneralHelperReads tunnel properties, shared with subclasses.protected final LogLog for this bean.static final intTunnel status: not running.static final intTunnel status: running.static final intTunnel status: standby.static final intTunnel status: starting.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleancanChangeEncType(int tunnel) Returns whether the tunnel encryption type can be changed.booleancanChangePort(int tunnel) Returns whether the tunnel port setting can be changed.booleancanChangeSigType(int tunnel) Returns whether the tunnel signature type can be changed.getAccessList(int tunnel) The access list for the tunnel.getAccessMode(int tunnel) The access mode for the tunnel.booleangetAllowAccept(int tunnel) Returns whether Accept header passthrough is allowed.booleangetAllowInternalSSL(int tunnel) Returns whether internal SSL connections are allowed.booleangetAllowReferer(int tunnel) Returns whether Referer header passthrough is allowed.booleangetAllowUserAgent(int tunnel) Returns whether User-Agent header passthrough is allowed.getAltPrivateKeyFile(int tunnel) The alternate private key file for the tunnel.getBlindedPassword(int tunnel) Configured blinded password used to authenticate to the tunnel peer.intgetCert(int tunnel) The certificate for the tunnel.getClientAuths(int tunnel, boolean isDH) List of b64 name : b64key Pubkeys for DH, privkeys for PSK.booleangetClose(int tunnel) Whether the tunnel should close on idle.intgetCloseTime(int tunnel) The close time in minutes for the tunnel.getCustomOptions(int tunnel) The custom options string for the tunnel.booleangetDCC(int tunnel) Whether DCC is enabled for the tunnel.booleangetDelayOpen(int tunnel) Whether the tunnel open should be delayed.intgetEffort(int tunnel) The encryption effort for the tunnel.booleangetEncrypt(int tunnel) Whether encryption is enabled for the tunnel.getEncryptKey(int tunnel) The encryption key for the tunnel.getEncryptMode(int tunnel) Configured encryption mode for the tunnel, as a numeric string.getFilterDefinition(int tunnel) Configured peer filter definition for the tunnel.getI2CPHost(int tunnel) The I2CP host for the tunnel.getI2CPPort(int tunnel) The I2CP port for the tunnel.getJumpList(int tunnel) The jump list for the tunnel.getKey1(int tunnel) Returns the encrypted inbound random key, hidden in forms.getKey2(int tunnel) The encrypted outbound random key.getKey3(int tunnel) The encrypted lease set signing private key.getKey4(int tunnel) The encrypted lease set private key.intgetLimitDay(int tunnel) The per-day limit for the tunnel.intgetLimitHour(int tunnel) The per-hour limit for the tunnel.intgetLimitMinute(int tunnel) The per-minute limit for the tunnel.intgetMaxStreams(int tunnel) The maximum number of streams for the tunnel.booleangetMultihome(int tunnel) Whether multihoming is enabled.booleangetNewDest(int tunnel) Whether a new destination should be created.booleangetOutproxyAuth(int tunnel) Whether outproxy authentication is enabled.getOutproxyPassword(int tunnel) The outproxy password.getOutproxyType(int tunnel) The outproxy type.getOutproxyUsername(int tunnel) The outproxy username.booleangetPersistentClientKey(int tunnel) Whether the client key should be persistent.intgetPostBanTime(int tunnel) The POST ban time for the tunnel.intgetPostCheckTime(int tunnel) The POST check time for the tunnel.intgetPostMax(int tunnel) POST limits.intgetPostTotalBanTime(int tunnel) The POST total ban time for the tunnel.intgetPostTotalMax(int tunnel) The POST total max for the tunnel.getPrivateKeyFile(int tunnel) The private key file for the tunnel.booleangetProxyAuth(int tunnel) Whether proxy authentication is enabled.getQuantityOptions(int tunnel, int mode) The quantity options for the tunnel, as HTML.booleangetReduce(int tunnel) Whether the tunnel should reduce on idle.intgetReduceCount(int tunnel) The reduce count for the tunnel.intgetReduceTime(int tunnel) The reduce time in minutes for the tunnel.intgetShutdownDelayMax(int tunnel) The maximum shutdown delay in seconds for server tunnels.intgetShutdownDelayMin(int tunnel) The minimum shutdown delay in seconds for server tunnels.getSigner(int tunnel) The signer for the tunnel.getSigningPrivateKey(int tunnel) The signing private key for the tunnel.intgetSigType(int tunnel, String newTunnelType) Configured signature type for the tunnel's destination.getSslProxies(int tunnel) The SSL proxies string.intgetStartupDelayMax(int tunnel) The maximum startup delay in seconds for server tunnels.intgetStartupDelayMin(int tunnel) The minimum startup delay in seconds for server tunnels.getTargetHost(int tunnel) The target host for the tunnel.getTargetPort(int tunnel) The target port for the tunnel, or empty string if none.intgetTotalDay(int tunnel) The per-day total for the tunnel.intgetTotalHour(int tunnel) The per-hour total for the tunnel.intgetTotalMinute(int tunnel) The per-minute total for the tunnel.intgetTunnelBackupQuantity(int tunnel, int defaultBackupQuantity) Gets the backup tunnel quantity for inbound or both in/out.intgetTunnelBackupQuantityOut(int tunnel, int defaultBackupQuantity) Configured number of backup outbound tunnels.intgetTunnelDepth(int tunnel, int defaultLength) Gets the tunnel depth (number of hops) for inbound tunnels.intgetTunnelDepthOut(int tunnel, int defaultLength) Configured hop count for the tunnel's outbound (client-side) tunnels.intgetTunnelQuantity(int tunnel, int defaultQuantity) Gets the tunnel quantity for inbound or both in/out.intgetTunnelQuantityOut(int tunnel, int defaultQuantity) Configured number of primary outbound tunnels.intgetTunnelVariance(int tunnel, int defaultVariance) Gets the tunnel variance for inbound or both in/out.intgetTunnelVarianceOut(int tunnel, int defaultVariance) Configured length variance allowed for outbound tunnels.booleangetUniqueLocal(int tunnel) Whether unique local addresses should be used.booleangetUseOutproxyPlugin(int tunnel) Whether the outproxy plugin should be used.getUserAgents(int tunnel) The user agents string.booleanhasEncType(int tunnel, int encType) Returns whether the tunnel supports the specified encryption type.The set of network interfaces.booleanWhether advanced mode is enabled.booleanisInteractive(int tunnel) Whether the tunnel is interactive (requires immediate response).booleanWhether running in router context.booleanisSigTypeAvailable(int code) Returns whether the given signature type is available.booleanshouldDelay(int tunnel) Whether the tunnel connection should be delayed until the first client connects.booleanstartAutomatically(int tunnel) Whether the tunnel is configured to start when the router starts.static booleanstaticIsClient(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.The translated string wrapped in parentheses, or empty in advanced mode.Methods inherited from class IndexBean
_t, encrypt, getAltDestHashBase32, getAltDestination, getAltDestinationBase64, getClientDestination, getClientInterface, getClientPort, getClientPort2, getController, getControllerNumbers, getDestHashBase32, getDestination, getDestinationBase64, getEncryptedBase32, getInternalType, getIsOfflineKeys, getIsUsingOutproxyPlugin, getLastMessageID, getMessages, getNextNonce, getNextNonce, getRemainingStartupDelay, getServerTarget, getSharedClient, getSpoofedHost, getTheme, getThemeName, getTunnelCount, getTunnelDescription, getTunnelName, getTunnelStatus, getTunnelType, getType, getTypeName, haveNonce, 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, setSession, 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, storeMethod, useSoraFontModifier and TypeMethodDescriptionprotected StringTranslate a string.protected StringEncrypt a property using an in-memory key, for interaction with the UI only, using ChaCha20.getAltDestHashBase32(int tunnel) Works even if tunnel is not running.protected DestinationgetAltDestination(int tunnel) Works even if tunnel is not running.getAltDestinationBase64(int tunnel) Works even if tunnel is not running.getClientDestination(int tunnel) The destination Base64 for the specified client tunnel.getClientInterface(int tunnel) The interface the specified client tunnel is configured to listen on.getClientPort(int tunnel) No validation.getClientPort2(int tunnel) Returns error message if blank or invalid.protected TunnelControllergetController(int tunnel) The controller for the given tunnel index.getControllerNumbers(boolean isClient) Return tunnel numbers of clients or servers only, sorted by tunnel name.getDestHashBase32(int tunnel) Works even if tunnel is not running.protected DestinationgetDestination(int tunnel) Works even if tunnel is not running.getDestinationBase64(int tunnel) Works even if tunnel is not running.getEncryptedBase32(int tunnel) Works even if tunnel is not running.getInternalType(int tunnel) The internal type string for the specified tunnel.booleangetIsOfflineKeys(int tunnel) Works even if tunnel is not running.booleangetIsUsingOutproxyPlugin(int tunnel) For index.jsp.intThe last stored message ID.Executes any action requested (start/stop/etc) and dump out the messages.static StringGet the next nonce from the queue.static StringgetNextNonce(HttpSession session) Session-bound nonce generation - replaces static nonce when session available.intgetRemainingStartupDelay(int tunnel) The remaining startup delay for the specified tunnel.getServerTarget(int tunnel) Get the server target.getSharedClient(int tunnel) Get the shared client for a tunnel.getSpoofedHost(int tunnel) Get the spoofed host for a tunnel.getTheme()Get the theme path.Get the theme name.intGet the number of tunnels.getTunnelDescription(int tunnel) The description for the specified tunnel, HTML-escaped.getTunnelName(int tunnel) Get the tunnel name.intgetTunnelStatus(int tunnel) The current status of the specified tunnel.getTunnelType(int tunnel) Get the tunnel type.(package private) StringgetType()The tunnel type.getTypeName(String internalType) Get the display name for an internal type.static booleanWhether we know this nonce.static booleanhaveNonce(String nonce, HttpSession session) Session-bound nonce validation.booleanisClient(int tunnelNum) 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.static booleanIs 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.booleanCheck if the tunnel group is initialized.booleanisRejectInproxy(int tunnel) Are requests carrying inproxy forwarding headers rejected?booleanisRejectReferer(int tunnel) Are requests carrying a Referer header rejected?booleanisRejectUserAgents(int tunnel) Are blacklisted User-Agents rejected?booleanisServer(int tunnel) Is this a server tunnel?booleanisServerTargetLinkValid(int tunnel) Call this to see if it is ok to linkifyIndexBean.getServerTarget(int).booleanisSharedClient(int tunnel) Check if the tunnel is a shared client.booleanisSSLEnabled(int tunnel) Is SSL enabled for the server tunnel?booleanisValidIRCServer(int tunnel) Is this an IRC server? Call to establish if we should provide irc:// link on index page.protected Stringtranslate (ngettext).voidsetAccessList(String val) Comma-separated list of destinations to whitelist or blacklist.voidsetAccessMode(String val) Set the access mode, 0 for none, 1 for whitelist, 2 for blacklist.voidSet the action to process.voidsetAddClient(String val) Generate an extra per-client key, as for encrypt modes 6-9.voidsetAllowAccept(String val) Allow the Accept header to pass through the HTTP client.voidAllow SSL connections through the HTTP client.voidsetAllowReferer(String val) Allow the Referer header to pass through the HTTP client.voidsetAllowUserAgent(String val) Allow the User-Agent header to pass through the HTTP client.voidsetAltPrivKeyFile(String file) What filename is this server tunnel's alternate private keys stored in.voidSet the certificate type, from the form selection.voidsetClientHost(String host) I2CP host the router is on, ignored when in router context.voidsetclientKey(String[] s) Set client keys for access control (multiple entries in form).voidsetClientport(String port) I2CP port the router is on, ignored when in router context.voidClose connections when idle.voidsetCloseTime(String val) Idle time in minutes before closing connections.voidsetConnectDelay(String val) Delay the connection to the target until the first client connects.voidAllow DCC in IRC clients.voidsetDelayOpen(String val) Delay opening to the target until the first client connects.voidsetEncrypt(String val) Encrypt the lease set.voidsetEncryptKey(String val) Key for encrypting the lease set.voidsetEncryptMode(String val) Set the LeaseSet encryption mode.voidsetEncType(String s) Adds to existing, comma separated.voidSet the filter definition.voidsetJumpList(String val) Comma-separated list of HTTP outproxy jump servers.voidRandom keys, hidden in forms.voidRandom outbound key, hidden in forms.voidLease set signing private key, hidden in forms.voidLease set private key, hidden in forms.voidMaximum total number of connections per day.voidMaximum total number of connections per hour.voidMaximum total number of connections per minute.voidMaximum number of concurrent streams.voidSet the message ID for clearing messages.voidsetMultihome(String val) Bundle reply info for multihoming.voidAdd a key for per-client LeaseSet encryption.voidsetNewDest(String val) Control how ephemeral the destination is.voidSet the blinded password for hidden encrypted LeaseSets.voidSet client names for access control (multiple entries in form).voidsetNofilter_customOptions(String customOptions) What I2P session overrides should be used.voidsetNofilter_description(String description) One line host description.voidsetNofilter_name(String name) Short name of the tunnel.voidAdd a client for per-client LeaseSet encryption.voidPassword for outproxy authentication.voidPassword for client proxy authentication.voidSet the current nonce.voidRequire authentication for the outproxies.voidSet the type of the outproxy.voidUsername for outproxy authentication.voidWhat port should this client/httpclient/ircclient listen on.voidHow long to ban a client that exceeds the POST limits, in minutes.voidHow often the total POST limit is checked, in minutes.voidsetPostMax(String s) Maximum number of POST or PUT requests per check window, per peer.voidHow long to ban a client that exceeds the total POST limit, in minutes.voidMaximum total number of POST or PUT requests in the check interval.voidsetPrivKeyFile(String file) What filename is this server tunnel's private keys stored in.voidsetProfile(String profile) Set the streaming profile.voidSet the proxy authentication type.voidsetProxyList(String proxyList) What HTTP outproxies should be used (httpclient specific).voidUsername for client proxy authentication.voidsetReachableBy(String reachableBy) What interface should this client/httpclient/ircclient listen on.voidReduce the number of connections when idle.voidsetReduceCount(String val) Number of connections to reduce to when idle.voidsetReduceTime(String val) Idle time in minutes before reducing connections.voidsetRejectInproxy(String val) Reject requests carrying inproxy forwarding headers.voidsetRejectReferer(String val) Reject requests carrying a Referer header.voidReject requests whose User-Agent matches the blocklist.voidsetRemoveConfirm(String val) If called with any value (and the form submitted with action=Remove), we really do want to stop and remove the tunnel.voidsetRevokeClient(String[] s) Revoke access for specified clients (multiple entries in form, values are integers).voidsetSession(HttpSession session) For session-bound nonce generation and validation.voidsetShared(boolean val) Share the private key with other client tunnels.voidShare the private key with other client tunnels.voidThe maximum shutdown delay in seconds for server tunnels.voidThe minimum shutdown delay in seconds for server tunnels.voidSet the certificate signer.voidsetSigType(String val) Set the destination signature type, and rewrite the certificate to match.voidsetSpoofedHost(String host) What host does this http server tunnel spoof.voidComma-separated list of SSL-capable outproxies.voidsetStartOnLoad(String val) If called with any value, we want this tunnel to start whenever it is loaded (aka right now and whenever the router is started up).voidsetStartupDelayMax(String val) The maximum startup delay in seconds for server tunnels.voidsetStartupDelayMin(String val) The minimum startup delay in seconds for server tunnels.voidsetTargetDestination(String dest) What peer does this client tunnel point at.voidsetTargetHost(String host) What host does this server tunnel point at.voidsetTargetPort(String port) What port does this server tunnel point at.voidMaximum total number of connections per day, enforced by the total limit.voidMaximum total number of connections per hour, enforced by the total limit.voidMaximum total number of connections per minute, enforced by the total limit.voidSet the tunnel number.voidsetTunnelBackupQuantity(String tunnelBackupQuantity) How many tunnels to hold in reserve to guard against failures In or both in/out.voidsetTunnelBackupQuantityOut(String tunnelBackupQuantity) How many outbound tunnels to hold in reserve to guard against failures.voidsetTunnelDepth(String tunnelDepth) How many hops to use for inbound tunnels In or both in/out.voidsetTunnelDepthOut(String tunnelDepth) How many hops to use for outbound tunnels.voidsetTunnelQuantity(String tunnelQuantity) How many parallel inbound tunnels to use In or both in/out.voidsetTunnelQuantityOut(String tunnelQuantity) How many parallel outbound tunnels to use.voidsetTunnelVariance(String tunnelVariance) How much randomisation to apply to the depth of tunnels In or both in/out.voidsetTunnelVarianceOut(String tunnelVariance) How much randomisation to apply to the depth of outbound tunnels.voidWhat type of tunnel (httpclient, ircclient, client, or server).voidsetUniqueLocal(String val) Assign unique local hostnames for destination lookup.voidUse the outproxy plugin for HTTP requests.voidsetUserAgents(String agents) Set the User-Agent blocklist.voidUse SSL on the server port.voidstoreMethod(String method) Store request method for P-R-G pattern.booleanCheck if the Sora font is enabled.
Constructor Details
EditBean
public EditBean()Constructs the edit-page bean.
Method Details
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.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the tunnel is a client type
getTargetHost
The target host for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the target host for the tunnel
getTargetPort
The target port for the tunnel, or empty string if none.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the target port, or "" if none
getPrivateKeyFile
The private key file for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the private key file
getAltPrivateKeyFile
The alternate private key file for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- path or ""
getSigningPrivateKey
The signing private key for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- key or null
startAutomatically
public boolean startAutomatically(int tunnel) Whether the tunnel is configured to start when the router starts.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the tunnel starts automatically
getStartupDelayMin
public int getStartupDelayMin(int tunnel) The minimum startup delay in seconds for server tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the minimum startup delay in seconds
getStartupDelayMax
public int getStartupDelayMax(int tunnel) The maximum startup delay in seconds for server tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the maximum startup delay in seconds
getShutdownDelayMin
public int getShutdownDelayMin(int tunnel) The minimum shutdown delay in seconds for server tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the minimum shutdown delay in seconds
getShutdownDelayMax
public int getShutdownDelayMax(int tunnel) The maximum shutdown delay in seconds for server tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the maximum shutdown delay in seconds
shouldDelay
public boolean shouldDelay(int tunnel) Whether the tunnel connection should be delayed until the first client connects.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the connection is delayed
isInteractive
public boolean isInteractive(int tunnel) Whether the tunnel is interactive (requires immediate response).- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the tunnel is interactive
getTunnelDepth
public int getTunnelDepth(int tunnel, int defaultLength) Gets the tunnel depth (number of hops) for inbound tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultLength- the default depth if not configured- Returns:
- the tunnel depth, or -1 for default
getTunnelQuantity
public int getTunnelQuantity(int tunnel, int defaultQuantity) Gets the tunnel quantity for inbound or both in/out.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultQuantity- the default quantity if not configured- Returns:
- the tunnel quantity
getTunnelBackupQuantity
public int getTunnelBackupQuantity(int tunnel, int defaultBackupQuantity) Gets the backup tunnel quantity for inbound or both in/out.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultBackupQuantity- the default backup quantity if not configured- Returns:
- the backup tunnel quantity
getTunnelVariance
public int getTunnelVariance(int tunnel, int defaultVariance) Gets the tunnel variance for inbound or both in/out.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultVariance- the default variance if not configured- Returns:
- the tunnel variance
getTunnelDepthOut
public int getTunnelDepthOut(int tunnel, int defaultLength) Configured hop count for the tunnel's outbound (client-side) tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultLength- the default depth if not configured- Returns:
- the outbound tunnel depth, or -1 for default
getTunnelQuantityOut
public int getTunnelQuantityOut(int tunnel, int defaultQuantity) Configured number of primary outbound tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultQuantity- the default quantity if not configured- Returns:
- the outbound tunnel quantity
getTunnelBackupQuantityOut
public int getTunnelBackupQuantityOut(int tunnel, int defaultBackupQuantity) Configured number of backup outbound tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultBackupQuantity- the default backup quantity if not configured- Returns:
- the outbound backup tunnel quantity
getTunnelVarianceOut
public int getTunnelVarianceOut(int tunnel, int defaultVariance) Configured length variance allowed for outbound tunnels.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunneldefaultVariance- the default variance if not configured- Returns:
- the outbound tunnel variance
getReduce
public boolean getReduce(int tunnel) Whether the tunnel should reduce on idle.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if the tunnel should reduce on idle
getReduceCount
public int getReduceCount(int tunnel) The reduce count for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the reduce count for the tunnel
getReduceTime
public int getReduceTime(int tunnel) The reduce time in minutes for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the reduce time in minutes for the tunnel
getCert
public int getCert(int tunnel) The certificate for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the certificate for the tunnel
getEffort
public int getEffort(int tunnel) The encryption effort for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the encryption effort for the tunnel
getSigner
The signer for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the signer for the tunnel
getEncrypt
public boolean getEncrypt(int tunnel) Whether encryption is enabled for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if encryption is enabled for the tunnel
getEncryptMode
Configured encryption mode for the tunnel, as a numeric string.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the encryption mode as a string
getBlindedPassword
Configured blinded password used to authenticate to the tunnel peer.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the blinded password, or empty string if none
getClientAuths
getSigType
Configured signature type for the tunnel's destination.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnelnewTunnelType- used if tunnel < 0- Returns:
- the signature type code
isSigTypeAvailable
public boolean isSigTypeAvailable(int code) Returns whether the given signature type is available.- Parameters:
code- the signature type code- Returns:
- true if available
canChangeSigType
public boolean canChangeSigType(int tunnel) Returns whether the tunnel signature type can be changed. The type is fixed if the tunnel has an existing destination.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the signature type can be changed
canChangeEncType
public boolean canChangeEncType(int tunnel) Returns whether the tunnel encryption type can be changed.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the encryption type can be changed
canChangePort
public boolean canChangePort(int tunnel) Returns whether the tunnel port setting can be changed.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if the port can be changed
hasEncType
public boolean hasEncType(int tunnel, int encType) Returns whether the tunnel supports the specified encryption type.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnelencType- the encryption type code- Returns:
- true if the tunnel has the encryption type
getKey1
Returns the encrypted inbound random key, hidden in forms.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the encrypted inbound random key
getKey2
The encrypted outbound random key.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the encrypted outbound random key
getKey3
The encrypted lease set signing private key.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the encrypted lease set signing private key
getKey4
The encrypted lease set private key.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the encrypted lease set private key
getDCC
public boolean getDCC(int tunnel) Whether DCC is enabled for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if DCC is enabled for the tunnel
getEncryptKey
The encryption key for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the encryption key for the tunnel
getAccessMode
The access mode for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the access mode for the tunnel
getAccessList
The access list for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the access list for the tunnel
getFilterDefinition
Configured peer filter definition for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- the filter definition, or empty string if none
getJumpList
The jump list for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the jump list for the tunnel
getClose
public boolean getClose(int tunnel) Whether the tunnel should close on idle.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if the tunnel should close on idle
getCloseTime
public int getCloseTime(int tunnel) The close time in minutes for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the close time in minutes for the tunnel
getNewDest
public boolean getNewDest(int tunnel) Whether a new destination should be created.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if a new destination should be created
getPersistentClientKey
public boolean getPersistentClientKey(int tunnel) Whether the client key should be persistent.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if the client key should be persistent
getDelayOpen
public boolean getDelayOpen(int tunnel) Whether the tunnel open should be delayed.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if the tunnel open should be delayed
getAllowUserAgent
public boolean getAllowUserAgent(int tunnel) Returns whether User-Agent header passthrough is allowed.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if User-Agent passthrough is allowed
getAllowReferer
public boolean getAllowReferer(int tunnel) Returns whether Referer header passthrough is allowed.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if Referer passthrough is allowed
getAllowAccept
public boolean getAllowAccept(int tunnel) Returns whether Accept header passthrough is allowed.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if Accept passthrough is allowed
getAllowInternalSSL
public boolean getAllowInternalSSL(int tunnel) Returns whether internal SSL connections are allowed.- Parameters:
tunnel- index of the tunnel in the configured list, or -1 for a new tunnel- Returns:
- true if internal SSL is allowed
getMultihome
public boolean getMultihome(int tunnel) Whether multihoming is enabled.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if multihoming is enabled
getUserAgents
The user agents string.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the user agents string
getProxyAuth
public boolean getProxyAuth(int tunnel) Whether proxy authentication is enabled.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if proxy authentication is enabled
getOutproxyAuth
public boolean getOutproxyAuth(int tunnel) Whether outproxy authentication is enabled.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if outproxy authentication is enabled
getOutproxyUsername
The outproxy username.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the username, or empty string if none
getOutproxyPassword
The outproxy password.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the password, or empty string if none
getSslProxies
The SSL proxies string.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the SSL proxies string
getUseOutproxyPlugin
public boolean getUseOutproxyPlugin(int tunnel) Whether the outproxy plugin should be used.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if the outproxy plugin should be used
getOutproxyType
The outproxy type.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the proxy type as configured for the tunnel
getLimitMinute
public int getLimitMinute(int tunnel) The per-minute limit for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the per-minute limit for the tunnel
getLimitHour
public int getLimitHour(int tunnel) The per-hour limit for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the per-hour limit for the tunnel
getLimitDay
public int getLimitDay(int tunnel) The per-day limit for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the per-day limit for the tunnel
getTotalMinute
public int getTotalMinute(int tunnel) The per-minute total for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the per-minute total for the tunnel
getTotalHour
public int getTotalHour(int tunnel) The per-hour total for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the per-hour total for the tunnel
getTotalDay
public int getTotalDay(int tunnel) The per-day total for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the per-day total for the tunnel
getMaxStreams
public int getMaxStreams(int tunnel) The maximum number of streams for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the maximum number of streams for the tunnel
getPostMax
public int getPostMax(int tunnel) POST limits.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the post max
getPostTotalMax
public int getPostTotalMax(int tunnel) The POST total max for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the POST total max for the tunnel
getPostCheckTime
public int getPostCheckTime(int tunnel) The POST check time for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the POST check time for the tunnel
getPostBanTime
public int getPostBanTime(int tunnel) The POST ban time for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the POST ban time for the tunnel
getPostTotalBanTime
public int getPostTotalBanTime(int tunnel) The POST total ban time for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the POST total ban time for the tunnel
getUniqueLocal
public boolean getUniqueLocal(int tunnel) Whether unique local addresses should be used.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- true if unique local addresses should be used
isRouterContext
public boolean isRouterContext()Whether running in router context.- Returns:
- true if running in router context
interfaceSet
isAdvanced
public boolean isAdvanced()Whether advanced mode is enabled.- Returns:
- true if advanced mode is enabled
getI2CPHost
The I2CP host for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the I2CP host for the tunnel
getI2CPPort
The I2CP port for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the I2CP port for the tunnel
getCustomOptions
The custom options string for the tunnel.- Parameters:
tunnel- index of the tunnel in the configured list- Returns:
- the custom options string for the tunnel
getQuantityOptions
The quantity options for the tunnel, as HTML.- Parameters:
tunnel- index of the tunnel in the configured listmode- 0=both, 1=in, 2=out- Returns:
- the quantity options
unlessAdvanced