[Twisted-Python] Does anyone need / make use of SSHTransportAddress introduced in 12.1 ?

Adi Roiban adi at roiban.ro
Wed Mar 18 00:51:05 MDT 2015


On 18 March 2015 at 05:30, Glyph <glyph at twistedmatrix.com> wrote:
>
> On Mar 17, 2015, at 6:44 AM, Adi Roiban <adi at roiban.ro> wrote:
>
> Hi,
>
> While trying to fix https://twistedmatrix.com/trac/ticket/5999 I found
> out about the SSHTransportAddress introduced in 12.1.
>
> SSHTransportAddress is just an IAddress wrapping in a non-tranparent
> way another IAddress.
>
> It was introduces in #2997 which was accepted without any reason why
> we need SSHTransportAddress and why SSHTransportAddress is better than
> an IAddress.
> I could not find any documentation describing why we need this new class.
>
>
> The reason that we need this new type of address is to ensure that any code
> inspecting this address and attempting to construct a similar connection
> based upon it is not mislead into creating a transport which is not similar
> to the one it is indicating.
>
> Arguably, SSHTransportAddress is missing lots of important information: is
> the address indicative of a client, or a server?  If a client, what hostname
> was specified?  If a server, what user is connected?  Two SSH connections to
> the same IP address / port number are not necessarily equivalent, but the
> current implementation of SSHTransportAddress would compare that way, which
> is unfortunate.

[snip]

> SSHTransportAddress is useful, but its only utility is in explicitly
> breaking use-cases that in fact should not work, so it's a bit user-hostile,
> so I can see why you'd feel it is useless.  If it were retrofitted to keep
> enough information to be useful in its own right, then that would be a lot
> better.

Thanks! Are these design notes for SSHTransportAddress documented somewhere?

I will update my changes to start making use of SSHTransportAddress.

I have created a ticket to add client/server information into the
SSHTransportAddress. I am using this as a pretext to try to improve
the documentation for SSHTransportAddress.
https://twistedmatrix.com/trac/ticket/7825#ticket

Again, many thanks for the comments!
-- 
Adi Roiban




More information about the Twisted-Python mailing list