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


Field Summary
protected  I2PAppContext _context
           
protected  TunnelControllerGroup _group
           
protected  Log _log
           
(package private) static java.lang.String CLIENT_NICKNAME
           
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
           
static java.lang.String PROP_THEME_NAME
           
static java.lang.String PROP_TUNNEL_PASSPHRASE
           
static int RUNNING
           
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 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)
           
 void setAction(java.lang.String action)
           
 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 setConnectDelay(java.lang.String moo)
           
 void setCustomOptions(java.lang.String customOptions)
          what I2P session overrides should be used
 void setDescription(java.lang.String description)
          one line description
 void setName(java.lang.String name)
          Short name of the tunnel
 void setNonce(java.lang.String nonce)
           
 void setPassphrase(java.lang.String phrase)
           
 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 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 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

PROP_TUNNEL_PASSPHRASE

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

PROP_NONCE

static final java.lang.String PROP_NONCE

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

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
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)

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)

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)

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)

getController

protected TunnelController getController(int tunnel)