traefik/pkg/tcp/tls.go

17 lines
282 B
Go
Raw Permalink Normal View History

package tcp
import (
"crypto/tls"
)
2020-05-11 10:06:07 +00:00
// TLSHandler handles TLS connections.
type TLSHandler struct {
Next Handler
Config *tls.Config
}
2020-05-11 10:06:07 +00:00
// ServeTCP terminates the TLS connection.
func (t *TLSHandler) ServeTCP(conn WriteCloser) {
t.Next.ServeTCP(tls.Server(conn, t.Config))
}