Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Freenet.contrib.fproxy
Class ProxyServer  view ProxyServer download ProxyServer.java

java.lang.Object
  extended byFreenet.contrib.fproxy.ProxyServer

public class ProxyServer
extends java.lang.Object

The main ProxyServer class. It listens for incoming HTTP connections on -listenPort (default 80), extracts the Freenet key, and issues a proxy request on the web client's behalf to the Freenet node at -serverAddress (default tcp/localhost:19114). The reply is streamed directly over the HTTP connection back to the web client, with the appropriate MIME type (currently, always text/plain). Any errors are also reported to the web client.


Field Summary
private static long defaultHopsToLive
           
private static int defaultListenPort
           
private static int defaultLogging
           
private static java.lang.String defaultServerAddress
           
private static int defaultVerbosity
           
 long hopsToLive
           
 int listenPort
           
 java.io.PrintStream Lout
           
 java.lang.String serverAddress
           
 
Constructor Summary
ProxyServer(int port, java.lang.String addr, long htl)
          Constructor which stores the invocation parameters of this ProxyServer.
 
Method Summary
static void main(java.lang.String[] args)
           
static void usage()
          Print usage information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenPort

public int listenPort

serverAddress

public java.lang.String serverAddress

hopsToLive

public long hopsToLive

Lout

public java.io.PrintStream Lout

defaultListenPort

private static int defaultListenPort

defaultServerAddress

private static java.lang.String defaultServerAddress

defaultHopsToLive

private static long defaultHopsToLive

defaultLogging

private static int defaultLogging

defaultVerbosity

private static int defaultVerbosity
Constructor Detail

ProxyServer

public ProxyServer(int port,
                   java.lang.String addr,
                   long htl)
Constructor which stores the invocation parameters of this ProxyServer.

Method Detail

main

public static void main(java.lang.String[] args)

usage

public static void usage()
Print usage information