import type * as x from 'x-value'; import type { RouteMatchOptions } from './router.js'; export declare const TUNNEL_PORT_DEFAULT: number & Record & Record & Record; export declare const INITIAL_WINDOW_SIZE: number; export declare const MAX_OUTSTANDING_PINGS = 5; export type ConnectionId = x.Nominal<'connection id', number>; export declare const TUNNEL_HEADER_NAME = "x-tunnel"; export type TunnelId = x.Nominal<'tunnel id', number>; export type TunnelStreamId = x.Nominal<'tunnel stream id', number>; export type TunnelInOutHeaderData = { type: 'in-out-stream'; id: TunnelStreamId; host: string; port: number; }; export type TunnelOutInHeaderData = { type: 'tunnel'; alias: string | undefined; routeMatchOptions: RouteMatchOptions; password?: string; } | { type: 'out-in-stream'; id: TunnelStreamId; }; export type TunnelOutInTunnelResponseHeaderData = { alias: string | undefined; }; export type TunnelOutInErrorResponseHeaderData = { error: string; }; export declare function encodeTunnelHeader(data: T): string; export declare function decodeTunnelHeader(header: string): T | undefined;