[Twisted-Python] Twisted IPv6 + SSL - fixed, or todo?

Glyph glyph at twistedmatrix.com
Fri Aug 24 17:06:45 EDT 2012

On Aug 24, 2012, at 4:13 AM, Erik Forsberg <forsberg at opera.com> wrote:

> Hi!
> http://twistedmatrix.com/trac/wiki/IPv6 mentions:
> "SSL (but this might be automatic when IReactorTCP supports it)"
> IReactorTCP now has IPv6 support, so did twisted get SSL + IPv6 support 
> automatically? It seems to me from twisted.internet.endpoints that 
> there's work to do there (there's SSL4ServerEndpoint and 
> SSL4ClientEndpoint, but no SSL6ServerEndpoint/SSL6ClientEndpoint).
> My use case is to be able to connect to https servers over IPv6 with 
> twisted.web.client.Agent. Can I do that? If so, how?

Sort of.  Agent is currently hard-coded to use TCP4ClientEndpoint or SSL4ClientEndpoint; the factory that it uses to generate these endpoints is not publicly exposed.

However, Agent passes a reactor, so you can implement your own reactor (probably a wrapper) that implements connectTCP and connectSSL to resolve and connect IPv6 names, and that will work just fine, and you will be using only public APIs, so it's supported :).

Does that make sense?

At some point, Agent should be modified to use <http://twistedmatrix.com/trac/ticket/4859>, once that's done and committed to trunk.  I don't know if a ticket exists to do that yet.  If you have already checked and there isn't, please feel free to file one.


More information about the Twisted-Python mailing list