Skip to content

Repository files navigation

buffer.lol

Fast, simple browser-based tools for network diagnostics, web checks, and everyday developer utilities.

buffer.lol is a focused toolbox for checking hosts, domains, headers, certificates, IP metadata, and common data formats without accounts, dashboards, or clutter. Browser-safe utilities run locally in the user's tab; live network diagnostics go through a same-origin Next.js API with rate limiting, request deduplication, SSRF protections, and short-lived caching where it is safe.

What It Includes

  • Network checks for browser-to-buffer.lol latency, connection stability, DNS records, HTTP headers, TLS certificates, uptime, TCP ports, redirects, robots.txt, sitemaps, and RDAP-backed WHOIS data.
  • IP utilities for public IP detection, network/geolocation estimates, ASN lookups, and browser user-agent signals.
  • Local developer tools for JSON formatting, Base64, hashing, UUIDs, timestamps, URL parsing, JWT decoding, regex testing, and CIDR calculations.
  • A central tool registry that powers landing cards, dynamic tool pages, and API-backed experiences.
  • Hosted documentation maintained in the separate 1337lean/docs repository.
  • Production hardening for same-origin requests, body-size limits, rate limits, private-network target blocking, live request deduplication, concurrency caps, and worker-backed traceroute.

Tool Catalog

Category Tools
Networking Browser latency, connection stability, traceroute, DNS lookup, HTTP headers, SSL certificate checker, uptime checker, port checker, CIDR calculator, WHOIS/RDAP lookup, redirect checker, robots.txt/sitemap checker
IP What's my IP, IP network lookup, ASN/ISP lookup, user-agent parser
Developer JSON formatter, Base64 encoder/decoder, hash generator, UUID generator, timestamp converter, URL parser/encoder, JWT decoder, regex tester

Browser latency and connection-stability tests run from the visitor's browser to buffer.lol using repeated HTTPS samples. Traceroute uses the included diagnostics worker because route tracing is not available in browsers or typical serverless runtimes.

Tech Stack

  • Next.js App Router
  • React 18
  • TypeScript
  • Node.js API routes

Getting Started

npm install
npm run dev

Open http://localhost:3000.

Scripts

Command Description
npm run dev Start the local Next.js app.
npm run build Build the production app.
npm run lint Run ESLint for app and components.
npm test Run the security and request-boundary test suite.
npm run typecheck Run TypeScript without emitting files.

Environment

No environment variables are required for local development.

Copy .env.example to .env.local when configuring production-like behavior:

Variable Required Description
NEXT_PUBLIC_DOCS_URL No Docs URL used by the app. Leave empty locally or set to https://docs.buffer.lol in production.
UPSTASH_REDIS_REST_URL No Enables shared Redis-backed API rate limiting when paired with the token.
UPSTASH_REDIS_REST_TOKEN No Upstash REST token for shared rate limiting.
TRUST_PROXY_HEADERS No Set to true only when the app is behind a proxy that overwrites client-supplied forwarding headers.
TRUSTED_PROXY_PLATFORM No Alternative proxy preset: vercel or cloudflare.
ENABLE_WORKER_TOOLS No Enables the worker-backed traceroute tool.
DIAGNOSTICS_WORKER_URL No Base URL for the diagnostics worker. Required when worker tools are enabled.
DIAGNOSTICS_WORKER_TOKEN Worker Required by the diagnostics worker in production and sent as a bearer token by the app.
DIAGNOSTICS_MAX_CONCURRENCY No Per-instance cap for live diagnostics work. Defaults to the app fallback when unset.

Diagnostics Worker

The diagnostics-worker/ service powers the traceroute visualizer. Browser latency and connection-stability tests run in the browser against buffer.lol.

It exposes POST /api/traceroute, validates public targets, runs Linux traceroute with strict timeouts, and returns JSON to the main app. The worker also keeps server-side ping endpoints available for future/internal use, but the public ping and packet-loss pages do not use them.

To run it in Docker Compose, add the worker service from docker-compose.worker.example.yml to the compose file on the VPS, then set the main app environment:

ENABLE_WORKER_TOOLS=true
DIAGNOSTICS_WORKER_URL=http://diagnostics-worker:8080
DIAGNOSTICS_WORKER_TOKEN=use-a-long-random-secret

The worker container needs NET_RAW for low-level network diagnostics. See diagnostics-worker/README.md for the full compose snippet.

API

Server-backed tools use a shared endpoint:

POST /api/tools/[slug]
Content-Type: application/json

Request body:

{
  "input": "example.com"
}

Response envelope:

{
  "data": {},
  "durationMs": 42,
  "requestId": "00000000-0000-4000-8000-000000000000"
}

Errors use the same envelope:

{
  "error": "Too many requests. Please slow down and try again shortly.",
  "durationMs": 4,
  "requestId": "00000000-0000-4000-8000-000000000000"
}

The route accepts same-origin POST requests, rejects oversized bodies, rate limits by client and target, deduplicates identical in-flight work, blocks private or reserved outbound targets, and caches DNS, RDAP, and ASN results briefly where appropriate.

Project Structure

app/                  Next.js routes, metadata, legal pages, and API handlers
components/           Landing page and reusable tool UI components
data/tools.ts         Tool registry used by cards, pages, and API-backed flows
public/assets/        Public static assets
assets/               README and project media

Deployment

The app can run on any platform that supports Next.js App Router with the Node.js runtime for API routes. This repository currently includes a GitHub Actions workflow for deploying the Dockerized app to a VPS.

Before publishing, run:

npm run lint
npm run typecheck
npm test
npm run build

Privacy And Safety

  • Browser utilities process data locally whenever possible.
  • Browser latency and stability diagnostics send repeated HTTPS requests to buffer.lol. Traceroute and other network diagnostics are explicit server-backed requests to public targets.
  • The API blocks private and reserved outbound network targets to reduce SSRF risk.
  • Rate limiting and request deduplication protect the service from accidental bursts.
  • Proxy IP headers are ignored unless explicitly trusted through environment configuration.

License

Copyright (c) 2026 buffer.lol.

This source is provided for review and deployment of buffer.lol only. See LICENSE for the full terms.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages