mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 15:05:00 +00:00
- Embed web UI (index.html, app.js, style.css) via go:embed - Title: 'IP Location & Status' instead of 'check-ip' - 'Show my IP Info' link for lookups of the visitor's own IP - Domain resolution with resolved_from field in JSON - Richer GeoIP fields: region ISO, continent, coordinates, traits, etc. - /api/raw debug endpoint for raw MaxMind records - net/geoip: expand Info struct and add LookupRaw method
1.1 KiB
1.1 KiB
check-ip — Handoff
Done
- Embedded web UI at
/(index.html, app.js, style.css) //go-embed web/**+fs.Sub(webFS, "web")+http.FileServerGET /check?host=— resolves domains, returns JSON verdictGET /check?(empty host) — returns client's IP (via X-Forwarded-For / RemoteAddr)GET /check?host=<ip>— pre-fills input and auto-submits on page loadGET /healthz— dataset health- Deployed to
ip.bnna.net:3080 - Created
go-webapp-embedskill
Remaining
-
?ip=query param removed —handle()only checkshostnow. Existing API consumers using?ip=will break. Fix:query := cmp.Or(r.URL.Query().Get("host"), r.URL.Query().Get("ip")) -
105dvhin CSS — not universally supported. Use100dvhormin-height: 100vh. -
Domain resolution uses only first result —
net.LookupHostcan return IPv4 + IPv6. Consider showing all resolved addresses. -
No debouncing on client — fast clicks send multiple requests. Add a simple debounce in app.js.
-
Error display is raw — DNS errors show technical messages. Could map to user-friendly text.