Class HttpsProxyAgent<Uri>

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.

Type Parameters

  • Uri extends string

Hierarchy

Constructors

Properties

connectOpts: TcpNetConnectOpts & ConnectionOptions
freeSockets: ReadOnlyDict<Socket[]>
keepAlive: boolean
maxFreeSockets: number
maxSockets: number
maxTotalSockets: number
options: Partial<TcpNetConnectOpts & ConnectionOptions>
proxy: URL
proxyHeaders: OutgoingHttpHeaders | (() => OutgoingHttpHeaders)

Type declaration

    • (): OutgoingHttpHeaders
    • Returns OutgoingHttpHeaders

requests: ReadOnlyDict<IncomingMessage[]>
sockets: ReadOnlyDict<Socket[]>
captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

defaultMaxListeners: number
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

protocols: readonly ["http", "https"] = ...

Accessors

  • get defaultPort(): number
  • Returns number

  • set defaultPort(v): void
  • Parameters

    • v: number

    Returns void

  • get protocol(): string
  • Returns string

  • set protocol(v): void
  • Parameters

    • v: string

    Returns void

Methods

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Called when the node-core HTTP client library is creating a new HTTP request.

    Parameters

    Returns Promise<Socket>

  • Returns Duplex

  • Parameters

    • req: ClientRequest
    • options: AgentConnectOpts
    • cb: ((err, s?) => void)
        • (err, s?): void
        • Parameters

          • err: null | Error
          • Optional s: Duplex

          Returns void

    Returns void

  • Destroy any sockets that are currently in use by the agent. It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, sockets may hang open for quite a long time before the server terminates them.

    Returns void

  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Returns (string | symbol)[]

  • Returns number

  • Determine whether this is an http or https request.

    Parameters

    Returns boolean

  • Parameters

    • event: string | symbol

    Returns number

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • event: string | symbol
    • listener: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns HttpsProxyAgent<Uri>

  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

    Deprecated

    since v4.0.0

  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Generated using TypeDoc