[Twisted-Python] connectTCP/listenTCP socks/ssh

Paul Swartz z3p at twistedmatrix.com
Sat Nov 1 11:39:46 MST 2003


On Sat, 2003-11-01 at 05:41, Kev wrote:
> 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. 

You should definatly look at adding this feature to Conch when you
finish it.  That's been on the TODO list for a while.

> 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?

Basically, you're going to want to override SOCKSv4.connectClass and
SOCKSv4.listenClass.  connectClass returns a Deferred that is called
back with an unused value.  listenClass returns a Deferred that is
called back with a tuple of (host, port) that is being listened on.

-p
-- 
      Paul Swartz
(o_   z3p at twistedmatrix dot com
//\   http://www.twistedmatrix.com/users/z3p.twistd/
V_/_  AIM: Z3Penguin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20031101/c83e7eb2/attachment.sig>


More information about the Twisted-Python mailing list