Ende.Proxy

type alias

type Ende.Proxy = { transport?: "http" | "https" | "socks5"; url: string; basicAuth?: BasicAuth } | { transport: "tcp"; hostname: string; port: number } | { transport: "unix"; path: string } | { transport: "vsock"; cid: number; port: number }

The definition for alternative transports (or proxies) in Ende.CreateHttpClientOptions.

Supported proxies:

  • HTTP/HTTPS proxy: this uses passthrough to tunnel HTTP requests, or HTTP CONNECT to tunnel HTTPS requests through a different server.
  • SOCKS5 proxy: this uses the SOCKS5 protocol to tunnel TCP connections through a different server.
  • TCP socket: this sends all requests to a specified TCP socket.
  • Unix domain socket: this sends all requests to a local Unix domain socket rather than a TCP socket. Not supported on Windows.
  • Vsock socket: this sends all requests to a local vsock socket. Only supported on Linux and macOS.