IP Geolocation Β· DNS Multi-Resolver Β· HTTP Headers Β· Port Scanner Β· SSL/TLS Audit Β· WHOIS/RDAP Β· CT Subdomains Β· Batch Jobs
Features β’ API β’ Environment β’ Deploy β’ Testing β’ Structure
NetUtils is a lightweight, serverless network diagnostic toolkit built entirely on native Node.js modules β no third-party dependencies required. It bundles five essential networking tools behind a clean web UI and a simple JSON API, and deploys to Vercel in minutes.
Tip
Every endpoint returns a consistent { status, message, data } JSON shape, so it's easy to script against or plug into your own dashboard.
| # | Tool | Description | API Endpoint |
|---|---|---|---|
| π | IP Info | Geolocation, ISP, ASN, proxy/VPN flags, multi-provider failover (ip-api β ipwho.is β ipinfo) | GET /api/ip |
| π‘ | DNS Lookup | A/AAAA/MX/TXT/NS/CNAME/SOA/SRV across 3 DoH resolvers (Cloudflare/Google/Quad9), DNSSEC status, resolver diff (hijack detection) | GET /api/dns |
| π | HTTP Headers | Header analysis, redirect chain, security score | GET /api/headers |
| π | Port Scanner | Concurrent engine (32 workers), custom ranges, banners, SSE live progress | GET /api/portscan |
| π | SSL Audit | Chain walk, OCSP best-effort, TLS 1.0β1.3 matrix, cipher probe, score 0β100 + grade | GET /api/ssl |
| π’ | WHOIS/RDAP | RDAP-first (IANA bootstrap) with raw whois:43 fallback, domain/IP/ASN | GET /api/whois |
| π§Ύ | Cert Transparency | Subdomain discovery via crt.sh + certspotter, issuance timeline | GET /api/ct |
| βοΈ | Batch Scan | Async jobs (200 items, concurrency 5, retry, webhook on complete) | POST /api/scan |
| π | Share Links | 8-char Crockford codes, owner delete, SVG OG cards | POST /api/share |
| π€ | AI Reports | Streaming diagnostic summaries (OpenAI-compatible, optional, opt-in) | GET /api/ai |
Platform: i18n (EN/ID/ZH), dark mode + system sync, βK command palette, geo map (zero-dep canvas), lookup history + CSV/JSON export, PWA (offline shell + last-result cache), shareable results, webhooks (HMAC-SHA256), structured logs with request IDs.
- SSRF guard (
lib/netguard.js): IP classification (RFC1918, loopback, link-local, CGNAT, cloud metadata169.254.169.254, IPv6 ULAβ¦), DNS rebinding detection (double resolve, 500ms apart), port allowlist, 5-hop redirect cap, punycode normalization, homograph/IDN-lookalike flags. - Rate limiting (
lib/ratelimit.js): sliding window per-IP per-endpoint (default 30 req/min, burst 5), token bucket,Retry-After+X-RateLimit-*headers, optional Upstash Redis backend. - Headers (
vercel.json): strict CSP, HSTS preload,X-Frame-Options: DENY,nosniff,Referrer-Policy,Permissions-Policy, COOP. - Webhooks: HMAC-SHA256 signature (
X-Webhook-Signature), 3 retries with 1s/5s/30s backoff. - AI guardrails: daily USD budget (hard stop), 24h response cache, prompt-injection hardened.
- Uniform error contract:
{ status: "error", code, message, data }β codes:BAD_REQUEST,INVALID_TARGET,BLOCKED_TARGET,REBINDING_DETECTED,UNRESOLVABLE,NOT_FOUND,RATE_LIMITED,UPSTREAM_ERROR,SERVICE_UNAVAILABLE,BUDGET_EXHAUSTED.
| Layer | Technology |
|---|---|
| Frontend | HTML5 Β· CSS3 (dark theme) Β· Vanilla JavaScript |
| Backend | Node.js (built-in dns, net, tls, http modules) |
| Hosting | Vercel Edge Network + Serverless Functions |
| Dependencies | Zero β no npm packages required |
# Clone the repository
git clone https://github.com/TheyanzXD/ip-track.git
cd ip-track
# Install the Vercel CLI
npm i -g vercel
# Start the local dev server
vercel devThe app will be available at http://localhost:3000.
Option A β Vercel CLI
npm i -g vercel
vercel login
vercel
# Framework Preset: OtherOption B β GitHub Import
- Push this repository to your own GitHub account
- Go to vercel.com/new
- Import the repo
- Set Framework Preset to Other
- Click Deploy β
All optional β zero config runs in-memory.
| Variable | Purpose |
|---|---|
UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN |
Shared rate limits + share links + scan cache (memory fallback otherwise) |
IPINFO_TOKEN |
Enable ipinfo.io as third IP provider |
AI_API_KEY / AI_BASE_URL / AI_MODEL |
AI reports (OpenAI-compatible API) |
BUDGET_DAILY_USD |
Daily AI spend cap (default 1.00) |
SHARE_SECRET |
HMAC key for share owner tokens (auto-generated per cold start otherwise) |
LOG_LEVEL |
debug / info / warn / error (default info) |
All endpoints return JSON { status, message, data } (errors: { status: "error", code, message, data }). Full interactive spec: /docs (also /openapi.json β OpenAPI 3.1).
/api/ip β your own IP info
/api/ip?data=8.8.8.8 β lookup a specific IP
π¦ Example response
{
"status": "success",
"message": "IP information retrieved",
"data": {
"ip": "8.8.8.8",
"country": "United States",
"region": "California",
"city": "Mountain View",
"isp": "Google LLC",
"asn": "AS15169",
"timezone": "America/Los_Angeles",
"latitude": 37.4056,
"longitude": -122.0775,
"proxy": false,
"hosting": true,
"meta": { "provider": "ip-api", "cached": false, "elapsedMs": 42 }
}
}/api/dns?data=example.com β all records
/api/dns?data=example.com&type=MX β MX records only
π¦ Example response
{
"status": "success",
"message": "DNS records retrieved",
"data": {
"domain": "example.com",
"records": {
"A": ["93.184.216.34"],
"MX": [{ "exchange": "mail.example.com", "priority": 10 }]
},
"dnssec": { "secure": true, "status": "validated" },
"resolverDiff": []
}
}/api/headers?data=https://example.com
/api/portscan?data=example.com
/api/portscan?data=example.com&ports=80,443,8000-8010 # max 50 ports
/api/portscan?data=example.com&stream=1 # SSE live progress
/api/ssl?data=google.com
/api/ssl?data=google.com&port=443
/api/whois?data=example.com # domain
/api/whois?data=8.8.8.8 # IP range (inetnum)
/api/whois?data=AS15169 # autonomous system
/api/ct?data=example.com
{
"tool": "dns",
"items": ["example.com", "google.com", "cloudflare.com"],
"webhookUrl": "https://your.app/hook",
"webhookSecret": "optional-hmac-secret"
}Poll GET /api/scan?jobId=..., stream GET /api/scan?jobId=...&stream=1, abort ?abort=1.
{ "payload": { "tool": "ssl", "query": "example.com", "result": { } } }β { code: "8CHARS", url: "/#/share/8CHARS", expiresAt } (TTL 7 days). Preview card: GET /api/og?code=....
/api/ai?tool=ssl&data=<urlencoded-json>&stream=1
GET /api/health β upstream reachability + memory + uptime (503 degraded)
GET /api/metrics β rate-limit stats, cache hits, error count
π Full interactive docs at
/docsΒ· machine-readable spec at/openapi.json
npm test # node --test, 37 tests across 5 suites
npm run check # syntax check on generator scriptsCoverage: netguard (SSRF classification, punycode, target parsing, port guard), ratelimit (window + burst semantics), validator (schema subset), scanner (port ranges), homograph (confusable detection). CI (.github/workflows/ci.yml) runs the suite on Node 18/20/22.
π¦ network-utils
βββ π index.html # Main app (9 tools + palette + share modal)
βββ π docs.html # Interactive API docs + playground
βββ π manifest.webmanifest # PWA manifest
βββ π sw.js # Service worker (precache + offline snapshots)
βββ π openapi.json # OpenAPI 3.1 spec (generated)
βββ π security.txt # + .well-known/security.txt
βββ π¨ css/style.css # Light + dark theme (CSS tokens)
βββ β‘ js/
β βββ main.js # Frontend logic
β βββ theme.js # light/dark/system sync
β βββ i18n.js # EN/ID/ZH runtime
β βββ history.js # localStorage history + export
β βββ palette.js # βK fuzzy command palette
β βββ map.js # Zero-dep canvas world map
βββ π locales/{en,id,zh}.json
βββ π₯οΈ api/
β βββ ip.js dns.js headers.js portscan.js ssl.js
β βββ whois.js ct.js scan.js share.js og.js ai.js
β βββ health.js metrics.js
βββ π lib/
β βββ netguard.js # SSRF guard + input validation
β βββ ratelimit.js # Sliding window + burst
β βββ http.js # Shared handler wrapper + error contract
β βββ validator.js # Zero-dep JSON-schema subset
β βββ schemas.js # Response schema source of truth
β βββ ipintel.js doh.js dnscache.js # DNS + IP engines
β βββ scanner.js scanstore.js jobs.js # Scan engines
β βββ sslprobe.js rdap.js ct.js # SSL/WHOIS/CT engines
β βββ kv.js webhooks.js ai.js homograph.js # Platform services
β βββ logger.js # Structured JSON logs + requestId
βββ π§ͺ test/ # node --test suites (37 tests)
βββ βοΈ .github/workflows/ci.yml
βββ π¦ package.json # Zero dependencies
βββ βοΈ vercel.json # Security headers + rewrites
IP Grabber: Shows your own IP or domains you own. Not for tracking without consent. Port Scanner: Only scan systems you own or have written permission to test. Privacy: Lookups are ephemeral. Share links store only the payload you explicitly publish (TTL 7 days, owner-deletable). History, theme, and language stay in your browser's localStorage. AI reports are opt-in and cached server-side for 24h only.

