Skip to content

Add IP & DNS lookup page at dsns.dev/ip - #16

Closed
dsnsgithub wants to merge 3 commits into
masterfrom
claude/dsns-dev-ip-page-ta6cpe
Closed

Add IP & DNS lookup page at dsns.dev/ip#16
dsnsgithub wants to merge 3 commits into
masterfrom
claude/dsns-dev-ip-page-ta6cpe

Conversation

@dsnsgithub

Copy link
Copy Markdown
Owner

Adds /ip — a page showing your IP address, your DNS resolvers, and geolocation for any IP you want. Styled to match the existing tool pages (same viola palette, card/table treatment, and search-box pattern as the recent games lookup).

Sections

Your IP Address — IPv4 and IPv6 detected against protocol-specific endpoints (api.ipify.org / api6.ipify.org, falling back to icanhazip), each geolocated with location, network/ASN, and timezone. The two probes are tracked independently, so on a network without IPv6 the hanging v6 probe never delays the v4 result; both endpoints per protocol race each other rather than running in sequence.

Your DNS Resolvers — the part dnscheck.tools does. Resolver identity can't be read from the browser, so the page resolves a series of unique, uncacheable subdomains under ipleak.net; their authoritative nameserver records which resolvers asked, and returns them. Each resolver is then enriched with reverse DNS (via Cloudflare DoH), provider/ASN, and location.

Geolocate an IP — accepts an IPv4 address, an IPv6 address, a domain, or a pasted URL. Hostnames are resolved over DoH first, then geolocated. Shows type, location, postal code, coordinates, network, ISP, and timezone, plus an OpenStreetMap view and a note that IP geolocation is approximate.

Notes

  • Everything runs client-side against free, CORS-enabled APIs (ipwho.is, ipify/icanhazip, cloudflare-dns.com, ipleak.net) — no API keys, no new dependencies, and the page stays statically prerendered.
  • Lookups are concurrency-limited to 4 and cached per address to stay well inside free-tier rate limits; resolver enrichment is capped at 16 addresses. Failed lookups are deliberately not cached so a retry can still succeed.
  • Handled edge cases: reserved/private ranges, unresolvable hostnames, malformed input, and no resolvers detected (ad blockers can block the DNS test).
  • Also linked from the projects page, alongside the other tool pages.

Testing

astro build passes. astro check reports the same 10 pre-existing errors on GithubFeed.astro/types/GitHub.ts (the @octokit/openapi-types GitHub-hosted override can't be fetched in this environment) — none from the new files.

Each API was verified directly for CORS headers and response shape. The page itself was driven in Chromium against those captured response shapes: IPv4/IPv6 cards, resolver table, and all six lookup paths above render correctly with no console errors, and the layout was checked at desktop and mobile widths.

One thing worth a look before merge: the DNS resolver detection depends on ipleak.net's endpoint, which is public and CORS-open but undocumented. It's the same technique dnscheck.tools uses against its own nameserver — doing this without a third party would mean running an authoritative nameserver on dsns.dev, which is worth considering if you'd rather not depend on them.


Generated by Claude Code

Adds /ip with three sections, styled to match the existing tool pages:

- Your IP address: IPv4 and IPv6 detected in parallel against
  protocol-specific endpoints, each geolocated. The two probes are
  tracked separately so a hanging IPv6 probe never delays the IPv4
  result on networks without IPv6.
- Your DNS resolvers: resolves a series of unique, uncacheable
  subdomains and reports which resolvers asked for them, enriched with
  reverse DNS, provider, and location.
- Geolocate an IP: accepts an IPv4/IPv6 address, a domain, or a pasted
  URL, resolving hostnames over DoH first, and shows full geolocation
  details with an OpenStreetMap view.

Also links the page from the projects list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wbQRisaMVqCkSNdX6Rn55
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dsns.dev Ready Ready Preview Aug 13, 2026 9:39am

The lookup box now starts out holding the visitor's own address and shows
its result straight away, with a badge marking it as their own. Their
geolocation is already cached from detection, so this costs no extra
request. Each IP card also gets a "Locate on map" button that retargets
the lookup and scrolls down to it.

Swaps the OpenStreetMap embed iframe for a map built from CARTO Positron
tiles: a pale basemap that suits the site far better than the default
mapnik render. Tiles are positioned directly from the Web Mercator
projection rather than through a map library, so this stays
dependency-free, and the view gets retina tiles, zoom controls, and a
marker in the site's accent colour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wbQRisaMVqCkSNdX6Rn55
@dsnsgithub dsnsgithub changed the title Add IP &amp; DNS lookup page at /ip Add IP & DNS lookup page at dsns.dev/ip Aug 13, 2026
A pin on exact coordinates claimed a precision the data doesn't have.
These lookups resolve to a city or a network's registered area, so the
map now draws that area instead of a spot:

- The marker becomes a soft haze, blurred so there is no boundary to
  trace, sized from the real radius the answer implies — tighter when a
  city came back, wider when only a region or country did.
- The view frames itself on that area instead of a fixed street-level
  zoom, keeping the surrounding context visible.
- Coordinates are shown to two decimals, roughly a kilometre; more
  digits dressed a city-level guess up as a street-level one.
- The caption explains it locates the network, not the person.

Also adds an opt-in PUBLIC_MAPBOX_TOKEN. Mapbox and Stadia both reject
keyless tile requests, so CARTO Positron stays the default; setting a
token switches styles and attribution, and tiles fall back to CARTO if
the token is rejected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wbQRisaMVqCkSNdX6Rn55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants