TCP Portforwarding

Andrew Bennetts andrew-pythonlist at puzzling.org
Sat May 17 22:52:31 EDT 2003


On Sun, May 18, 2003 at 12:38:35AM +0200, Chris Liechti wrote:
> 
> > I think this should be possible with less than 100 lines. Or am I
> > wrong?
> 
> mine is a bit larger, but if you remove some of the unneeded features maybe 
> ;-)
> 
> and i'm sure its that short with twisted...

Very!  :)

    $ mktap portforward -p 8000 -h remote -p 20
    $ twistd -f portforward.tap

Is 2 lines short enough?  :)

(twisted/protocols/portforward.py is 87 lines, including comments and also
hooks to allow you to munge the data as is it passed back-and-forth.)

-Andrew.






More information about the Python-list mailing list