autotls icon indicating copy to clipboard operation
autotls copied to clipboard

Examples are not explanatory enough for beginners

Open tebieto opened this issue 4 years ago • 1 comments

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"))

tebieto avatar Mar 03 '20 11:03 tebieto

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 }

uzmo avatar Mar 14 '20 03:03 uzmo

As @uzmo mentioned. You can't change the default TLS port.

appleboy avatar Aug 30 '22 06:08 appleboy