import type { AddressInfo } from "node:net"; export interface RedirectServerOptions { /** The domain whose hosts are redirected: itself and every host under it; null redirects nothing. */ readonly domain: () => string | null; } /** * The plain-HTTP listener of a host that terminates TLS itself: it answers * every request with a redirect to the same host and path over HTTPS, and * nothing else. Only the fleet's own domain and the hosts under it are * redirected; any other `Host` is 421, so the listener can never be made to * send a client somewhere the fleet does not serve. GET and HEAD move with * 301; any other method with 308, which keeps the method and the body, so a * client that sent a request in the clear is told where to send it, and its * request is never acted on here. */ export declare class RedirectServer { private readonly options; private readonly server; constructor(options: RedirectServerOptions); listen(port: number, host: string): Promise; close(): Promise; private handle; /** The host a request named, lower-cased, without a port; null when it named none or not a name. */ private static hostnameOf; } //# sourceMappingURL=RedirectServer.d.ts.map