liftoff/GateOne — Issue #56: IPv6 Support for HTTPS connections to Gate One
Author: owens-bill
Created: 2011-11-02 15:42:09+00:00
State: open

In addition to mucking around with weird DNS records, I also do a lot of work with IPv6, so I've been wondering what it would take to have Gate One use v6 for the browser-server connection. The backend SSH connection will already use v6 if it's available on both sides, but the HTTPS daemon only listens on v4.

It looks like there is only one change needed, eliminating the explicit default listen address:

--- gateone.py.orig	2011-11-02 11:11:39.777911140 -0400
+++ gateone.py	2011-11-02 11:11:53.467791747 -0400
@@ -1349,7 +1349,7 @@
type=str
)
define("address",
- default="0.0.0.0",
+ default="",
help=_("Run on the given address."),
type=str)
define("port", default=443, help=_("Run on the given port."), type=int)

I now have Python listening on v6, and I can connect using a v6-only name for the server (to ensure that the browser doesn't choose v4 on its own accord).

I don't have any idea what side effects this change might have, though given that most things work well in a dual-stack world, I would hope that it isn't a big deal. The structure of the options list does mean that it isn't possible to specify both a v4 and a v6 address to listen on. The Tornado docs seem to say that if you want to specify multiple explicit addresses you can call http_server.listen() multiple times to specify different addresses, and then call IOLoop.instance().start() once.

No idea how many people would care about this, either; the geek community does seem more interested in v6 than the regular populace, so I thought there might be some traction ;)