import type { NodeRouteHandler } from "./http-kit.js"; import type { IncomingMessage } from "node:http"; import type { Duplex } from "node:stream"; import { type RemoteAccessController } from "./remote-access-auth.js"; export declare const portholePathPrefix = "/porthole/"; export type PortholeProxyContext = { upstreamOrigin: () => string | undefined; }; export declare function isPortholePath(pathname: string): boolean; export declare function createPortholeHttpHandler(context: PortholeProxyContext): NodeRouteHandler; export declare function createPortholeUpgradeRoute(options: { allowedOrigins: () => Set; remoteAccess: RemoteAccessController; upstreamOrigin: () => string | undefined; }): { matches(pathname: string): boolean; handle(request: IncomingMessage, socket: Duplex, head: Buffer): void; };