All pastes #948211 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-18 23:23 UTC
rendered paste body
NAME
       tcpmultiplexer − Multiplexer/Demultiplexer for tcp connections

SYNOPSIS
       tcpmultiplexer −s −l port −h hostname
       tcpmultiplexer −c −l port −h servername −p serverport −k service|port


DESCRIPTION
       Tcpmultiplexer  implements  TCPMUX  protocol  between  two instances of
       itself in order to do multiplexing and demultiplexing  of  tcp  connec‐
       tions. It can be runned both in server and in client mode.

       When  running  in  client mode, it opens locally port port, and tunnels
       incoming connections to servername (listening on serverport) requesting
       a service or a port.

       When  running  in  client  mode, it opens locally port port and tunnels
       incoming connection to the port requested by  client  instance  on  the
       host hostname

       Client  and server instances of tcpmultiplexer communicate using TCPMUX
       protocol (RFC 1078).

EXAMPLES
       Bob has an Internet connection that permits him to open only one  port,
       e.g .4000, towards Internet. On his machine, he runs ftp server at port
       21, http server at port 80, and another http server  on  port  15.   He
       wants  to connect from outside to these servers but he can put only one
       of this on port 4000. How to do?

       First, runs server instance of tcpmultiplexer on port 4000

       tcpmultiplexer −s −l 4000 −h localhost

       Then, from anywhere in the world, he runs these commands:

       tcpmultiplexer −c −l 100 −h ip.of.bob.machine −p 4000 −k ftp

       tcpmultiplexer −c −l 200 −h ip.of.bob.machine −p 4000 −k www

       tcpmultiplexer −c −l 300 −h ip.of.bob.machine −p 4000 −k 15

       Now, Bob can connect to http://localhost:200 to browse his http server,
       of ftp://localhost:100 to access to his files, etc.