@worldwideview/wwv-plugin-ip-geolocate
v1.1.0
Published
Find where any IP address lives on the globe. City-level lookup, fully offline.
Maintainers
Readme
wwv-plugin-ip-geolocate
WorldWideView plugin — find where any IPv4 address lives on the globe. City-level lookup, fully offline.
Usage
Open the plugin's sidebar, type an IPv4 address (e.g. 8.8.8.8), and press Locate. The plugin places a marker at the city's real coordinates and shows the resolved city (e.g. 8.8.8.8 → Mountain View, US). Invalid, private, or unmatched IPs show "Private IP" / "No match" and clear the map.
City resolution is approximate to block level (a /20 block is labelled with its most populous city), not street-level.
Data
- Source: sapics/ip-location-db
dbip-city-ipv4.csv.gz - Attribution (CC BY 4.0): IP geolocation data © DB-IP.com (https://db-ip.com), licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). See
data/ATTRIBUTION. - Bundled compactly in
data/data.json(~5.05 MB, 271,369 blocks across 53,836 city locations, 4096-address/20granularity). Ranges with the same city are merged; each block is labelled with its most populous city. - Regenerate with:
node scripts/prepare-data.mjs(after re-downloadingdbip-city-ipv4.csvintodata/). SetBLOCK_BITSto trade precision for size if needed.
Runtime
No backend, no API keys, no network. The lookup runs entirely client-side via binary search over the bundled ranges.
Build
pnpm build # vite build → dist/frontend.mjs (gitignored, regenerated by CI)