Gopher over TLS (GoT)
Adds support for Gopher-over-TLS (GoT) to the Gopher-over-HTTPS (GoH) goh
middleware. The goh
middleware acts as a bridge for HTTP-only clients, such as Gaufre, to access the Gopherverse. With this patch the goh
middleware can talk to GoT servers, such as the one running on Commons Host CDN servers. This is an experimental proof of concept.
Advantages of GoT:
- Backwards compatible: The Gopher protocol itself is not modified. GoT is merely a transport aka tunnel for Gopher.
- Virtual hosting: GoT uses TLS SNI so that the Gopher client can tell the Gopher server a hostname, something not present in the basic Gopher protocol. This functions like the
Host
header in HTTP/1.1. - Performance: TLSv1.2 and TLSv1.3 session resumption reduces the cost of repeated TLS handshakes.
Disadvantages of GoT:
- The GoT probe requires an extra round trip in case GoT is not supported. Upon TLS handshake failure, a new plaintext Gopher connection must be established. This middleware caches the probe result, for 60 seconds, to minimise this cost.