///
import * as tls from 'tls';
export interface HttpsProxyConfig extends tls.ConnectionOptions {
headers?: {
[key: string]: string;
};
auth?: string;
}
export interface ConnectionOptions {
host: string;
port: number;
}
/**
* The HttpsProxySocket class allows creating Socket connections via an HTTPS proxy.
* HTTP proxies are not supported.
* For http(s) requests, use HttpsProxyAgent as a wrapper around this.
*/
export declare class HttpsProxySocket {
proxy: tls.ConnectionOptions;
proxyConfig: HttpsProxyConfig;
/**
*
* @param opts - The connection options to the proxy. At least host and port are required.
* Use {rejectUnauthorized: true} to ignore certificates for the proxy (not the endpoint).
* @param proxyConfig - { auth: 'username:password' } for basic auth.
* { headers: {key: 'value'} } for custom headers.
*/
constructor(opts: tls.ConnectionOptions | string, proxyConfig?: HttpsProxyConfig);
/**
* Create a new Socket connection.
*
* @param opts - host and port
*/
connect(opts: ConnectionOptions): Promise;
/**
* Construct an agent for http(s) requests.
*
* @param options - to set additional TLS options for https requests, e.g. rejectUnauthorized
*/
agent(options?: tls.ConnectionOptions): import("agent-base").Agent;
private _connect;
}