export interface ProxyConfig { url: string; protocol?: 'http' | 'https' | 'socks4' | 'socks5'; host: string; port: number; auth?: { username: string; password: string; }; } export interface ProxyStatus { url: string; failures: number; lastFailure?: Date; lastSuccess?: Date; disabled: boolean; } export interface ProxyManagerOptions { proxy?: string; proxyFile?: string; maxFailures?: number; failureCooldownMs?: number; } export declare class ProxyManager { private proxies; private status; private currentIndex; private options; constructor(options?: ProxyManagerOptions); /** * Parse a proxy URL into config */ static parseProxyUrl(url: string): ProxyConfig; /** * Add a proxy to the rotation */ addProxy(url: string): void; /** * Load proxies from a file (one per line) */ loadFromFile(filePath: string): void; /** * Get the next available proxy (round-robin) */ getNext(): ProxyConfig | null; /** * Get current proxy without advancing */ getCurrent(): ProxyConfig | null; /** * Mark a proxy as failed */ markFailed(url: string): void; /** * Mark a proxy as successful */ markSuccess(url: string): void; /** * Get all available (non-disabled) proxies */ getAvailableProxies(): ProxyConfig[]; /** * Reset all proxies (re-enable disabled ones) */ resetAllProxies(): void; /** * Get all proxy statuses */ getStatuses(): ProxyStatus[]; /** * Get count info */ getStats(): { total: number; available: number; disabled: number; }; /** * Check if any proxies are configured */ hasProxies(): boolean; /** * Format proxy for undici dispatcher */ formatForUndici(proxy: ProxyConfig): { uri: string; auth?: string; }; } /** * Create proxy manager from CLI options */ export declare function createProxyManager(options: { proxy?: string; proxyFile?: string; }): ProxyManager | null; //# sourceMappingURL=proxy.d.ts.map