net.i2p.i2ptunnel
Class I2PTunnelHTTPServer

java.lang.Object
  extended by net.i2p.i2ptunnel.I2PTunnelTask
      extended by net.i2p.i2ptunnel.I2PTunnelServer
          extended by net.i2p.i2ptunnel.I2PTunnelHTTPServer
All Implemented Interfaces:
java.lang.Runnable, EventDispatcher
Direct Known Subclasses:
I2PTunnelHTTPBidirServer

public class I2PTunnelHTTPServer
extends I2PTunnelServer

Simple extension to the I2PTunnelServer that filters the HTTP headers sent from the client to the server, replacing the Host header with whatever this instance has been configured with, and if the browser set Accept-encoding: x-i2p-gzip, gzip the http message body and set Content-encoding: x-i2p-gzip.


Field Summary
 
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelServer
__serverId, bidir, i2pss, localPort, readTimeout, remoteHost, remotePort, slock, sockMgr, task
 
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelTask
open
 
Constructor Summary
I2PTunnelHTTPServer(java.net.InetAddress host, int port, java.io.File privkey, java.lang.String privkeyname, java.lang.String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
           
I2PTunnelHTTPServer(java.net.InetAddress host, int port, java.io.InputStream privData, java.lang.String privkeyname, java.lang.String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
           
I2PTunnelHTTPServer(java.net.InetAddress host, int port, java.lang.String privData, java.lang.String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
           
 
Method Summary
protected  void blockingHandle(I2PSocket socket)
          Called by the thread pool of I2PSocket handlers
 
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelServer
close, getHandlerCount, getReadTimeout, run, setReadTimeout, shouldUsePool, startRunning
 
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelTask
attachEventDispatcher, detachEventDispatcher, disconnected, errorOccurred, getEventDispatcher, getEvents, getEventValue, getId, getTunnel, ignoreEvents, isOpen, notifyEvent, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString, unIgnoreEvents, waitEventValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

I2PTunnelHTTPServer

public I2PTunnelHTTPServer(java.net.InetAddress host,
                           int port,
                           java.lang.String privData,
                           java.lang.String spoofHost,
                           Logging l,
                           EventDispatcher notifyThis,
                           I2PTunnel tunnel)

I2PTunnelHTTPServer

public I2PTunnelHTTPServer(java.net.InetAddress host,
                           int port,
                           java.io.File privkey,
                           java.lang.String privkeyname,
                           java.lang.String spoofHost,
                           Logging l,
                           EventDispatcher notifyThis,
                           I2PTunnel tunnel)

I2PTunnelHTTPServer

public I2PTunnelHTTPServer(java.net.InetAddress host,
                           int port,
                           java.io.InputStream privData,
                           java.lang.String privkeyname,
                           java.lang.String spoofHost,
                           Logging l,
                           EventDispatcher notifyThis,
                           I2PTunnel tunnel)
Method Detail

blockingHandle

protected void blockingHandle(I2PSocket socket)
Called by the thread pool of I2PSocket handlers

Overrides:
blockingHandle in class I2PTunnelServer