public class TunnelController extends Object implements Logging
Modifier and Type | Field and Description |
---|---|
static String |
KEY_BACKUP_DIR |
static String |
PFX_OPTION |
static String |
PROP_DESCR
all of these @since 0.9.14
|
static String |
PROP_DEST |
static String |
PROP_FILE |
static String |
PROP_I2CP_HOST |
static String |
PROP_I2CP_PORT |
static String |
PROP_INTFC |
static String |
PROP_LISTEN_PORT |
static String |
PROP_NAME |
static String |
PROP_PROXIES |
static String |
PROP_SHARED |
static String |
PROP_SPOOFED_HOST |
static String |
PROP_START |
static String |
PROP_TARGET_HOST |
static String |
PROP_TARGET_PORT |
static String |
PROP_TYPE |
static String |
TYPE_CONNECT
all of these @since 0.9.14
|
static String |
TYPE_HTTP_BIDIR_SERVER |
static String |
TYPE_HTTP_CLIENT |
static String |
TYPE_HTTP_SERVER |
static String |
TYPE_IRC_CLIENT |
static String |
TYPE_IRC_SERVER |
static String |
TYPE_SOCKS |
static String |
TYPE_SOCKS_IRC |
static String |
TYPE_STD_CLIENT |
static String |
TYPE_STD_SERVER |
static String |
TYPE_STREAMR_CLIENT |
static String |
TYPE_STREAMR_SERVER |
Constructor and Description |
---|
TunnelController(Properties config,
String prefix)
Create a new controller for a tunnel out of the specific config options.
|
TunnelController(Properties config,
String prefix,
boolean createKey) |
Modifier and Type | Method and Description |
---|---|
List<String> |
clearMessages()
Pull off any messages that the I2PTunnel has produced
|
Properties |
getClientOptionProps()
These are the ones stored with a prefix of "option."
|
String |
getClientOptions()
Deprecated.
why would you want this? Use getClientOptionProps() instead
|
Properties |
getConfig(String prefix) |
String |
getDescription() |
String |
getI2CPHost() |
String |
getI2CPPort() |
boolean |
getIsRunning() |
boolean |
getIsStandby()
if running but no open sessions, we are in standby
|
boolean |
getIsStarting() |
String |
getListenOnInterface() |
String |
getListenPort() |
String |
getMyDestHashBase32() |
String |
getMyDestination() |
String |
getName() |
boolean |
getPersistentClientKey() |
String |
getPrivKeyFile() |
String |
getProxyList() |
String |
getSharedClient()
default true
|
String |
getSpoofedHost() |
boolean |
getStartOnLoad()
default true
|
void |
getSummary(StringBuilder buf)
Deprecated.
unused
|
String |
getTargetDestination() |
String |
getTargetHost() |
String |
getTargetPort() |
String |
getType() |
void |
log(String s) |
void |
restartTunnel() |
void |
setConfig(Properties config,
String prefix)
As of 0.9.1, updates the options on an existing session
|
void |
startTunnel()
Start up the tunnel (if it isn't already running)
|
void |
startTunnelBackground() |
void |
stopTunnel() |
public static final String KEY_BACKUP_DIR
public static final String PROP_DESCR
public static final String PROP_DEST
public static final String PROP_I2CP_HOST
public static final String PROP_I2CP_PORT
public static final String PROP_INTFC
public static final String PROP_FILE
public static final String PROP_LISTEN_PORT
public static final String PROP_NAME
public static final String PROP_PROXIES
public static final String PROP_SHARED
public static final String PROP_SPOOFED_HOST
public static final String PROP_START
public static final String PROP_TARGET_HOST
public static final String PROP_TARGET_PORT
public static final String PROP_TYPE
public static final String PFX_OPTION
public static final String TYPE_CONNECT
public static final String TYPE_HTTP_BIDIR_SERVER
public static final String TYPE_HTTP_CLIENT
public static final String TYPE_HTTP_SERVER
public static final String TYPE_IRC_CLIENT
public static final String TYPE_IRC_SERVER
public static final String TYPE_SOCKS
public static final String TYPE_SOCKS_IRC
public static final String TYPE_STD_CLIENT
public static final String TYPE_STD_SERVER
public static final String TYPE_STREAMR_CLIENT
public static final String TYPE_STREAMR_SERVER
public TunnelController(Properties config, String prefix)
config
- original key=value mapping non-nullprefix
- beginning of key values that are relevant to this tunnelpublic TunnelController(Properties config, String prefix, boolean createKey)
config
- original key=value mapping non-nullprefix
- beginning of key values that are relevant to this tunnelcreateKey
- for servers, whether we want to create a brand new destination
with private keys at the location specified or not (does not
overwrite existing ones)public void startTunnelBackground()
public void startTunnel()
public Properties getClientOptionProps()
public void stopTunnel()
public void restartTunnel()
public void setConfig(Properties config, String prefix)
public Properties getConfig(String prefix)
public String getType()
public String getName()
public String getDescription()
public String getI2CPHost()
public String getI2CPPort()
public String getClientOptions()
public String getListenOnInterface()
public String getTargetHost()
public String getTargetPort()
public String getSpoofedHost()
public String getPrivKeyFile()
public String getListenPort()
public String getTargetDestination()
public String getProxyList()
public String getSharedClient()
public boolean getStartOnLoad()
public boolean getPersistentClientKey()
public String getMyDestination()
public String getMyDestHashBase32()
public boolean getIsRunning()
public boolean getIsStarting()
public boolean getIsStandby()
public void getSummary(StringBuilder buf)