mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Fix auto TLS cert bug for Client TLS tunnels
It wasn't grabbing certs automatically.
This commit is contained in:
parent
392a1ec8d7
commit
08e1beba6e
16
client.go
16
client.go
@ -310,14 +310,6 @@ func (c *Client) BoreTunnel(ctx context.Context, tunnel Tunnel) error {
|
|||||||
// boringproxy server does.
|
// boringproxy server does.
|
||||||
go httpServer.Serve(tlsListener)
|
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 {
|
} else {
|
||||||
|
|
||||||
if tunnel.TlsTermination == "client-tls" {
|
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()
|
<-ctx.Done()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user