Files
outline/server/typings/tunnel-agent.d.ts
Tom Moor 8fcb629bdf fix: Standardize request filtering between cloud / self-hosted (#9914)
* fix: Add request-filtering-agent to self-hosted environment

* refactor

* Debug logging

* self-review

* Remove unused AbortController

* test

* test

* Address feedback
2025-08-15 07:16:29 -04:00

36 lines
966 B
TypeScript

declare module "tunnel-agent" {
import { Agent as HttpAgent } from "http";
import { Agent as HttpsAgent } from "https";
interface TunnelOptions {
proxy: {
host: string | null;
port: string | number | null;
proxyAuth?: string | null;
headers?: { [key: string]: string };
};
ca?: Buffer[] | Buffer;
cert?: Buffer | string;
key?: Buffer | string;
passphrase?: string;
rejectUnauthorized?: boolean;
secureOptions?: number;
secureProtocol?: string;
ciphers?: string;
localAddress?: string;
maxSockets?: number;
keepAlive?: boolean;
keepAliveMsecs?: number;
}
export interface TunnelAgent {
httpOverHttp: (options: TunnelOptions) => HttpAgent;
httpsOverHttp: (options: TunnelOptions) => HttpsAgent;
httpOverHttps: (options: TunnelOptions) => HttpAgent;
httpsOverHttps: (options: TunnelOptions) => HttpsAgent;
}
const tunnel: TunnelAgent;
export = tunnel;
}