net.i2p.i2ptunnel.web
Class IndexBean

java.lang.Object
  extended by net.i2p.i2ptunnel.web.IndexBean
Direct Known Subclasses:
EditBean

public class IndexBean
extends java.lang.Object

Simple accessor for exposing tunnel info, but also an ugly form handler Warning - This class is not part of the i2ptunnel API, and at some point it will be moved from the jar to the war. Usage by classes outside of i2ptunnel.war is deprecated.


Field Summary
protected  I2PAppContext _context
           
protected  TunnelControllerGroup _group
           
protected  Log _log
           
protected static java.util.Set _noShowSet
           
(package private) static java.lang.String CLIENT_NICKNAME
           
static java.lang.String DEFAULT_THEME
           
static int NOT_RUNNING
           
static java.lang.String PROP_CSS_DISABLED
           
static java.lang.String PROP_JS_DISABLED
           
(package private) static java.lang.String PROP_NONCE
           
(package private) static java.lang.String PROP_NONCE_OLD
           
static java.lang.String PROP_THEME_NAME
           
static java.lang.String PROP_TUNNEL_PASSPHRASE
          deprecated unimplemented, now using routerconsole realm
static int RUNNING
           
static int STANDBY
           
static int STARTING
           
 
Constructor Summary
IndexBean()
           
 
Method Summary
 boolean allowCSS()
           
 boolean allowJS()
           
 java.lang.String getClientDestination(int tunnel)
           
 java.lang.String getClientInterface(int tunnel)
           
 java.lang.String getClientPort(int tunnel)
           
protected  TunnelController getController(int tunnel)
           
 java.lang.String getDestHashBase32(int tunnel)
           
 java.lang.String getDestinationBase64(int tunnel)
           
 java.lang.String getInternalType(int tunnel)
           
 java.lang.String getMessages()
          Executes any action requested (start/stop/etc) and dump out the messages.
 long getNextNonce()
           
 java.lang.String getServerTarget(int tunnel)
           
 java.lang.String getSharedClient(int tunnel)
           
 java.lang.String getTheme()
           
 int getTunnelCount()
           
 java.lang.String getTunnelDescription(int tunnel)
           
 java.lang.String getTunnelName(int tunnel)
           
 int getTunnelStatus(int tunnel)
           
 java.lang.String getTunnelType(int tunnel)
           
(package private)  java.lang.String getType()
           
 java.lang.String getTypeName(java.lang.String internalType)
           
 boolean isClient(int tunnelNum)
           
static boolean isClient(java.lang.String type)
           
 void setAccess(java.lang.String moo)
           
 void setAccessList(java.lang.String val)
           
 void setAction(java.lang.String action)
           
 void setCert(java.lang.String val)
           
 void setClientHost(java.lang.String host)
          I2CP host the router is on
 void setClientport(java.lang.String port)
          I2CP port the router is on
 void setClose(java.lang.String moo)
           
 void setCloseTime(java.lang.String val)
           
 void setConnectDelay(java.lang.String moo)
           
 void setCustomOptions(java.lang.String customOptions)
          what I2P session overrides should be used
 void setDelayOpen(java.lang.String moo)
           
 void setDescription(java.lang.String description)
          one line description
 void setEffort(java.lang.String val)
          params needed for hashcash and dest modification
 void setEncrypt(java.lang.String moo)
           
 void setEncryptKey(java.lang.String val)
           
 void setName(java.lang.String name)
          Short name of the tunnel
 void setNewDest(java.lang.String val)
           
 void setNonce(java.lang.String nonce)
           
 void setPassphrase(java.lang.String phrase)
          deprecated unimplemented, now using routerconsole realm
 void setPort(java.lang.String port)
          what port should this client/httpclient/ircclient listen on
 void setPrivKeyFile(java.lang.String file)
          What filename is this server tunnel's private keys stored in
 void setProfile(java.lang.String profile)
           
 void setProxyList(java.lang.String proxyList)
          what HTTP outproxies should be used (httpclient specific)
 void setReachableBy(java.lang.String reachableBy)
          what interface should this client/httpclient/ircclient listen on (unless overridden by the setReachableByOther() field)
 void setReachableByOther(java.lang.String reachableByOther)
          If specified, defines the exact IP interface to listen for requests on (in the case of client/httpclient/ircclient tunnels)
 void setReduce(java.lang.String moo)
           
 void setReduceCount(java.lang.String val)
           
 void setReduceTime(java.lang.String val)
           
 void setRemoveConfirm(java.lang.String moo)
          If called with any value (and the form submitted with action=Remove), we really do want to stop and remove the tunnel.
 void setShared(boolean val)
           
 void setShared(java.lang.String moo)
           
 void setSigner(java.lang.String val)
           
 void setSpoofedHost(java.lang.String host)
          What host does this http server tunnel spoof
 void setStartOnLoad(java.lang.String moo)
          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)
 void setTargetDestination(java.lang.String dest)
          What peer does this client tunnel point at
 void setTargetHost(java.lang.String host)
          What host does this server tunnel point at
 void setTargetPort(java.lang.String port)
          What port does this server tunnel point at
 void setTunnel(java.lang.String tunnel)
           
 void setTunnelBackupQuantity(java.lang.String tunnelBackupQuantity)
          how many tunnels to hold in reserve to guard against failures
 void setTunnelDepth(java.lang.String tunnelDepth)
          how many hops to use for inbound tunnels
 void setTunnelQuantity(java.lang.String tunnelQuantity)
          how many parallel inbound tunnels to use
 void setTunnelVariance(java.lang.String tunnelVariance)
          how much randomisation to apply to the depth of tunnels
 void setType(java.lang.String type)
          What type of tunnel (httpclient, ircclient, client, or server).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_context

