autotls
autotls copied to clipboard
Examples are not explanatory enough for beginners
How do I specify a custom port?
Before now, I use
r.RunTLS(":4452", "/path/cert.pem", "/path/privkey.pem")
Explain: log.Fatal(autotls.Run(r, "example1.com", "example2.com"))
It's not possible to customize the port. The Listener(in autocert package) listens on the standard TLS port (443).
func (m *Manager) Listener() net.Listener { ln := &listener{ conf: m.TLSConfig(), } ln.tcpListener, ln.tcpListenErr = net.Listen("tcp", ":443") return ln }
As @uzmo mentioned. You can't change the default TLS port.