Merge branch 'master' into limit-tokens

This commit is contained in:
Anders Pitman 2022-02-17 14:01:19 -07:00
commit 45d9a22c41

View File

@ -310,14 +310,6 @@ func (c *Client) BoreTunnel(ctx context.Context, tunnel Tunnel) error {
// boringproxy server does.
go httpServer.Serve(tlsListener)
// TODO: There's still quite a bit of duplication with what the server does. Could we
// encapsulate it into a type?
err = c.certConfig.ManageSync(ctx, []string{tunnel.Domain})
if err != nil {
log.Println("CertMagic error at startup")
log.Println(err)
}
} else {
if tunnel.TlsTermination == "client-tls" {
@ -349,6 +341,14 @@ func (c *Client) BoreTunnel(ctx context.Context, tunnel Tunnel) error {
}()
}
// TODO: There's still quite a bit of duplication with what the server does. Could we
// encapsulate it into a type?
err = c.certConfig.ManageSync(ctx, []string{tunnel.Domain})
if err != nil {
log.Println("CertMagic error at startup")
log.Println(err)
}
<-ctx.Done()
return nil