import type { ServerConfig } from './types.js';
export type UpstreamCommandHandler = (event: string, ...args: unknown[]) => void;
export declare class RelayUpstream {
    private config;
    private onClientEvent;
    private onConnect?;
    private socket;
    private keepaliveTimer;
    constructor(config: ServerConfig, onClientEvent: UpstreamCommandHandler, onConnect?: (() => void) | undefined);
    private registerPairing;
    connect(): void;
    private startKeepalive;
    private stopKeepalive;
    emit(event: string, ...args: unknown[]): void;
    get connected(): boolean;
    private handleHttpProxy;
}
