ProProxy Home

proproxy
Class ProProxy

java.lang.Object
  |
  +--proproxy.ProProxy

public class ProProxy
extends java.lang.Object

ProProxy
Generic cascading proxy server. Can be used for any single socket network application - HTTP, telnet, blah blah..
One of the few proxy servers that support both UDP and TCP sockets.

Usage: java proproxy.ProProxy

Configuration file format:
# Debug mode (true or false). All messages will be logged in debug mode.
# DEBUG =
# Protocol for which this proxy is to be used
# Any one of udp, tcp, http or chttp
PROTOCOL =
# The port number on which ProProxy will listen for incoming requests
LISTEN_PORT =
# If proproxy is being used in cascade mode (udp or tcp protocols)
# the host address to which the requests are to be forwarded
CASCADE_HOST =
# If proproxy is being used in cascade mode (udp or tcp protocols)
# the port number on the target machine to which the requests are to be forwarded
CASCADE_PORT =

# List of IP addresses who are not allowed to connect to proxy
REJECT_IP_LIST =
# List of IP addresses who are to be allowed to connect to proxy
ALLOW_IP_LIST =


If cascade port is not specified it is same as listen port.
Cascade host and port are not used if protocol is http or chttp.
Protocol chttp is HTTP mode with compression.
If REJECT_IP_LIST list is specified, ALLOW_IP_LIST will be ignored.
If neither is specified, all connections will be allowed.
Lists can contain valid IP addresses separated by space.


You are free to use this code and to make modifications provided this notice is retained.

If you found this useful, please add a note of acknowledgement to my guestbook. If you would like to report a bug or suggest some improvements, you are most welcome. I will be happy to help you use this piece of code.

Version:
1.70, 31st Oct, 2001
Author:
Tanmay K. Mohapatra

Field Summary
protected static boolean debugflg
           
protected static int requests_counter
           
 
Constructor Summary
ProProxy()
           
 
Method Summary
static void handleHTTP(int iListenPort, java.lang.String sIncludeList, java.lang.String sExcludeList)
           
static void handleTCP(int iListenPort, java.lang.String sCascadeServer, int iCascadePort, java.lang.String sIncludeList, java.lang.String sExcludeList)
           
static void handleUDP(int iListenPort, java.lang.String sCascadeServer, int iCascadePort, java.lang.String sIncludeList, java.lang.String sExcludeList)
           
static void main(java.lang.String[] args)
          The main entry point for the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugflg

protected static boolean debugflg

requests_counter

protected static int requests_counter
Constructor Detail

ProProxy

public ProProxy()
Method Detail

main

public static void main(java.lang.String[] args)
The main entry point for the application. Creates a new ProListener thread and waits till the listener gets out. Prints out the number of active connections intermittently.
Parameters:
args - Array of parameters passed to the application via the command line.

handleHTTP

public static void handleHTTP(int iListenPort,
                              java.lang.String sIncludeList,
                              java.lang.String sExcludeList)

handleUDP

public static void handleUDP(int iListenPort,
                             java.lang.String sCascadeServer,
                             int iCascadePort,
                             java.lang.String sIncludeList,
                             java.lang.String sExcludeList)

handleTCP

public static void handleTCP(int iListenPort,
                             java.lang.String sCascadeServer,
                             int iCascadePort,
                             java.lang.String sIncludeList,
                             java.lang.String sExcludeList)

ProProxy Home