import type * as net from "node:net"; import type * as tls from "node:tls"; export interface PooledConnection { socket: net.Socket | tls.TLSSocket; proxyUrl: string; targetHost: string; targetPort: number; useTLS: boolean; lastUsed: number; created: number; } export declare class Socks5ConnectionPool { private pool; private maxConnectionsPerKey; private connectionTtl; constructor(options?: { maxConnectionsPerKey?: number; connectionTtl?: number; }); /** * Get a connection from the pool or return null if none available */ getConnection(key: string): PooledConnection | null; /** * Release a connection back to the pool */ releaseConnection(key: string, connection: PooledConnection): Promise; /** * Cleanup stale connections */ cleanupStale(): void; /** * Check if a connection is healthy */ private isConnectionHealthy; /** * Get pool statistics */ getStats(): { [key: string]: number; }; /** * Clear all connections */ clear(): void; } export declare const globalConnectionPool: Socks5ConnectionPool;