domainlooker
Version:
A fast CLI and MCP server for inspecting domains: WHOIS/RDAP, DNS, SSL, ports, subdomains, with CSV/JSON export.
57 lines • 2.4 kB
TypeScript
/**
* DNS propagation checking. After a record changes, different resolvers pick up
* the new value at different times (caching, TTLs, refresh schedules) and some
* regions may see different answers (GeoDNS). This queries a worldwide spread of
* public resolvers — regional ISP resolvers on every inhabited continent plus
* the global anycast providers — compares their answers, and reports which are
* in sync with the majority.
*
* The resolver list was verified to answer external queries; the anycast
* providers (Google/Cloudflare/Quad9/OpenDNS) answer from the PoP nearest the
* querying host, so their `location` is representative rather than exact.
*/
export type RecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'NS' | 'TXT';
export interface PublicResolver {
id: string;
provider: string;
ip: string;
location: string;
country: string;
lat: number;
lon: number;
}
export interface ResolverResult {
resolver: PublicResolver;
answer: string[] | null;
status: 'in-sync' | 'differs' | 'no-answer';
error?: string;
}
export interface PropagationResult {
domain: string;
recordType: RecordType;
expected: string[] | null;
results: ResolverResult[];
inSync: number;
total: number;
percent: number;
}
/** A spread of well-known public resolvers with representative locations. */
export declare const PUBLIC_RESOLVERS: PublicResolver[];
export declare class PropagationService {
private resolvers;
constructor(resolvers?: PublicResolver[]);
check(domain: string, recordType?: RecordType, timeoutMs?: number): Promise<PropagationResult>;
private queryOne;
}
/** Classify per-resolver answers against the majority. Pure — no network. */
export declare function buildResult(domain: string, recordType: RecordType, answers: Array<{
resolver: PublicResolver;
answer: string[] | null;
error?: string;
}>): PropagationResult;
/** Canonical form of an answer set: sorted, so order differences don't count as drift. */
export declare function normalize(answer: string[]): string[];
export declare function sameAnswer(a: string[] | null, b: string[] | null): boolean;
/** The most common non-null answer across resolvers — the value we treat as "propagated". */
export declare function majorityAnswer(answers: Array<string[] | null>): string[] | null;
//# sourceMappingURL=propagation.d.ts.map