protected I2PAppContext _context

_log

protected Log _log

_group

protected TunnelControllerGroup _group

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

STARTING

public static final int STARTING
See Also:
Constant Field Values

NOT_RUNNING

public static final int NOT_RUNNING
See Also:
Constant Field Values

STANDBY

public static final int STANDBY
See Also:
Constant Field Values

PROP_TUNNEL_PASSPHRASE

public static final java.lang.String PROP_TUNNEL_PASSPHRASE
deprecated unimplemented, now using routerconsole realm

See Also:
Constant Field Values

PROP_NONCE

static final java.lang.String PROP_NONCE

PROP_NONCE_OLD

static final java.lang.String PROP_NONCE_OLD

CLIENT_NICKNAME

static final java.lang.String CLIENT_NICKNAME
See Also:
Constant Field Values

PROP_THEME_NAME

public static final java.lang.String PROP_THEME_NAME
See Also:
Constant Field Values

DEFAULT_THEME

public static final java.lang.String DEFAULT_THEME
See Also:
Constant Field Values

PROP_CSS_DISABLED

public static final java.lang.String PROP_CSS_DISABLED
See Also:
Constant Field Values

PROP_JS_DISABLED

public static final java.lang.String PROP_JS_DISABLED
See Also:
Constant Field Values

_noShowSet

protected static final java.util.Set _noShowSet
Constructor Detail

IndexBean

public IndexBean()
Method Detail

getNextNonce

public long getNextNonce()

setNonce

public void setNonce(java.lang.String nonce)

setPassphrase

public void setPassphrase(java.lang.String phrase)
deprecated unimplemented, now using routerconsole realm


setAction

public void setAction(java.lang.String action)

setTunnel

public void setTunnel(java.lang.String tunnel)

getMessages

public java.lang.String getMessages()
Executes any action requested (start/stop/etc) and dump out the messages.


getTheme

public java.lang.String getTheme()

allowCSS

public boolean allowCSS()

allowJS

public boolean allowJS()

getTunnelCount

public int getTunnelCount()

isClient

public boolean isClient(int tunnelNum)

isClient

public static boolean isClient(java.lang.String type)

getTunnelName

public java.lang.String getTunnelName(int tunnel)

getClientPort

public java.lang.String getClientPort(int tunnel)

getTunnelType

public java.lang.String getTunnelType(int tunnel)

getTypeName

public java.lang.String getTypeName(java.lang.String internalType)

getInternalType

public java.lang.String getInternalType(int tunnel)

getClientInterface

