Skip to content
specurePublic

About

The new version of the high-performance server and client for network speed measurement. The tool supports modern communication protocols and provides real-time accurate measurements.

Topics

Resources

Stars

14 stars

Watchers

2 watching

Forks

Latest commit

Β 

History

290 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Nettest - Network Speed Measurement

Network Speed Measurement

Overview

Nettest is a high-performance server and client for network speed measurement, written in Rust. The tool supports modern communication protocols and provides real-time accurate measurements with beautiful visualization.

Nettest Demo

πŸ“š Complete Documentation: https://specure.github.io/nettest/docs

✨ Key Features

πŸš€ High Performance

  • Multithreading - Handle multiple clients simultaneously
  • Asynchronous architecture - Efficient resource utilization
  • Connection queue - Smart load distribution between workers

🌐 Multi-Protocol Support

  • TCP connections - Direct connection for maximum performance
  • WebSocket - Browser client support
  • TLS/SSL - Secure connections

πŸ“Š Real-Time Visualization

  • Interactive speed graphs - Real-time download and upload visualization
  • Beautiful UI - Modern, responsive interface
  • Live measurements - See your network performance in real-time

πŸ”§ Flexible Configuration

  • Configurable number of workers
  • Configurable ports and addresses
  • SSL/TLS certificate support

πŸ—ΊοΈ Interactive Servers Map

🌐 Interactive Measurement Interface

Experience real-time network measurements with beautiful visualization

πŸš€ Launch Measurement Interface

πŸš€ Quick Start

Download

Download the latest builds from the GitHub Releases page.

Note:

  1. Download the appropriate archive for your architecture and distribution
  2. Extract:
    • Linux/macOS: tar -xzf nettest-<distribution>-<arch>.tar.gz
    • Windows: Extract the ZIP file
  3. Run:
    • Linux/macOS: ./nettest -s (server) or ./nettest -c <address> (client)
    • Windows: nettest.exe -s (server) or nettest.exe -c <address> (client)

Build

Local Build

# Debug build
cargo build

# Release build with optimizations
cargo build --release

GitHub Actions

The project includes automated builds via GitHub Actions:

  • Ubuntu builds: Latest and LTS versions with native compilation
  • Debian builds: Multiple versions (11, 12) for maximum compatibility
  • macOS builds: Apple Silicon and Intel architectures
  • Windows builds: x86_64 and ARM64 architectures

Run Server

# Basic run
nettest -s

Browser Speed Test (no setup)

nettest -s also serves a browser speed test on the measurement port. On start it prints the addresses to open (and a QR code for phones):

  Nettest is running. Open the speed test on any device on this network:

    http://192.168.1.10:5005/
    http://nettest.local:5005/

Opening the page connects to the server it was loaded from and starts measuring right away (ping, download, upload). No certificates, no configuration and nothing to install on the device with the browser. The client is the same Rust measurement code as the CLI, compiled to WebAssembly (the whole page is ~160 KB gzipped, embedded in the binary).

Notes:

  • Plain HTTP is enough for ping, download and upload. Packet loss needs WebTransport, which browsers only allow on HTTPS (or localhost) pages; over plain HTTP jitter is derived from the ping round trips and the page leaves packet loss out.
  • ?autostart=0 opens the page without starting a measurement. All client options are in the settings panel and can be passed as URL parameters ("Copy link with settings").
  • Turn the page or the mDNS announcement off in nettest.conf: enable_web_ui = false, enable_mdns = false.

Where the speed goes (gateway or home server)

With enable_upstream_test = true, the page measures three legs, one after the other:

  1. this device ↔ the nettest server (the normal browser test),
  2. the server ↔ the internet: the server runs the nettest client itself against the nearest public measurement server (or upstream_server),
  3. this device ↔ the internet: the browser measures the same public server directly.

