[Twisted-Python] connectTCP/listenTCP socks/ssh

Kev gtwist at nixel.mine.nu
Sat Nov 1 05:41:18 EST 2003


I'm writing a socks proxy that uses ssh tunnels for connections, I can
get it working by making my connectClass listenTCP with a
forwarding.SSHListenForwardingFactory and then ClientCreator a
SOCKSv4Outgoing to connectTCP, but obviously that's a bad method. 

How can I cut the listen/connect? Is there a way I can do it at that
level or do I need to implement my own .connectSSH method?

It seems I need to get both sides placed in the reactor somehow,
but SSHChannel.conn doesn't have a fileno() so addReader doesn't accept it.
(Is addReader the right function? I found it in the curses example and
 am assuming it's just a generic file descriptor handler)

Thanks much




More information about the Twisted-Python mailing list