public class I2PTunnelHTTPBidirServer extends I2PTunnelHTTPServer
Extends I2PTunnelHTTPServer to provide both inbound and outbound HTTP connectivity through I2P. Creates a server tunnel for receiving requests and a client tunnel (proxy) for outbound requests, enabling bidirectional HTTP communication through a single I2P destination.
This class manages two tunnel components:
Useful for applications requiring both server and client HTTP capabilities through I2P, such as web applications making external API calls.
I2PTunnelHTTPServer,
I2PTunnelHTTPBidirProxyDEFAULT_POST_BAN_TIME, DEFAULT_POST_MAX, DEFAULT_POST_TOTAL_BAN_TIME, DEFAULT_POST_TOTAL_MAX, DEFAULT_POST_WINDOW, ERR_FORBIDDEN, ERR_NOT_FOUND, ERR_REQUEST_TIMEOUT, OPT_ADD_RESPONSE_HEADER_ALLOW, OPT_ADD_RESPONSE_HEADER_CACHE_CONTROL, OPT_ADD_RESPONSE_HEADER_NOSNIFF, OPT_ADD_RESPONSE_HEADER_REFERRER_POLICY, OPT_KEEPALIVE, OPT_POST_BAN_TIME, OPT_POST_MAX, OPT_POST_TOTAL_BAN_TIME, OPT_POST_TOTAL_MAX, OPT_POST_WINDOW, OPT_REJECT_INPROXY, OPT_REJECT_REFERER, OPT_REJECT_USER_AGENTS, OPT_USER_AGENTS__serverId, _clientExecutor, _log, bidir, i2pss, l, localPort, PROP_ALT_PKF, PROP_UNIQUE_LOCAL, PROP_USE_SSL, readTimeout, remoteHost, remotePort, slock, sockMgr, sslLock, taskopen, tunnel| Constructor and Description |
|---|
I2PTunnelHTTPBidirServer(InetAddress host,
int port,
int proxyport,
File privkey,
String privkeyname,
String spoofHost,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Creates a bidirectional HTTP server tunnel with a private key file.
|
I2PTunnelHTTPBidirServer(InetAddress host,
int port,
int proxyport,
InputStream privData,
String privkeyname,
String spoofHost,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Creates a bidirectional HTTP server tunnel with an input stream for the private key.
|
I2PTunnelHTTPBidirServer(InetAddress host,
int port,
int proxyport,
String privData,
String spoofHost,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Creates a bidirectional HTTP server tunnel.
|
addEntry, blockingHandle, close, formatHeaders, formatHeadersCompact, optionsUpdated, readHeaders, readHeaders, setEntry, startRunningdestroy, getReadTimeout, getSocket, getSocket, getSocketString, run, setReadTimeout, shutdownAndAwaitTerminationconnected, disconnected, errorOccurred, getBooleanOption, getId, getTunnel, isOpen, reportAbuse, routerDisconnected, setId, setName, setTunnel, toStringattachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValuepublic I2PTunnelHTTPBidirServer(InetAddress host, int port, int proxyport, File privkey, String privkeyname, String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
host - the local InetAddress to bind the server toport - the local port for incoming HTTP server connectionsproxyport - the local port for the outbound HTTP proxyprivkey - File containing Base64-encoded private key dataprivkeyname - the name of the private key file (for logging)spoofHost - the spoofed hostname for the server destinationl - the Logging instance for status messagesnotifyThis - the EventDispatcher for tunnel eventstunnel - the parent I2PTunnel instanceIllegalArgumentException - if the key file cannot be readpublic I2PTunnelHTTPBidirServer(InetAddress host, int port, int proxyport, InputStream privData, String privkeyname, String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
host - the local InetAddress to bind the server toport - the local port for incoming HTTP server connectionsproxyport - the local port for the outbound HTTP proxyprivData - InputStream containing Base64-encoded private key dataprivkeyname - the name of the private key (for logging)spoofHost - the spoofed hostname for the server destinationl - the Logging instance for status messagesnotifyThis - the EventDispatcher for tunnel eventstunnel - the parent I2PTunnel instanceIllegalArgumentException - if the key data is invalidpublic I2PTunnelHTTPBidirServer(InetAddress host, int port, int proxyport, String privData, String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
The server listens for incoming HTTP connections on the specified port, while the client proxy handles outbound requests through a separate port.
host - the local InetAddress to bind the server to (usually null/0.0.0.0)port - the local port for incoming HTTP server connectionsproxyport - the local port for the outbound HTTP proxyprivData - Base64-encoded private key data for the I2P destinationspoofHost - the spoofed hostname for the server destinationl - the Logging instance for status messagesnotifyThis - the EventDispatcher for tunnel eventstunnel - the parent I2PTunnel instanceIllegalArgumentException - if the I2CP configuration is invalid