/** * The one-time, root-owned half of `.test` sandbox names (see `dns.ts`): a * resolver(5) file that sends `.test` to 127.0.0.1:. Nothing runs in the * background — the forwarder lives in the Mac-side `orc start` of each running * sandbox. Install and status prove the routing with a short-lived forwarder * of their own when no sandbox is serving. */ export declare const RESOLVER_FILE = "/etc/resolver/test"; /** * Where `install --force` keeps a resolver file another tool wrote, for * `uninstall` to put back. Not under /etc/resolver: every file there is read * as a resolver for the domain it's named after. */ export declare const RESOLVER_BACKUP = "/etc/orckit-resolver-test.backup"; /** `/etc/resolver/test` content (resolver(5)): nameserver + non-standard port. */ export declare function resolverConfig(port: number): string; /** The forwarder port from an orckit-managed resolver file; null if it isn't ours. */ export declare function parseResolverPort(content: string): number | null; /** The forwarder port when orckit set up `.test`, else null. */ export declare function installedDnsPort(file?: string): number | null; /** * True when an orckit forwarder answers on `port` — the health name with its * own address, so another DNS server holding the port doesn't count. */ export declare function forwarderAlive(port: number, timeoutMs?: number): Promise; /** * The whole path works: `getaddrinfo` (what browsers and curl use) sends the * health name through `/etc/resolver/test` to a forwarder. */ export declare function systemRoutesTest(): Promise; export interface InstallOptions { port?: number; /** Replace a `/etc/resolver/test` orckit didn't write (kept for uninstall). */ force?: boolean; log: (msg: string) => void; } export declare function installDns(opts: InstallOptions): Promise; /** Remove orckit's resolver file; false when there was none. */ export declare function uninstallDns(log: (msg: string) => void): Promise; /** What `orc sandbox dns status` reports. */ export interface DnsStatus { /** Port from orckit's resolver file; null when there is none. */ port: number | null; /** A running sandbox's `orc start` is answering on the port right now. */ serving: boolean; /** macOS routes `.test` to the port (checked with a temporary forwarder if needed). */ systemRoutes: boolean; /** Why the routing couldn't be checked (e.g. the port is taken). */ error?: string; } export declare function dnsStatus(): Promise; //# sourceMappingURL=dns-resolver.d.ts.map