SPONSORED LINKS

Class proxy

java.lang.Object
  |
  +--proxy

public class proxy
extends java.lang.Object
implements java.lang.Runnable

proxy class -- implements a proxy server to redirect network access

Version:
$Id: proxy.html,v 1.1.1.1 2005/09/25 22:40:20 rswindell Exp $
Author:
Matthias L. Jugel, Marcus Meißner

Constructor Summary
proxy(int lport, java.lang.String raddr, int rport)
          Create a server socket and start listening on the local port.
 
Method Summary
static void main(java.lang.String[] args)
          This method is called when the application is run on the commandline.
 void run()
          Cycle around until an error occurs and wait for incoming connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

proxy

public proxy(int lport,
             java.lang.String raddr,
             int rport)
Create a server socket and start listening on the local port.
Parameters:
lport - local port
raddr - address of the destination
rport - port on the destination host
Method Detail

main

public static void main(java.lang.String[] args)
This method is called when the application is run on the commandline. It takes two or three arguments: usage: java proxy local-port destination-host destination-port
Parameters:
args - The command line arguments

run

public void run()
Cycle around until an error occurs and wait for incoming connections. An incoming connection will create two redirectors. One for local-host - destination-host and one for destination-host - local-host.
Specified by:
run in interface java.lang.Runnable