MCPcopy Create free account
hub / github.com/celzero/midway / asTLSConn

Function asTLSConn

midway/relay/proxy.go:216–222  ·  view source on GitHub ↗
(c net.Conn)

Source from the content-addressed store, hash-verified

214}
215
216func asTLSConn(c net.Conn) *tls.Conn {
217 uc := underlyingConn(c)
218 if tlsconn, ok := uc.(*tls.Conn); ok {
219 return tlsconn
220 }
221 return tls.Server(c, env.TlsConfig())
222}

Callers

nothing calls this directly

Calls 2

TlsConfigFunction · 0.92
underlyingConnFunction · 0.85

Tested by

no test coverage detected