func newProxyConn()

in conn.go [28:34]


func newProxyConn(raw net.Conn, r io.Reader, w io.Writer) (_ net.Conn, closed <-chan struct{}) {
	pc := proxyConn{Conn: raw, closed: make(chan struct{}), r: r, w: w}
	if raw, ok := raw.(*tls.Conn); ok {
		return &tlsProxyConn{connectionStater: raw, proxyConn: pc}, pc.closed
	}
	return &pc, pc.closed
}