UNPKG

fast-proxy-balancer

Version:
26 lines 865 B
import type { Proxy, ProxyBalancerOptions, ProxyStats, ProxyAgentResult } from './interfaces/interfaces.js'; declare class ProxyBalancer { protected proxies: Proxy[]; private proxyListOrFile; private maxFailures; private testTimeout; private refreshInterval; private concurrentTests; private testUrl; constructor(proxyListOrFile: string | string[], options?: ProxyBalancerOptions); init(): Promise<void>; refreshProxies(): Promise<void>; getBestProxy(): Promise<ProxyAgentResult>; startAutoRefresh(): void; getProxyStats(): ProxyStats[]; sortByLatency(): ProxyStats[]; getFailedProxies(): ProxyStats[]; getStatsSummary(): { total: number; active: number; failed: number; avgLatency: string; }; } export { ProxyBalancer }; //# sourceMappingURL=ProxyBalancer.d.ts.map