Add TLS support

Yes.  If we wanted to avoid the SNI thing, we could use tlsdialer, but there's no need here.