///
///
///
///
import * as net from 'net';
import * as tls from 'tls';
import * as http from 'http';
import { Agent, AgentConnectOpts } from 'agent-base';
import { URL } from 'url';
import type { OutgoingHttpHeaders } from 'http';
type Protocol = T extends `${infer Protocol}:${infer _}` ? Protocol : never;
type ConnectOptsMap = {
http: Omit;
https: Omit;
};
type ConnectOpts = {
[P in keyof ConnectOptsMap]: Protocol extends P ? ConnectOptsMap[P] : never;
}[keyof ConnectOptsMap];
export type HttpProxyAgentOptions = ConnectOpts & http.AgentOptions & {
headers?: OutgoingHttpHeaders | (() => OutgoingHttpHeaders);
};
interface HttpProxyAgentClientRequest extends http.ClientRequest {
outputData?: {
data: string;
}[];
_header?: string | null;
_implicitHeader(): void;
}
/**
* The `HttpProxyAgent` implements an HTTP Agent subclass that connects
* to the specified "HTTP proxy server" in order to proxy HTTP requests.
*/
export declare class HttpProxyAgent extends Agent {
static protocols: readonly ["http", "https"];
readonly proxy: URL;
proxyHeaders: OutgoingHttpHeaders | (() => OutgoingHttpHeaders);
connectOpts: net.TcpNetConnectOpts & tls.ConnectionOptions;
constructor(proxy: Uri | URL, opts?: HttpProxyAgentOptions);
addRequest(req: HttpProxyAgentClientRequest, opts: AgentConnectOpts): void;
setRequestProps(req: HttpProxyAgentClientRequest, opts: AgentConnectOpts): void;
connect(req: HttpProxyAgentClientRequest, opts: AgentConnectOpts): Promise;
}
export {};
//# sourceMappingURL=index.d.ts.map