public class I2PTunnelIRCServer extends I2PTunnelServer implements Runnable
Enables IRC servers to track users across nick changes. Requires IRC daemon to use client-provided hostname rather than IP. Many IRCds ignore hostname in USER message (easily spoofed) unless from another server. May require IRCd configuration; not configurable in unrealircd/ngircd.
Destination mangling options (in i2ptunnel custom options):
ircserver.method unset: Defaults to user method ircserver.method=user: Use described method ircserver.method=webirc: Use WEBIRC protocol ircserver.cloakKey unset: Random persistent cloaking (default) ircserver.cloakKey=pass: Consistent cloaking via passphrase hash ircserver.webircPassword=pw: WEBIRC protocol password ircserver.webircSpoofIP=IP: Spoofed IP for WEBIRC ircserver.fakeHostname=%f.b32.i2p: Fake hostname (%f=full B32, %c=cloaked)Note: No quotes/spaces in passphrase for GUI compatibility. No outbound filtering.
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_CLOAK |
static String |
PROP_HOSTNAME |
static String |
PROP_HOSTNAME_DEFAULT |
static String |
PROP_METHOD |
static String |
PROP_METHOD_DEFAULT |
static String |
PROP_WEBIRC_PASSWORD |
static String |
PROP_WEBIRC_SPOOF_IP |
static String |
PROP_WEBIRC_SPOOF_IP_DEFAULT |
__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 |
|---|
I2PTunnelIRCServer(InetAddress host,
int port,
File privkey,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
blockingHandle(I2PSocket socket)
This is run in a thread from a limited-size thread pool via Handler.run(),
except for a standard server (this class, no extension, as determined in getUsePool()),
it is run directly in the acceptor thread (see run()).
|
close, destroy, getReadTimeout, getSocket, getSocket, getSocketString, optionsUpdated, run, setReadTimeout, shutdownAndAwaitTermination, startRunningconnected, disconnected, errorOccurred, getBooleanOption, getId, getTunnel, isOpen, reportAbuse, routerDisconnected, setId, setName, setTunnel, toStringattachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValuepublic static final String PROP_CLOAK
public static final String PROP_HOSTNAME
public static final String PROP_HOSTNAME_DEFAULT
public static final String PROP_METHOD
public static final String PROP_METHOD_DEFAULT
public static final String PROP_WEBIRC_PASSWORD
public static final String PROP_WEBIRC_SPOOF_IP
public static final String PROP_WEBIRC_SPOOF_IP_DEFAULT
public I2PTunnelIRCServer(InetAddress host, int port, File privkey, String privkeyname, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
IllegalArgumentException - if the I2PTunnel does not contain
valid config to contact the routerprotected void blockingHandle(I2PSocket socket)
I2PTunnelServerThis method is called by the server socket's acceptance thread when a new I2P connection arrives. It creates a local TCP socket connection and spawns an I2PTunnelRunner to handle bidirectional data streaming between the I2P and TCP connections.
Implementation Notes:
Error Handling: SocketException and IOException are caught and logged, with the socket being reset to notify the peer of the failure.
blockingHandle in class I2PTunnelServersocket - the incoming I2P connection from a remote peer; never nullI2PTunnelServer.getSocket(Hash, int),
I2PTunnelRunner