It then says whether the Wi-Fi/LAN, the internet line or the server itself is the bottleneck, with a This device / Server / Internet diagram, three concentric result rings on one scale and a comparison table. The breakdown only runs for devices on the server's own network; visitors from the internet get the plain test. Speeds don't add up: end to end should be close to the slower leg; ping does add up. The server also notes whether other devices used the line during its test and whether its CPU was saturated. The /api/upstream/* endpoints only answer devices on the local network, require an X-Nettest: 1 header, reject cross-origin requests and allow one run per minute.

When the browser runs on the server itself, the local segment is only loopback and the server's internet is this device's internet, so the page runs a single test: this device against the nearest public measurement server.

nettest -s -demo (presentation mode) turns the upstream test on even without enable_upstream_test, always runs all three segments whatever the path, and drops the one-run-per-minute limit.

Rebuilding the browser client after changes to web/ or src/wasm/:

rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version <wasm-bindgen version from Cargo.lock>
./scripts/build-web.sh        # writes gzipped files to dist/ and dist.sha256 (wasm-opt optional)
cargo build --release         # embeds dist/

Commit dist/ together with dist.sha256. CI runs ./scripts/build-web.sh --check and fails when web/ or the WASM client changed without a rebuild.

Run Client

# TCP client
nettest -c <SERVER_ADDRESS>

# WebSocket client
nettest -c <SERVER_ADDRESS> -ws

# TLS client 
nettest -c <SERVER_ADDRESS> -tls

# Machine-readable output
nettest -c <SERVER_ADDRESS> -json

Output Formats

By default the client prints a table meant for humans. Two flags switch to machine-readable output, which keeps stdout free of anything but the result:

Flag Output
-raw One line: ping/download/upload, latency in ms and speed in Gbit/s
-json A JSON document with every measured value

The JSON document reports nettest's native units: milliseconds for latency and jitter, bits per second for speed, percent for packet loss and bytes for the transferred volume. A value that was not measured is left out instead of being reported as zero, so a consumer can tell "not measured" apart from "measured as zero". With -legacy, for example, jitter_ms and packet_loss_percent are absent because no VoIP and no UDP test ran.

$ nettest -c 192.168.1.100 -json
{
  "type": "measurement",
  "timestamp": "2026-08-05T12:34:56Z",
  "client": {
    "name": "nettest",
    "version": "2.1.0"
  },
  "server": {
    "host": "192.168.1.100",
    "port": 5005
  },
  "protocol": "tcp",
  "num_threads": 3,
  "failed_threads": 0,
  "ping": {
    "latency_ms": 12.34,
    "jitter_ms": 0.42
  },
  "download": {
    "speed_bps": 942123456,
    "bytes_transferred": 1177654320
  },
  "upload": {
    "speed_bps": 512345678,
    "bytes_transferred": 640432098
  },
  "packet_loss_percent": 0.0
}

jitter_ms is the mean jitter measured by the VoIP test on an idle line. It is not the jitter under download or upload load, because nettest does not measure that.

Progress messages, warnings and errors go to stderr in every mode, so piping stdout into a parser needs no filtering:

nettest -c 192.168.1.100 -json | jq .download.speed_bps

βš™οΈ Configuration

Server Parameters

Parameter Description Default
-l TCP listen address and port 5005
-L TLS listen address and port 443
-c Path to SSL certificate (PEM format) -
-k Path to SSL key file (PEM format) -
-udp UDP port for VoIP/packet loss tests 5004
-u Drop privileges to specified user -
-d Run as daemon in background false
-t Number of worker threads -
-log Log level (info, debug, trace) -

Client Parameters

Parameter Description Default
-c Server address auto-discover
-tls Use TLS connection false
-ws Use WebSocket connection false
-t Number of threads 3
-p TCP/TLS port 5005
-g Generate graphs false
-raw Print one parseable line: ping/download/upload false
-json Print the measurement as JSON on stdout false
-legacy Use legacy PUT command (skip VoIP/packet loss) false
-log Log level (info, debug, trace) -

πŸ”Œ Protocols

TCP Mode

Direct TCP connection for maximum performance:

Client <──TCP──> Server

WebSocket Mode

Browser client support:

Client <──WebSocket──> Server

TLS Mode

Secure connections:

Client <──TLS──> Server

⚑ Performance

Nettest is optimized for high performance:

  • Multithreading: One server can support multiple clients
  • Asynchronous processing: Efficient CPU and memory usage
  • Smart queue: Automatic load distribution between workers
  • Minimal latency: Optimized architecture for accurate measurements

πŸ“Š Visualization

Real-Time Speed Graphs

  • Live speed change visualization
  • Detailed upload and download statistics
  • Interactive charts with smooth animations

Metrics

  • Download speed - Real-time download performance
  • Upload speed - Real-time upload performance
  • Ping - Network round-trip time (median)
  • Jitter - VoIP quality metric (RFC 3550), requires server v2.0+
  • Packet Loss - UDP packet loss rate (RFC 6673), requires server v2.0+

Note: Jitter and Packet Loss tests use UDP port 5004 by default.
Open this port on the server firewall: iptables -A INPUT -p udp --dport 5004 -j ACCEPT

πŸ“‹ Requirements

System Requirements

  • Rust: 1.70+ (latest stable)
  • Linux/macOS/Windows: Support for all major platforms

πŸ“„ License

πŸ“š Documentation


Nettest - Your reliable tool for network speed measurement! πŸš€

About

The new version of the high-performance server and client for network speed measurement. The tool supports modern communication protocols and provides real-time accurate measurements.

Topics

Resources

Stars

14 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages