IPv6 and gemini

solderpunk solderpunk at SDF.ORG
Sun Sep 15 13:47:51 BST 2019
>   Sad.  It's not that hard to support IPv6.  In C, just by calling
> getaddrinfo() you can get both IPv4 and IPv6 addresses for a hostname (and
> it supports parsing IP addresses of either family), and socket(), bind(),
> listen(), connect(), etc. all support IPv6.

There are bindings for all of this in Python, too, in the `socket'
module.  VF-1 and AV-98 both use getaddrinfo to support connecting to
IPv6 servers.  But Agena and Gegobi both use some easy/lazy higher-level
tools in the `socketserver` module, which allow writing simple forking
or threaded TCP servers without having to bother actually writing any of
the networks.  Obviously you sacrifice some degree of control and
performance, but I thought they'd be fine for non-critical applications
like, well, anything Gemini related in these easy days!  Not handling
IPv6 is a bit of a deal-breaker, though, so I'll have to actually do
things properly...
 
>   I suspect this was done intentionall to disuade people from using
> self-signed certificates because dragons.  Or hackers.  Or something.

Dragon hackers!

"Welcome to Gemini: here be dragons.  It's okay, they like TOFU!"

>   Remove the TLS restriction, and it's not a problem at all.  The problem is
> that during the TLS negotiation, the hostname of the server you are
> connecting to is sent [1] as part of the protocol.  There is a way to
> extract which server is being referenced and thus, you can figure out which
> set of files (or handlers) to serve the request from.

Hmm.  Are you talking about SNI (Server Name Indication) here?

-Solderpunk



Archive home | About this archive