/** * Server-side networking helpers that need Node builtins, layered over the * browser-safe URL / IP toolkit in `@dbx-tools/shared-core`'s `net` module: DNS * resolution ({@link resolveHostIps}, `node:dns`) and public-IP discovery * ({@link getPublicIp}). * * @module */ import { net } from "@dbx-tools/shared-core"; /** * This process's outbound public IP, cached for 5 minutes. Asks Cloudflare's * `cdn-cgi/trace` first and falls back to ipify. Useful for allowlisting or for * reasoning about egress from a Databricks App. */ export declare const getPublicIp: () => Promise; /** * Resolve the host of `input` to its IP address(es) via the OS resolver * (`dns.lookup` with `all: true`, so both A and AAAA records are returned when * the host is dual-stacked). Accepts any `net.UrlLike` - a bare hostname, a full * URL, or a `{ url }` wrapper - and returns the deduplicated list of literal * addresses. Never throws: an unparseable input, an IP-literal host (returned * as-is without a DNS round-trip), or a resolution failure all yield the * appropriate list or `[]`. * * `dns.lookup` (not `resolve4` / `resolve6`) is used so `/etc/hosts` and the * platform resolver order are honored, matching what an outbound connection to * the host would actually use. */ export declare function resolveHostIps(input: net.UrlLike): Promise;