com.mindbright.ssh2
Class SSH2TelnetProxyListener

java.lang.Object
  extended bycom.mindbright.ssh2.SSH2TelnetProxyListener
All Implemented Interfaces:
java.lang.Runnable

public final class SSH2TelnetProxyListener
extends java.lang.Object
implements java.lang.Runnable

Implements a simple telnet proxy. Listens to a local port and when somebody connects it presents him with a prompt. The enters a hostname, and optionally a port, and the proxy opens a connecting to there through the ssh tunnel.


Constructor Summary
SSH2TelnetProxyListener(java.lang.String localAddr, int localPort, SSH2Connection connection)
           
SSH2TelnetProxyListener(java.lang.String localAddr, int localPort, SSH2Connection connection, java.lang.String prompt)
           
 
Method Summary
 void run()
          The thread running this gets created in the constructor.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSH2TelnetProxyListener

public SSH2TelnetProxyListener(java.lang.String localAddr,
                               int localPort,
                               SSH2Connection connection)
                        throws java.io.IOException
Parameters:
localAddr - Local address to bind listener to.
localPort - Port to listen at.
connection - The ssh connection to use.

SSH2TelnetProxyListener

public SSH2TelnetProxyListener(java.lang.String localAddr,
                               int localPort,
                               SSH2Connection connection,
                               java.lang.String prompt)
                        throws java.io.IOException
Parameters:
localAddr - Local address to bind listener to.
localPort - Port to listen at.
connection - The ssh connection to use.
prompt - The prompt to use.
Method Detail

run

public void run()
The thread running this gets created in the constructor. So there is no need to call this function explicitely.

Specified by:
run in interface java.lang.Runnable

stop

public void stop()