Full Toolkit for Next-Level Domain Analysis
Add DNS map summary ℹ️
Felix Wotschofskyaa8677d03084
diff --git a/app/lookup/[domain]/map/page.tsx b/app/lookup/[domain]/map/page.tsxindex 8268f79..ffa45b8 100644--- a/app/lookup/[domain]/map/page.tsx+++ b/app/lookup/[domain]/map/page.tsx@@ -1,5 +1,5 @@import { isbot } from 'isbot';-import { ShieldAlertIcon } from 'lucide-react';+import { CheckCircleIcon, InfoIcon, ShieldAlertIcon } from 'lucide-react';import { headers } from 'next/headers';import type { FC } from 'react';@@ -57,7 +57,51 @@ const MapResultsPage: FC<MapResultsPageProps> = async ({}));- return <ResultsGlobe domain={domain} markers={markers} />;+ let hasDifferentRecords = false;+ for (let i = 1; i < markers.length; i++) {+ const previous = markers[i - 1].results;+ const current = markers[i].results;+ if (+ previous.A.toSorted().toString() !== current.A.toSorted().toString() ||+ previous.AAAA.toSorted().toString() !==+ current.AAAA.toSorted().toString() ||+ previous.CNAME.toSorted().toString() !==+ current.CNAME.toSorted().toString()+ ) {+ console.log(previous, current);+ hasDifferentRecords = true;+ break;+ }+ }++ return (+ <>+ <Alert className="mx-auto mt-16 w-max">+ {hasDifferentRecords ? (+ <>+ <InfoIcon className="h-4 w-4" />+ <AlertTitle>Different records detected!</AlertTitle>+ <AlertDescription>+ Not all regions have the same records for this domain. This{' '}+ <i>could</i> be an indication for the use of GeoDNS.+ <br /> Keep in mind however, that some providers rotate their IP+ addresses, which can also lead to different results.+ </AlertDescription>+ </>+ ) : (+ <>+ <CheckCircleIcon className="h-4 w-4" />+ <AlertTitle>All records are the same!</AlertTitle>+ <AlertDescription>+ All records are the same for all regions. Therefore propagation+ was successful and the domain is not using GeoDNS.+ </AlertDescription>+ </>+ )}+ </Alert>+ <ResultsGlobe domain={domain} markers={markers} />+ </>+ );};export default MapResultsPage;