TSNet TLS Cert Generation

I have a functioning go application that utilized TSNet. Access via http is no problem, but I want to set up https. Typically, we would run tailscale cert <domain> on the machine that youre generating a certificate for, but with TSNet, the “machine” is an application. How do I run tailscale cert for an application “machine”?

At the moment, I have this code, but there no cached certificate for it to pull.

 113   │         ln = tls.NewListener(fln.Listener, &tls.Config{
 114   │             GetCertificate: lc.GetCertificate,
 115   │         })

I sorted this, I was using the listener I got from ExposeHTTPS (which wasnt initialized).

So, once I created a listener and replaces fln.Listener, it generated the SSL as expected. Thanks!

1 Like

No, thank you for sharing after figuring it out yourself!
Too many people just ghost their thread after they solved their problem, so I gotta give kudos to encourage behavior like yours.

So, thanks for being such a considerate person, ser! :handshake::beers:

1 Like