Skip to content

komyl/looking-glass

looking-glass

A self-hosted network looking glass written in Go. Zero external runtime dependencies. Designed for ISPs, data centers, and network operators who need full infrastructure autonomy.

Probes are distributed across multiple measurement nodes. The master orchestrates, the agents execute. BGP routing data is loaded from local MRT dumps and enriched with GeoIP and AS operator information at query time.

Quick start

go build -ldflags="-s -w" -trimpath -o looking-glass .
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -trimpath -o agent ./cmd/agent/

See INSTALL.md for full deployment instructions.

Features

  • Multi-node ping — all nodes probed in parallel, results in a single table
  • Traceroute — user selects source node. Output streamed in real time via SSE. Each hop IP is enriched with ASN and operator name from the ipinfo dataset.
  • Port check — TCP connect with open/closed/filtered status
  • DNS lookup — queries multiple resolvers in parallel and returns clean grouped results (shows how many resolvers returned each record)
  • SSL inspection — certificate details, validity window, SAN list
  • BGP route lookup — IP, prefix, ASN; enriched with GeoIP and AS operator names
  • AS path rendered as directed chain: AS34549 (meerfarbig) → AS15169 (Google LLC)
  • Shareable results — "Copy Link" button available on all tools. Generated links can auto-run the check when opened (run=1)

Source layout

main.go               master entry point
cmd/agent/            agent binary
cmd/mrt2json/         offline MRT-to-JSON converter
internal/bgp/         BGP table: radix trie, JSON loader, hot-reload
internal/geoip/       ipinfo CSV loader, radix trie, ASN index
internal/handler/     HTTP handlers and agent proxy
internal/nodes/       node registry
internal/ratelimit/   token bucket rate limiter
internal/validator/   input sanitization
web/index.html        UI, embedded into binary at build time

Requirements

  • Go 1.22+
  • Master node: 4+ cores, 8+ GB RAM
  • Agent nodes: 2+ cores, 4+ GB RAM
  • Debian 13 or Ubuntu 24.04

Documentation

License

GNU Affero General Public License v3.0 — see LICENSE.

About

self-host looking glass

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors