Add IP & DNS lookup page at dsns.dev/ip - #16
Closed
dsnsgithub wants to merge 3 commits into
Closed
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toicanhazip), 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.toolsdoes. Resolver identity can't be read from the browser, so the page resolves a series of unique, uncacheable subdomains underipleak.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
ipwho.is,ipify/icanhazip,cloudflare-dns.com,ipleak.net) — no API keys, no new dependencies, and the page stays statically prerendered.Testing
astro buildpasses.astro checkreports the same 10 pre-existing errors onGithubFeed.astro/types/GitHub.ts(the@octokit/openapi-typesGitHub-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 techniquednscheck.toolsuses against its own nameserver — doing this without a third party would mean running an authoritative nameserver ondsns.dev, which is worth considering if you'd rather not depend on them.Generated by Claude Code