linkprobe
Protocol-agnostic network link measurement in Rust (LibreSpeed and iperf3; JSON, MQTT, and Prometheus text exporters).
Not affiliated with Ookla or speedtest.net.
What linkprobe is
- Link measurement over LibreSpeed-compatible HTTPS or the system
iperf3binary. - Two surfaces: the
linkprobeCLI for ops and homelab use, and thelinkprobe-corelibrary to embed the same engines in your own apps. - Outputs: human-readable text, JSON, OpenMetrics (file, stdout, or HTTP scrape), and optional MQTT publish.
What linkprobe is not
- Not Ookla or speedtest.net — no affiliation and no proprietary speedtest SDK.
- Not a bundled speedtest engine — measurements run against LibreSpeed-compatible servers
you choose or public lists, or against an
iperf3endpoint you control. - Not probe-rs — linkprobe measures network links; probe-rs is an embedded debugging toolkit.
Features
- LibreSpeed: measure a URL, pick from the public list, or auto-select by lowest ping.
--server-idand auto-pick try up to two more hosts if the first still fails after HTTP retries. - iperf3: requires
iperf3onPATH; optional--list/--server-idfrom the public server JSON. - After a run: human or
--jsonstdout, optional MQTT publish, optional OpenMetrics file/stdout or HTTP scrape via--listen.
Install
Pre-built binaries are also attached to GitHub Releases
(Linux x86_64, macOS Apple Silicon, Windows x86_64). The iperf3 backend still needs
iperf3 on PATH; LibreSpeed does not.
Library quick start
use LibreSpeedEngine;
use ;
Examples in the repo:
CLI modes
| Mode | Flags | Behavior |
|---|---|---|
| One-shot | default (no --listen) |
Run one probe; print human text or --json to stdout |
| Prometheus text | --prometheus-text [PATH] |
Write OpenMetrics text; - prints metrics to stdout instead of human output |
| Scrape daemon | --listen ADDR + --interval SECS |
Background HTTP server on GET /metrics; reprobe on an interval |
| MQTT push | --mqtt-url URL |
After each probe, publish the JSON RunResult (default topic: linkprobe/result) |
Modes can be combined where it makes sense (for example one-shot probe plus --prometheus-text
and --mqtt-url).
Server selection
| Input | Behavior |
|---|---|
--server URL or --server HOST |
Single explicit LibreSpeed base URL or iperf3 host only (no list failover) |
--server-id N |
Pick entry N from --list; LibreSpeed auto-pick / --server-id may try up to two more list servers after retries |
--server omitted (LibreSpeed default backend) |
Fetch the public list, rank by ping, probe the fastest |
--list |
Print server ids and names, then exit |
LibreSpeed probes retry each HTTP phase up to three times. When using auto-pick or --server-id,
linkprobe may rotate through up to two additional list servers (by ping order) if the preferred
host still fails. On rotation you will see linkprobe: <name> failed, trying next server on stderr.
Requirements
Runs on Linux, macOS, and Windows. CI builds and tests all three.
- Rust stable (see
rust-toolchain.toml) - LibreSpeed: outbound HTTPS
- iperf3 backend:
iperf3onPATH(iperf3.exeon Windows) - MQTT: a reachable broker
- Prometheus scrape:
--listenbind address (prefer127.0.0.1)
iperf3 install:
- Linux: distro package (
iperf3) - macOS:
brew install iperf3 - Windows: iperf3 Windows builds or
winget/choco; putiperf3onPATH
Usage
# LibreSpeed - explicit server
# LibreSpeed - discovery
# iperf3
# iperf3 UDP (jitter + packet loss; -b default 10M)
# iperf3 - discovery
# Prometheus OpenMetrics (stdout, or a file for node_exporter textfile collector)
# Prometheus scrape (daemon; GET /metrics)
|
# MQTT (requires a broker)
Optional path overrides (defaults match LibreSpeed):
--dl-path(default:backend/garbage.php)--ul-path(default:backend/empty.php)--ping-path(default:backend/empty.php)
Optional: --servers-url for a custom server list (LibreSpeed or iperf3 JSON, depending on --backend).
MQTT extras: --mqtt-username, --mqtt-password
Crates
linkprobe-core— measurement types, LibreSpeed/iperf3 backends, discovery, OpenMetrics formattinglinkprobe— CLI, MQTT client, Prometheus scrape HTTP server
Library API: docs.rs/linkprobe-core (cargo doc -p linkprobe-core --open locally).
License
MIT OR Apache-2.0
History
Inspired by speedtest-rs; see NOTICE.