@types/tunnel
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

Installation

npm install --save @types/tunnel

Summary

This package contains type definitions for tunnel (https://github.com/koichik/node-tunnel/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tunnel.

index.d.ts

/// <reference types="node" />
import { Agent, AgentOptions as HttpAgentOptions } from "http";
import { Agent as HttpsAgent, AgentOptions as HttpsAgentOptions } from "https";

export function httpOverHttp(options?: HttpOptions): Agent;
export function httpsOverHttp(options?: HttpsOverHttpOptions): Agent;
export function httpOverHttps(options?: HttpOverHttpsOptions): HttpsAgent;
export function httpsOverHttps(options?: HttpsOverHttpsOptions): HttpsAgent;

export interface HttpOptions extends HttpAgentOptions {
    proxy?: ProxyOptions | undefined;
}

export interface HttpsOptions extends HttpsAgentOptions {
    proxy?: ProxyOptions | undefined;
}

export interface HttpsOverHttpOptions extends HttpsOptions {
    ca?: Buffer[] | undefined;
    key?: Buffer | undefined;
    cert?: Buffer | undefined;
}

export interface HttpOverHttpsOptions extends HttpOptions {
    proxy?: HttpsProxyOptions | undefined;
}

export interface HttpsOverHttpsOptions extends HttpsOverHttpOptions {
    proxy?: HttpsProxyOptions | undefined;
}

export interface ProxyOptions {
    host: string;
    port: number;
    localAddress?: string | undefined;
    proxyAuth?: string | undefined;
    headers?: { [key: string]: any } | undefined;
}

export interface HttpsProxyOptions extends ProxyOptions {
    ca?: Buffer[] | undefined;
    servername?: string | undefined;
    key?: Buffer | undefined;
    cert?: Buffer | undefined;
}

Additional Details

  • Last updated: Fri, 26 Jan 2024 01:52:35 GMT
  • Dependencies: @types/node

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/tunnel

Weekly Downloads

1,602,400

Version

0.0.7

License

MIT

Unpacked Size

5.44 kB

Total Files

5

Last publish

Collaborators

  • types