public java.lang.String getClientInterface(int tunnel)

getTunnelStatus

public int getTunnelStatus(int tunnel)

getTunnelDescription

public java.lang.String getTunnelDescription(int tunnel)

getSharedClient

public java.lang.String getSharedClient(int tunnel)

getClientDestination

public java.lang.String getClientDestination(int tunnel)

getServerTarget

public java.lang.String getServerTarget(int tunnel)

getDestinationBase64

public java.lang.String getDestinationBase64(int tunnel)

getDestHashBase32

public java.lang.String getDestHashBase32(int tunnel)

setType

public void setType(java.lang.String type)
What type of tunnel (httpclient, ircclient, client, or server). This is required when adding a new tunnel.


getType

java.lang.String getType()

setName

public void setName(java.lang.String name)
Short name of the tunnel


setDescription

public void setDescription(java.lang.String description)
one line description


setClientHost

public void setClientHost(java.lang.String host)
I2CP host the router is on


setClientport

public void setClientport(java.lang.String port)
I2CP port the router is on


setTunnelDepth

public void setTunnelDepth(java.lang.String tunnelDepth)
how many hops to use for inbound tunnels


setTunnelQuantity

public void setTunnelQuantity(java.lang.String tunnelQuantity)
how many parallel inbound tunnels to use


setTunnelVariance

public void setTunnelVariance(java.lang.String tunnelVariance)
how much randomisation to apply to the depth of tunnels


setTunnelBackupQuantity

public void setTunnelBackupQuantity(java.lang.String tunnelBackupQuantity)
how many tunnels to hold in reserve to guard against failures


setCustomOptions

public void setCustomOptions(java.lang.String customOptions)
what I2P session overrides should be used


setProxyList

public void setProxyList(java.lang.String proxyList)
what HTTP outproxies should be used (httpclient specific)


setPort

public void setPort(java.lang.String port)
what port should this client/httpclient/ircclient listen on


setReachableBy

public void setReachableBy(java.lang.String reachableBy)
what interface should this client/httpclient/ircclient listen on (unless overridden by the setReachableByOther() field)


setReachableByOther

public void setReachableByOther(java.lang.String reachableByOther)
If specified, defines the exact IP interface to listen for requests on (in the case of client/httpclient/ircclient tunnels)


setTargetDestination

public void setTargetDestination(java.lang.String dest)
What peer does this client tunnel point at


setTargetHost

public void setTargetHost(java.lang.String host)
What host does this server tunnel point at


setTargetPort

public void setTargetPort(java.lang.String port)
What port does this server tunnel point at


setSpoofedHost

public void setSpoofedHost(java.lang.String host)
What host does this http server tunnel spoof


setPrivKeyFile

public void setPrivKeyFile(java.lang.String file)
What filename is this server tunnel's private keys stored in


setRemoveConfirm

public void setRemoveConfirm(java.lang.String moo)
If called with any value (and the form submitted with action=Remove), we really do want to stop and remove the tunnel.


setStartOnLoad

public void setStartOnLoad(java.lang.String moo)
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)


setShared

public void setShared(java.lang.String moo)

setShared

public void setShared(boolean val)

setConnectDelay

public void setConnectDelay(java.lang.String moo)

setProfile

public void setProfile(java.lang.String profile)

setReduce

public void setReduce(java.lang.String moo)

setClose

public void setClose(java.lang.String moo)

setEncrypt

public void setEncrypt(java.lang.String moo)

setAccess

public void setAccess(java.lang.String moo)

setDelayOpen

public void setDelayOpen(java.lang.String moo)

setNewDest

public void setNewDest(java.lang.String val)

setReduceTime

public void setReduceTime(java.lang.String val)

setReduceCount

public void setReduceCount(java.lang.String val)

setEncryptKey

public void setEncryptKey(java.lang.String val)

setAccessList

public void setAccessList(java.lang.String val)

setCloseTime

public void setCloseTime(java.lang.String val)

setEffort

public void setEffort(java.lang.String val)
params needed for hashcash and dest modification


setCert

public void setCert(java.lang.String val)

setSigner

public void setSigner(java.lang.String val)

getController

protected TunnelController getController(int tunnel)