/** * Converts proxy URL(s) from non-standard format to standard proxy URL format. * * Supported protocols: socks5, socks4, http, https * * Supported input formats: * - Standard: protocol://[user:pass@]host:port * - Colon-separated: protocol://host:port:username:password * - Colon-separated without protocol: host:port:username:password (assumes socks5) * * * @param proxyUrl - Single proxy URL or array of proxy URLs in any supported format * @param skipInvalid - If true and array is passed, skips invalid URLs instead of throwing errors (default: false) * @returns Standard proxy URL(s): protocol://[user:pass@]host:port * @throws Error if the proxy URL format is invalid (unless skipInvalid is true for arrays) * * @example * ```ts * // Single URL - Standard format (returns as-is) * convert("socks5://user:pass@example.com:1080") * // => "socks5://user:pass@example.com:1080" * * // Single URL - Colon-separated format * convert("socks5://example.com:1080:user:pass") * // => "socks5://user:pass@example.com:1080" * * // Single URL - Without protocol (defaults to socks5) * convert("example.com:1080:user:pass") * // => "socks5://user:pass@example.com:1080" * * // HTTP proxy * convert("http://proxy.com:8080:user:pass") * // => "http://user:pass@proxy.com:8080" * * // SOCKS4 proxy * convert("socks4://proxy.com:1080:user:pass") * // => "socks4://user:pass@proxy.com:1080" * * // Array of URLs * convert([ * "socks5://proxy1.com:1080:user:pass", * "proxy2.com:1080:admin:secret" * ]) * // => [ * // "socks5://user:pass@proxy1.com:1080", * // "socks5://admin:secret@proxy2.com:1080" * // ] * ``` */ export declare function convert(proxyUrl: string, skipInvalid?: false): string; export declare function convert(proxyUrl: string[], skipInvalid?: boolean): string[]; export declare function convertLine(proxyUrl: string): string;