https-proxy-agent

  • Version 7.0.5
  • Published
  • 34.9 kB
  • 2 dependencies
  • MIT license

Install

npm i https-proxy-agent
yarn add https-proxy-agent
pnpm add https-proxy-agent

Overview

An HTTP(s) proxy `http.Agent` implementation for HTTPS

Index

Classes

class HttpsProxyAgent

class HttpsProxyAgent<Uri extends string> extends Agent {}
  • The HttpsProxyAgent implements an HTTP Agent subclass that connects to the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.

    Outgoing HTTP requests are first tunneled through the proxy server using the CONNECT HTTP request method to establish a connection to the proxy server, and then the proxy server connects to the destination target and issues the HTTP request from the proxy server.

    https: requests have their socket connection upgraded to TLS once the connection to the proxy server has been established.

constructor

constructor(proxy: any, opts?: any);

    property connectOpts

    connectOpts: any;

      property protocols

      static protocols: readonly ['http', 'https'];

        property proxy

        readonly proxy: URL;

          property proxyHeaders

          proxyHeaders: any;

            method connect

            connect: (
            req: http.ClientRequest,
            opts: AgentConnectOpts
            ) => Promise<net.Socket>;
            • Called when the node-core HTTP client library is creating a new HTTP request.

            Type Aliases

            type HttpsProxyAgentOptions

            type HttpsProxyAgentOptions<T> = ConnectOpts<T> &
            http.AgentOptions & {
            headers?: OutgoingHttpHeaders | (() => OutgoingHttpHeaders);
            };

              Package Files (1)

              Dependencies (2)

              Dev Dependencies (11)

              Peer Dependencies (0)

              No peer dependencies.

              Badge

              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/https-proxy-agent.

              • Markdown
                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/https-proxy-agent)
              • HTML
                <a href="https://www.jsdocs.io/package/https-proxy-agent"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>