RouteLens

module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2026 License: MIT

README ΒΆ

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β•    β•šβ•β•   β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•β•β•šβ•β•β•β•β•β•β•

Modern, Agentless Network Observability Platform

Trace routes β€’ Measure latency β€’ Visualize paths β€” all from a single binary

Go Report Card Release Build Status Docker Image

πŸ‡¨πŸ‡³ δΈ­ζ–‡ζ–‡ζ‘£


✨ Features

Feature Description
πŸ›°οΈ Agentless Monitoring Ping, MTR traceroute, and SSH-based bandwidth testing β€” no agents required on targets
πŸ”„ Auto-Update One-click in-app upgrade mechanism (AdGuard Home style)
πŸ” Secure by Default JWT authentication, login rate limiting (5/min), input sanitization
🎨 Modern UI React 19 + Ant Design v5 with automatic dark mode
🌍 Auto GeoIP Automatic GeoIP database download and hop enrichment
πŸ“Š Historical Metrics Time-series charts for latency, packet loss, and bandwidth trends
πŸ“¦ Single Binary Zero dependencies, one-file deployment with systemd support
🎯 Target Control Enable/disable monitoring targets without deletion

πŸš€ Quick Start

docker run -d \
  --name routelens \
  --cap-add NET_RAW \
  --cap-add NET_ADMIN \
  -p 8080:8080 \
  -v $(pwd)/data:/data \
  -e RS_JWT_SECRET=your_secure_secret_here \
  ghcr.io/yuanweize/routelens:latest

Option 2: Docker Compose

curl -O https://raw.githubusercontent.com/yuanweize/RouteLens/master/compose.yml
docker compose up -d

Option 3: Binary

Download from Releases:

# Linux
curl -LO https://github.com/yuanweize/RouteLens/releases/latest/download/routelens_1.3.1_linux_amd64.tar.gz
tar xzf routelens_1.3.1_linux_amd64.tar.gz
chmod +x routelens

# Run directly
./routelens --port 8080

# Or install as systemd service
./routelens service install --port 8080

πŸ”§ Initial Setup

  1. Open http://your-server:8080
  2. You'll be redirected to /setup on first run
  3. Create your admin account
  4. Add monitoring targets in the dashboard
  5. GeoIP database downloads automatically on first probe

βš™οΈ Configuration

Environment Variables

Variable Description Default
RS_JWT_SECRET ⚠️ Required for production - JWT signing key Random (changes on restart)
RS_HTTP_PORT HTTP listen address :8080
RS_DB_PATH SQLite database path ./data/routelens.db
RS_GEOIP_PATH GeoIP database directory ./data/geoip
RS_PROBE_INTERVAL Probe interval in seconds 30
RS_LOG_LEVEL Log level (debug/info/warn/error) info

⚠️ Security Note: In production, always set RS_JWT_SECRET to a strong, random value. If not set, a random secret is generated at startup and all sessions will be invalidated on restart.

Example .env file

RS_JWT_SECRET=your-super-secure-random-string-at-least-32-chars
RS_HTTP_PORT=:8080
RS_PROBE_INTERVAL=60

πŸ”„ In-App Updates

RouteLens supports seamless self-updates directly from the web UI:

  1. Go to Settings β†’ About & Updates
  2. Click Check for Updates
  3. If available, click Install Update
  4. Service restarts automatically with the new version

Requirements:

  • Process must have write permission to its own binary
  • For systemd: service will exit and systemd restarts it

πŸ›  Architecture

flowchart LR
  subgraph Backend
    A[Scheduler] --> B[MTR Prober]
    A --> C[ICMP Prober]
    A --> D[SSH Speed Test]
    B & C & D --> E[SQLite]
  end
  
  subgraph Frontend
    F[React 19] --> G[Ant Design v5]
    G --> H[ECharts]
  end
  
  I[Gin API] --> Frontend
  E --> I

πŸ“‚ Project Structure

.
β”œβ”€β”€ cmd/server/       # Application entrypoint
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ api/          # REST API handlers & middleware
β”‚   β”œβ”€β”€ auth/         # JWT authentication
β”‚   └── monitor/      # Probe scheduler
β”œβ”€β”€ pkg/
β”‚   β”œβ”€β”€ prober/       # MTR, ICMP, SSH speed test
β”‚   β”œβ”€β”€ storage/      # SQLite repository
β”‚   └── geoip/        # GeoIP enrichment
└── web/              # React frontend (Vite + TypeScript)

πŸ” Security

RouteLens v1.3.1 includes security hardening:

  • JWT Authentication with cryptographically random secrets
  • Login Rate Limiting (5 attempts per IP per minute)
  • Input Sanitization on all probe targets (prevents command injection)

πŸ“ License

MIT License β€” Free for personal and commercial use.

Directories ΒΆ

Path Synopsis
cmd
probe_test command
server command
internal
api
cli
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL