public class TunnelConfig extends Object
Modifier and Type | Field and Description |
---|---|
protected I2PAppContext |
_context |
static Set<String> |
_nonProxyNoShowSet |
static Set<String> |
_noShowSet |
protected static String |
PROP_ENABLE_ACCESS_LIST |
protected static String |
PROP_ENABLE_BLACKLIST |
static String |
PROP_MAX_CONNS_DAY |
static String |
PROP_MAX_CONNS_HOUR |
static String |
PROP_MAX_CONNS_MIN
all of these are @since 0.8.3 (moved from IndexBean)
|
static String |
PROP_MAX_STREAMS |
static String |
PROP_MAX_TOTAL_CONNS_DAY |
static String |
PROP_MAX_TOTAL_CONNS_HOUR |
static String |
PROP_MAX_TOTAL_CONNS_MIN |
static String |
SHARED_CLIENT_NICKNAME |
Constructor and Description |
---|
TunnelConfig() |
Modifier and Type | Method and Description |
---|---|
Properties |
getConfig()
Based on all provided data, create a set of configuration parameters
suitable for use in a TunnelController.
|
String |
getPrivKeyFile() |
String |
getType() |
void |
setAccessList(String val) |
void |
setAccessMode(int mode)
Controls how other tunnels are checked for access.
|
void |
setAllowAccept(boolean val) |
void |
setAllowInternalSSL(boolean val) |
void |
setAllowReferer(boolean val) |
void |
setAllowUserAgent(boolean val) |
void |
setClientHost(String host)
I2CP host the router is on, ignored when in router context
|
void |
setClientPort(String port)
I2CP port the router is on, ignored when in router context
|
void |
setClose(boolean val) |
void |
setCloseTime(int val) |
void |
setConnectDelay(boolean val) |
void |
setCustomOptions(String customOptions)
what I2P session overrides should be used
|
void |
setDCC(boolean val) |
void |
setDelayOpen(boolean val) |
void |
setDescription(String description)
one line description
|
void |
setDestination(Destination dest)
This is easier than requiring TunnelConfig to talk to
TunnelControllerGroup and TunnelController.
|
void |
setEncrypt(boolean val) |
void |
setEncryptKey(String val) |
void |
setInboundRandomKey(String s)
Random keys
|
void |
setJumpList(String val) |
void |
setLeaseSetPrivateKey(String s) |
void |
setLeaseSetSigningPrivateKey(String s) |
void |
setLimitDay(int val) |
void |
setLimitHour(int val) |
void |
setLimitMinute(int val) |
void |
setMaxStreams(int val) |
void |
setMultihome(boolean val) |
void |
setName(String name)
Short name of the tunnel
|
void |
setNewDest(int mode)
Controls how ephemeral the I2P Destination of a client tunnel is.
|
void |
setOutboundRandomKey(String s) |
void |
setOutproxyAuth(boolean val)
Sets whether authentication is required for any of the configured
outproxies.
|
void |
setOutproxyPassword(String s) |
void |
setOutproxyUsername(String s) |
void |
setPort(int port)
what port should this client/httpclient/ircclient listen on
|
void |
setPostBanTime(int val) |
void |
setPostCheckTime(int val) |
void |
setPostMax(int val)
POST limits
|
void |
setPostTotalBanTime(int val) |
void |
setPostTotalMax(int val) |
void |
setPrivKeyFile(String file)
What filename is this server tunnel's private keys stored in
|
void |
setProfile(String profile) |
void |
setProxyAuth(String authType)
Sets whether authentication should be used for client proxy tunnels.
|
void |
setProxyList(String proxyList)
what HTTP outproxies should be used (httpclient specific)
|
void |
setProxyPassword(String s) |
void |
setProxyUsername(String s) |
void |
setReachableBy(String reachableBy)
what interface should this client/httpclient/ircclient listen on
|
void |
setReduce(boolean val) |
void |
setReduceCount(int val) |
void |
setReduceTime(int val) |
void |
setRejectInproxy(boolean val) |
void |
setRejectReferer(boolean val) |
void |
setRejectUserAgents(boolean val) |
void |
setShared(boolean val) |
void |
setSigType(String val) |
void |
setSpoofedHost(String host)
What host does this http server tunnel spoof
|
void |
setSslProxies(String s) |
void |
setStartOnLoad(boolean 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)
|
void |
setTargetDestination(String dest)
What peer does this client tunnel point at
|
void |
setTargetHost(String host)
What host does this server tunnel point at
|
void |
setTargetPort(int port)
What port does this server tunnel point at
|
void |
setTotalDay(int val) |
void |
setTotalHour(int val) |
void |
setTotalMinute(int val) |
void |
setTunnelBackupQuantity(int tunnelBackupQuantity)
how many tunnels to hold in reserve to guard against failures
|
void |
setTunnelDepth(int tunnelDepth)
how many hops to use for inbound tunnels
|
void |
setTunnelQuantity(int tunnelQuantity)
how many parallel inbound tunnels to use
|
void |
setTunnelVariance(int tunnelVariance)
how much randomisation to apply to the depth of tunnels
|
void |
setType(String type)
What type of tunnel (httpclient, ircclient, client, or server).
|
void |
setUniqueLocal(boolean val) |
void |
setUseOutproxyPlugin(boolean val) |
void |
setUserAgents(String val) |
void |
setUseSSL(boolean val) |
void |
updateTunnelQuantities(Properties config)
Update tunnel quantities for the provided config from this TunnelConfig.
|
public static final String SHARED_CLIENT_NICKNAME
protected final I2PAppContext _context
protected static final String PROP_ENABLE_ACCESS_LIST
protected static final String PROP_ENABLE_BLACKLIST
public static final String PROP_MAX_CONNS_MIN
public static final String PROP_MAX_CONNS_HOUR
public static final String PROP_MAX_CONNS_DAY
public static final String PROP_MAX_TOTAL_CONNS_MIN
public static final String PROP_MAX_TOTAL_CONNS_HOUR
public static final String PROP_MAX_TOTAL_CONNS_DAY
public static final String PROP_MAX_STREAMS
public void setType(String type)
public String getType()
public void setName(String name)
public void setDescription(String description)
public void setClientHost(String host)
public void setClientPort(String port)
public void setTunnelDepth(int tunnelDepth)
public void setTunnelQuantity(int tunnelQuantity)
public void setTunnelVariance(int tunnelVariance)
public void setTunnelBackupQuantity(int tunnelBackupQuantity)
public void setCustomOptions(String customOptions)
public void setProxyList(String proxyList)
public void setPort(int port)
public void setReachableBy(String reachableBy)
public void setTargetDestination(String dest)
public void setTargetHost(String host)
public void setTargetPort(int port)
public void setSpoofedHost(String host)
public void setPrivKeyFile(String file)
public String getPrivKeyFile()
public void setStartOnLoad(boolean val)
public void setShared(boolean val)
public void setConnectDelay(boolean val)
public void setProfile(String profile)
public void setReduce(boolean val)
public void setClose(boolean val)
public void setEncrypt(boolean val)
public void setDCC(boolean val)
public void setUseSSL(boolean val)
public void setRejectInproxy(boolean val)
public void setRejectReferer(boolean val)
public void setRejectUserAgents(boolean val)
public void setUserAgents(String val)
public void setUniqueLocal(boolean val)
public void setAccessMode(int mode)
The list used for whitelisting/blacklisting can be set with
setAccessList(String)
.
mode
- 0 for no control, 1 for whitelist, 2 for blacklistpublic void setDelayOpen(boolean val)
public void setNewDest(int mode)
If setClose(boolean)
is set to false then mode 1 == mode 0.
mode
- 0 for new dest on restart, 1 for new dest on resume from idle, 2 for persistent keypublic void setReduceTime(int val)
public void setReduceCount(int val)
public void setEncryptKey(String val)
public void setAccessList(String val)
public void setJumpList(String val)
public void setCloseTime(int val)
public void setAllowUserAgent(boolean val)
public void setAllowReferer(boolean val)
public void setAllowAccept(boolean val)
public void setAllowInternalSSL(boolean val)
public void setMultihome(boolean val)
public void setProxyAuth(String authType)
authType
- the authentication type, or "false" for no authenticationpublic void setProxyUsername(String s)
public void setProxyPassword(String s)
public void setOutproxyAuth(boolean val)
val
- true if authentication is required, false otherwisepublic void setOutproxyUsername(String s)
public void setOutproxyPassword(String s)
public void setSslProxies(String s)
public void setUseOutproxyPlugin(boolean val)
public void setLimitMinute(int val)
public void setLimitHour(int val)
public void setLimitDay(int val)
public void setTotalMinute(int val)
public void setTotalHour(int val)
public void setTotalDay(int val)
public void setMaxStreams(int val)
public void setPostMax(int val)
public void setPostTotalMax(int val)
public void setPostCheckTime(int val)
public void setPostBanTime(int val)
public void setPostTotalBanTime(int val)
public void setSigType(String val)
public void setInboundRandomKey(String s)
public void setOutboundRandomKey(String s)
public void setLeaseSetSigningPrivateKey(String s)
public void setLeaseSetPrivateKey(String s)
public void setDestination(Destination dest)
dest
- the current Destination for this tunnel.public Properties getConfig()
public void updateTunnelQuantities(Properties config)
config
- the config to update.