def proxy.route.tls
import bend-kit-http@0.38.2.0/http.bend as Httpimport Base
3493def proxy.route.tls(tls: Bool, s: Socket, +ms: U32, sni: String,
3494 authority: String, authorization: String, cert: Maybe<&2, Cert>, +ca: String) ->
3495 IO(Result<&1, &1, Err, Conn>):
3496 match tls:
3497 case False{}:
3498 IO.pure(Result<&1, &1, Err, Conn>, Done{Conn{False{}, s}})
3499 case True{}:
3500 proxy.connect(s, ms, sni, authority, authorization, cert, ca)