UNPKG

@journeyapps/https-proxy-socket

Version:

Node library to enable opening Socket connections via an HTTPS proxy.

12 lines (11 loc) 479 B
/// <reference types="node" /> import { HttpsProxySocket } from './HttpsProxySocket'; import * as agentBase from 'agent-base'; import * as tls from 'tls'; /** * Construct an agent for http(s) requests. Mostly for testing purposes. * * @param proxy - the proxy to use * @param options - to set additional TLS options for https requests, e.g. rejectUnauthorized */ export declare function proxyAgent(proxy: HttpsProxySocket, options?: tls.ConnectionOptions): agentBase.Agent;