import net from "node:net";
export interface DesktopConnectProxyOptions {
    host: string;
    port: number;
    bridgeHost: string;
    bridgePort: number;
    logPath?: string;
    /**
     * When true, CONNECT requests to non-Cursor hosts are tunneled through to
     * their destination, turning this into an open forwarder. Defaults to false
     * so only Cursor backends (cursorHostnames) are reachable.
     */
    passthrough?: boolean;
    cursorHostnames?: readonly string[];
    headerTimeoutMs?: number;
    /**
     * Allow binding to a non-loopback host. Off by default to avoid exposing the
     * proxy beyond the local machine.
     */
    allowExternalHost?: boolean;
}
export interface DesktopConnectProxy {
    server: net.Server;
    close(): Promise<void>;
}
export interface DesktopConnectProxyEvent {
    message: "desktop connect proxy";
    event: "listening" | "connect" | "http-rejected" | "passthrough-blocked" | "header-timeout" | "upstream-error" | "client-closed";
    host?: string;
    port?: number;
    targetHost?: string;
    targetPort?: number;
    cursorBackend?: boolean;
    error?: string;
}
export declare function startDesktopConnectProxy(options: DesktopConnectProxyOptions): Promise<DesktopConnectProxy>;
