import { ITcpConnection, TcpEndpoint } from '@fuman/net';
import { tl } from '../../tl/index.js';
import { BasicDcOption, ICryptoProvider, Logger } from '../../utils/index.js';
import { IPacketCodec, ITelegramConnection, TelegramTransport } from '../transports/index.js';
/**
 * MTProto proxy settings
 */
export interface MtProxySettings {
    /**
     * Host or IP of the proxy (e.g. `proxy.example.com`, `1.2.3.4`)
     */
    host: string;
    /**
     * Port of the proxy (e.g. `8888`)
     */
    port: number;
    /**
     * Secret of the proxy, optionally encoded either as hex or base64
     */
    secret: string | Uint8Array;
}
/**
 * Base for a TCP transport that connects via an MTProxy
 */
export declare abstract class BaseMtProxyTransport implements TelegramTransport {
    abstract _connectTcp(endpoint: TcpEndpoint): Promise<ITcpConnection>;
    readonly _proxy: MtProxySettings;
    private _rawSecret;
    private _randomPadding;
    private _fakeTlsDomain;
    private _crypto;
    private _log;
    setup(crypto: ICryptoProvider, log: Logger): void;
    /**
     * @param proxy  Information about the proxy
     */
    constructor(proxy: MtProxySettings);
    getMtproxyInfo(): tl.RawInputClientProxy;
    packetCodec(dc: BasicDcOption): IPacketCodec;
    connect(): Promise<ITelegramConnection>;
    private _handleConnectFakeTls;
}
