Class ProxyServer

java.lang.Object
io.milton.proxy.ProxyServer
All Implemented Interfaces:
Service, Stoppable, Runnable
Direct Known Subclasses:
ProxyLogServer

public class ProxyServer extends Object implements Runnable, Service
proxyserver listens on given lport, forwards traffic to tport on thost
  • Field Details

    • thread

      protected Thread thread
  • Constructor Details

    • ProxyServer

      public ProxyServer()
    • ProxyServer

      public ProxyServer(String targetHost, int targetPort, int listenPort)
  • Method Details

    • go

      public void go()
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • gotconn

      protected void gotconn(Socket sconn) throws Exception
      Throws:
      Exception
    • main

      public static void main(String[] args)
    • start

      public void start()
      Specified by:
      start in interface Service
    • stop

      public void stop()
      Specified by:
      stop in interface Stoppable
    • isDebug

      public boolean isDebug()
      Returns:
      the debug
    • setDebug

      public void setDebug(boolean debug)
      Parameters:
      debug - the debug to set
    • getTargetPort

      public int getTargetPort()
      Returns:
      the targetPort
    • setTargetPort

      public void setTargetPort(int targetPort)
      Parameters:
      targetPort - the targetPort to set
    • getListenPort

      public int getListenPort()
      Returns:
      the listenPort
    • setListenPort

      public void setListenPort(int listenPort)
      Parameters:
      listenPort - the listenPort to set
    • getTargetHost

      public String getTargetHost()
      Returns:
      the targetHost
    • setTargetHost

      public void setTargetHost(String targetHost)
      Parameters:
      targetHost - the targetHost to set