[Twisted-Python] Multiplexing streams with Conch
Laurens Van Houtven
_ at lvh.io
Tue Aug 6 02:31:32 MDT 2013
On Tue, Aug 6, 2013 at 2:14 AM, <exarkun at twistedmatrix.com> wrote:
> This is still sort of incomprehensible to me. For example, you haven't
> even said whether you're trying to develop the server side of this, the
> client side, both, or what.
I'm definitely trying to write the server. I'm hoping to be able to get out
from writing the client, and have people use any common SSH client.
(That part was in the original mail: I'm asking if this would be possible
to do so with regular SSH clients, or if I'd have to write that side as
well, implying the part I'm definitely writing is the server :-))
> And why would a server ever try to make a TCP connection to a port on the
> client? Perhaps you can lay out your goals in a bit more detail, skipping
> over fewer of the other important details?
Imagine a stream transport inside the server. It's a StringTransport, but
it's simulating a TCP transport between two hosts on a real network. I'd
like my client to be able to observe and modify the traffic on that
transport. To me, the obvious way to do that seemed to be to cut the
transport in half into two transports, and put the client on both of the
fake host 1 <------------------> fake host 2
fake host 1 <--------> client <----> fake host 2
Since the client is a real machine and fake host 1 and fake host 2 are
simulated hosts that live in the server, each at an end of a
StringTransport, these new transports will have to be communicated between
the server and the client, so multiplexing streams seemed relevant.
This is obviously possible if I write both server and client (and if I did,
I probably wouldn't use Conch), but I was wondering if it'd be possible
using regular SSH clients.
> About the only part I understand is "multiplexing", to which the answer is
> "probably, SSH does support multiple logical channels over a single TCP
Okay. I know conch also supports port forwarding, so I guess the command
line tool would be a good start there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python