UNPKG

1.03 kBTypeScriptView Raw
1/// <reference types="node" />
2import * as http from "http";
3import * as https from "https";
4import { ProxySettings } from "./serviceClient";
5import { HttpHeadersLike } from "./httpHeaders";
6export declare type ProxyAgent = {
7 isHttps: boolean;
8 agent: http.Agent | https.Agent;
9};
10export declare function createProxyAgent(requestUrl: string, proxySettings: ProxySettings, headers?: HttpHeadersLike): ProxyAgent;
11export interface HttpsProxyOptions {
12 host: string;
13 port: number;
14 localAddress?: string;
15 proxyAuth?: string;
16 headers?: {
17 [key: string]: any;
18 };
19 ca?: Buffer[];
20 servername?: string;
21 key?: Buffer;
22 cert?: Buffer;
23}
24interface HttpsOverHttpsOptions {
25 maxSockets?: number;
26 ca?: Buffer[];
27 key?: Buffer;
28 cert?: Buffer;
29 proxy?: HttpsProxyOptions;
30}
31export declare function createTunnel(isRequestHttps: boolean, isProxyHttps: boolean, tunnelOptions: HttpsOverHttpsOptions): http.Agent | https.Agent;
32export {};
33//# sourceMappingURL=proxyAgent.d.ts.map
\No newline at end of file