import { SocksProxy } from "socks";
import { Agent, buildConnector } from "undici";
import Connector = buildConnector.connector;
import TLSOptions = buildConnector.BuildOptions;
export type SocksProxies = SocksProxy | SocksProxy[];
/**
 * Create an Undici connector which establish the connection through socks proxies.
 *
 * If the proxies is an empty array, it will connect directly.
 *
 * @param proxies The proxy server to use or the list of proxy servers to chain.
 * @param tlsOpts TLS upgrade options.
 */
export declare function socksConnector(proxies: SocksProxies, tlsOpts?: TLSOptions): Connector;
export interface SocksDispatcherOptions extends Agent.Options {
    /**
     * TLS upgrade options, see:
     * https://undici.nodejs.org/#/docs/api/Client?id=parameter-connectoptions
     *
     * The connect function is not supported.
     * If you want to create a custom connector, you can use `socksConnector`.
     */
    connect?: TLSOptions;
}
/**
 * Create a Undici Agent with socks connector.
 *
 * If the proxies is an empty array, it will connect directly.
 *
 * @param proxies The proxy server to use or the list of proxy servers to chain.
 * @param options Additional options passed to the Agent constructor.
 */
export declare function socksDispatcher(proxies: SocksProxies, options?: SocksDispatcherOptions): Agent;
