def Tls.open

bend-kube-runtime@0.2.0.0 · src/net.bend:150

import bend-kube-runtime@0.2.0.0/src/net.bend as Net
import Base
import bend-kube-runtime@0.2.0.0/src/proxy.bend as P

150# Opens a verified TLS connection to host:port (see Tls.secure), through
151# the CONNECT tunnel of HTTPS_PROXY unless NO_PROXY or a loopback host
152# says otherwise (proxy.bend).
153def Tls.open(+host: String, +port: U32, ca: String, cert: String, key: String, +ms: U32) ->
154  IO(Res(Socket)):
155  IO.bind(String, Res(Socket), Tls.env("HTTPS_PROXY", "https_proxy"),
156    url => IO.bind(String, Res(Socket), Tls.env("NO_PROXY", "no_proxy"),
157      no => Tls.open.route(P.Proxy.route(url, no, host, port), host, port, ca, cert, key, ms)))

Uses (9)

Used by (1)