public class TunnelConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
protected I2PAppContext | _context |
(package private) static Set<String> | _nonProxyNoShowSetnon proxy no show set |
(package private) static Set<String> | _noShowSetno show set |
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_MINStreaming connection limit properties, 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_NICKNAMENickname for the shared client tunnel config. |
| Constructor and Description |
|---|
TunnelConfig()Creates an empty config, using the global context. |
| Modifier and Type | Method and Description |
|---|---|
void | addClientKeys(String[] s)Multiple entries in form
Handles either order addClientName/addClientKey |
void | addClientNames(String[] s)Multiple entries in form |
Properties | getConfig()Based on all provided data, create a set of configuration parameters
suitable for use in a TunnelController. |
String | getPrivKeyFile()The filename of the private key file. |
int | getShutdownDelayMax()The maximum shutdown delay in seconds. |
int | getShutdownDelayMin()The minimum shutdown delay in seconds. |
int | getStartupDelayMax()The maximum startup delay in seconds. |
int | getStartupDelayMin()The minimum startup delay in seconds. |
String | getType()The type of tunnel. |
void | newClientKey(String s)Handles either order newClientName/newClientKey |
void | newClientName(String s)Handles either order newClientName/newClientKey |
void | revokeClients(String[] s)Multiple entries in form |
void | setAccessList(String val)Comma-separated list of destinations to whitelist or blacklist |
void | setAccessMode(int mode)Controls how other tunnels are checked for access. |
void | setAddClient(boolean val) |
void | setAllowAccept(boolean val)Allow the Accept header to pass through the HTTP client |
void | setAllowInternalSSL(boolean val)Allow SSL connections through the HTTP client |
void | setAllowReferer(boolean val)Allow the Referer header to pass through the HTTP client |
void | setAllowUserAgent(boolean val)Allow the User-Agent header to pass through the HTTP client |
void | setAltPrivKeyFile(String file)What filename is this server tunnel's alternate private keys stored in |
void | setBlindedPassword(String s) |
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)Close connections when idle |
void | setCloseTime(int val)Idle time in minutes before closing connections |
void | setConnectDelay(boolean val)Delay the connection to the target until the first client connects. |
void | setCustomOptions(String customOptions)what I2P session overrides should be used |
void | setDCC(boolean val)Allow DCC in IRC clients |
void | setDelayOpen(boolean val)Delay opening to the target until the first client connects |
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)Encrypt the lease set |
void | setEncryptKey(String val)Key for encrypting the lease set |
void | setEncryptMode(int mode) |
void | setEncType(String val)Adds to existing, comma separated |
void | setFilterDefinition(String filterDefinition) |
void | setInboundRandomKey(String s)Random key for inbound tunnels |
void | setJumpList(String val)Comma-separated list of HTTP outproxy jump servers |
void | setLeaseSetPrivateKey(String s)Private key used to encrypt the lease set |
void | setLeaseSetSigningPrivateKey(String s)Private key used to sign the lease set |
void | setLimitDay(int val)Max connections per day |
void | setLimitHour(int val)Max connections per hour |
void | setLimitMinute(int val)Max connections per minute |
void | setMaxStreams(int val)Max concurrent streams |
void | setMultihome(boolean val)Bundle reply info for multihoming |
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)Random key for outbound tunnels |
void | setOutproxyAuth(boolean val)Sets whether authentication is required for any of the configured
outproxies. |
void | setOutproxyPassword(String s)Password for outproxy authentication |
void | setOutproxyType(String s)Set the type of the outproxy. |
void | setOutproxyUsername(String s)Username for outproxy authentication |
void | setPort(int port)what port should this client/httpclient/ircclient listen on |
void | setPostBanTime(int val)POST ban duration in minutes |
void | setPostCheckTime(int val)POST check window in minutes |
void | setPostMax(int val)POST limits |
void | setPostTotalBanTime(int val)Total POST ban duration in minutes |
void | setPostTotalMax(int val)Max total POST size in the check window |
void | setPrivKeyFile(String file)Set the private key filename for this server tunnel. |
void | setProfile(String profile)Streaming profile, only "interactive" has an effect |
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)Password for client proxy authentication |
void | setProxyUsername(String s)Username for client proxy authentication |
void | setReachableBy(String reachableBy)what interface should this client/httpclient/ircclient listen on |
void | setReduce(boolean val)Reduce the number of connections when idle |
void | setReduceCount(int val)Number of connections to reduce to when idle |
void | setReduceTime(int val)Idle time in minutes before reducing connections |
void | setRejectInproxy(boolean val)Reject requests from inproxies |
void | setRejectReferer(boolean val) |
void | setRejectUserAgents(boolean val) |
void | setShared(boolean val)Share the private key with other client tunnels. |
void | setShutdownDelayMax(int val)The maximum shutdown delay in seconds for server tunnels. |
void | setShutdownDelayMin(int val)The minimum shutdown delay in seconds for server tunnels. |
void | setSigType(String val)Signature type for the destination |
void | setSpoofedHost(String host)What host does this http server tunnel spoof |
void | setSslProxies(String s)Comma-separated list of SSL-capable outproxies |
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 | setStartupDelayMax(int val)The maximum startup delay in seconds for server tunnels. |
void | setStartupDelayMin(int val)The minimum startup delay in seconds for server tunnels. |
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)Max total connections per day |
void | setTotalHour(int val)Max total connections per hour |
void | setTotalMinute(int val)Max total connections per minute |
void | setTunnelBackupQuantity(int tunnelBackupQuantity)how many tunnels to hold in reserve to guard against failures
In or both in/out |
void | setTunnelBackupQuantityOut(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
In or both in/out |
void | setTunnelDepthOut(int tunnelDepth)how many hops to use for outbound tunnels |
void | setTunnelQuantity(int tunnelQuantity)how many parallel inbound tunnels to use
In or both in/out |
void | setTunnelQuantityOut(int tunnelQuantity)how many parallel outbound tunnels to use |
void | setTunnelVariance(int tunnelVariance)how much randomisation to apply to the depth of tunnels
In or both in/out |
void | setTunnelVarianceOut(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)Assign unique local hostnames for destination lookup |
void | setUseOutproxyPlugin(boolean val)Use the outproxy plugin for HTTP requests |
void | setUserAgents(String val) |
void | setUseSSL(boolean val)Use SSL on the server port |
void | updateTunnelQuantities(Properties config)Update tunnel quantities for the provided config from this TunnelConfig. |
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_DAY
public static final String PROP_MAX_CONNS_HOUR
public static final String PROP_MAX_CONNS_MIN
public static final String PROP_MAX_STREAMS
public static final String PROP_MAX_TOTAL_CONNS_DAY
public static final String PROP_MAX_TOTAL_CONNS_HOUR
public static final String PROP_MAX_TOTAL_CONNS_MIN
public static final String SHARED_CLIENT_NICKNAME
public TunnelConfig()
public void addClientKeys(String[] s)
public void addClientNames(String[] s)
public Properties getConfig()
public String getPrivKeyFile()
public int getShutdownDelayMax()
public int getShutdownDelayMin()
public int getStartupDelayMax()
public int getStartupDelayMin()
public String getType()
public void newClientKey(String s)
public void newClientName(String s)
public void revokeClients(String[] s)
public void setAccessList(String 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 setAddClient(boolean val)
public void setAllowAccept(boolean val)
public void setAllowInternalSSL(boolean val)
public void setAllowReferer(boolean val)
public void setAllowUserAgent(boolean val)
public void setAltPrivKeyFile(String file)
public void setBlindedPassword(String s)
public void setClientHost(String host)
public void setClientPort(String port)
public void setClose(boolean val)
public void setCloseTime(int val)
public void setConnectDelay(boolean val)
val - true to delay the connection to the target until the first client connectspublic void setCustomOptions(String customOptions)
public void setDCC(boolean val)
public void setDelayOpen(boolean val)
public void setDescription(String description)
public void setDestination(Destination dest)
dest - the current Destination for this tunnel.public void setEncrypt(boolean val)
public void setEncryptKey(String val)
public void setEncryptMode(int mode)
public void setEncType(String val)
public void setFilterDefinition(String filterDefinition)
public void setInboundRandomKey(String s)
public void setJumpList(String val)
public void setLeaseSetPrivateKey(String s)
public void setLeaseSetSigningPrivateKey(String s)
public void setLimitDay(int val)
public void setLimitHour(int val)
public void setLimitMinute(int val)
public void setMaxStreams(int val)
public void setMultihome(boolean val)
public void setName(String name)
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 setOutboundRandomKey(String s)
public void setOutproxyAuth(boolean val)
val - true if authentication is required, false otherwisepublic void setOutproxyPassword(String s)
public void setOutproxyType(String s)
s - "connect" or "socks"public void setOutproxyUsername(String s)
public void setPort(int port)
public void setPostBanTime(int val)
public void setPostCheckTime(int val)
public void setPostMax(int val)
public void setPostTotalBanTime(int val)
public void setPostTotalMax(int val)
public void setPrivKeyFile(String file)
file - the private key filename, or null to clearpublic void setProfile(String profile)
public void setProxyAuth(String authType)
authType - the authentication type, or "false" for no authenticationpublic void setProxyList(String proxyList)
public void setProxyPassword(String s)
public void setProxyUsername(String s)
public void setReachableBy(String reachableBy)
public void setReduce(boolean val)
public void setReduceCount(int val)
public void setReduceTime(int val)
public void setRejectInproxy(boolean val)
public void setRejectReferer(boolean val)
public void setRejectUserAgents(boolean val)
public void setShared(boolean val)
val - true to share the private key with other client tunnelspublic void setShutdownDelayMax(int val)
val - the maximum shutdown delay in seconds for server tunnelspublic void setShutdownDelayMin(int val)
val - the minimum shutdown delay in seconds for server tunnelspublic void setSigType(String val)
public void setSpoofedHost(String host)
public void setSslProxies(String s)
public void setStartOnLoad(boolean val)
public void setStartupDelayMax(int val)
val - the maximum startup delay in seconds for server tunnelspublic void setStartupDelayMin(int val)
val - the minimum startup delay in seconds for server tunnelspublic void setTargetDestination(String dest)
public void setTargetHost(String host)
public void setTargetPort(int port)
public void setTotalDay(int val)
public void setTotalHour(int val)
public void setTotalMinute(int val)
public void setTunnelBackupQuantity(int tunnelBackupQuantity)
public void setTunnelBackupQuantityOut(int tunnelBackupQuantity)
public void setTunnelDepth(int tunnelDepth)
public void setTunnelDepthOut(int tunnelDepth)
public void setTunnelQuantity(int tunnelQuantity)
public void setTunnelQuantityOut(int tunnelQuantity)
public void setTunnelVariance(int tunnelVariance)
public void setTunnelVarianceOut(int tunnelVariance)
public void setType(String type)
public void setUniqueLocal(boolean val)
public void setUseOutproxyPlugin(boolean val)
public void setUserAgents(String val)
public void setUseSSL(boolean val)
public void updateTunnelQuantities(Properties config)
config - the configuration