import { Suspense } from "react"
import { env } from "@/lib/env"
import { lookupDomain } from "@/lib/dns"
import { normalizeDomain } from "@/lib/validate"
export const metadata = { title: "解析测试" }
const cardClass = "rounded-lg border border-black/10 p-4 dark:border-white/15"
export default function ResolvePage({ searchParams }: PageProps<"/resolve">) {
return (
向 解析测试
{env.dnsServer} 发起查询,验证记录是否已经生效。
输入域名后点「解析」开始查询。
) } const target = normalizeDomain(raw) const outcome = await lookupDomain(target) return ({target}
{outcome.status === "a" ? (| IPv4 地址 | TTL |
|---|---|
| {entry.address} | {entry.ttl} |
{outcome.detail}
) : null} {outcome.status === "error" ? ({outcome.detail}
) : null}