import type { AxiosRequestConfig } from 'axios'; import type { ClientRequest } from 'node:http'; import type { Socket } from 'node:net'; import { type AgentOptions } from 'node:https'; import { type HttpsProxyAgentOptions, HttpsProxyAgent } from 'https-proxy-agent'; type AgentConnectOpts = Parameters['connect']>[1]; /** * PatchedHttpsProxyAgent is a custom implementation of HttpsProxyAgent that allows to pass additional options, currently not supported by the original implementation when calling tls.connect */ export declare class PatchedHttpsProxyAgent extends HttpsProxyAgent { private readonly extraOptions; /** * Extension of the base constructor. * * @param proxy - The proxy server URI or URL to route requests through. * @param opts - Optional agent options, retained and merged into each connect call. */ constructor(proxy: Uri | URL, opts?: HttpsProxyAgentOptions); /** * Performs transparent encryption of written data and all required TLS negotiation. * * @param req - The outgoing HTTP client request initiating the connection. * @param opts - Connection options from the HTTP client, merged with the agent's extra options. * @returns A promise that resolves to the negotiated socket. */ connect(req: ClientRequest, opts: AgentConnectOpts): Promise; } /** * Returns axios config that routes a request through the environment-configured proxy * using a custom agent with axios' own (unreliable) proxy handling disabled. Honours * NO_PROXY and never applies a proxy inside SAP Business Application Studio. Returns an * empty object when no proxy applies, so it can be spread/merged into a request config. * * @param url - The full target URL, used for NO_PROXY hostname matching. * @param agentOptions - Optional agent options (e.g. rejectUnauthorized) passed to the https agent. * @returns Partial axios request config with proxy agents, or an empty object. */ export declare function getProxyAgentConfig(url: string, agentOptions?: AgentOptions): Partial; export {}; //# sourceMappingURL=proxy.d.ts.map