🚀 Nettest Overview

High-performance network speed measurement tool

What is Nettest?

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

🚀 High Performance

Multithreading support with asynchronous architecture for efficient resource utilization and smart load distribution between workers.

🌐 Multi-Protocol Support

TCP connections for maximum performance, WebSocket for browser clients, and TLS/SSL for secure connections.

📊 Real-Time Visualization

Interactive speed graphs with real-time download and upload visualization, modern responsive interface.

🔧 Flexible Configuration

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

Key Features

Performance

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

Protocols

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

Visualization

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

🔧 How to Run TCP Measurement

Complete guide to setting up and running TCP measurements

Download

Download nettest from GitHub Releases

Start Server

Run nettest in server mode:

./nettest -s

Run Client

Run nettest in client mode:

./nettest -c <server_ip_address>

Troubleshooting

Port Already in Use

If port 5005 is already in use, you can specify a different port:

Server: ./nettest -s -l 5006 Client: ./nettest -c <server_ip> -p 5006

Firewall Issues

Make sure the server port (default 5005) is open in your firewall.

Connection Refused

Verify the server is running, check the IP address is correct, and ensure both client and server are on the same network or have proper routing.

Protocol Information

The nettest tool implements the RMBT (RTR Multithreaded Broadband Test) protocol for accurate bandwidth measurements. For detailed protocol specifications, see the RMBT Protocol Extensions documentation.

🔒 How to Run TLS Measurement

Complete guide to setting up and running TLS measurements

Download

Download nettest from GitHub Releases

Prepare TLS Certificates

You need two files for TLS:

  • Certificate file (usually .crt or .pem)
  • Private key file (usually .key or .pem)

Start TLS Server

There are two ways to configure TLS certificates:

Method 1: Command Line Arguments

Specify certificate files directly via command line:

./nettest -s -c /path/to/server.crt -k /path/to/server.key

Method 2: Configuration File

Create or edit nettest.conf file:

  • macOS: ~/.config/nettest.conf
  • Other systems: /etc/nettest.conf

Add TLS configuration:

tls_cert = /path/to/server.crt tls_key = /path/to/server.key tls_port = 443

Then run the server:

./nettest -s

TLS Port Configuration

TLS server runs on port 443 by default. You can change it:

Command Line

./nettest -s -c /path/to/server.crt -k /path/to/server.key -L 8443

Configuration File

tls_port = 8443

Run TLS Client

Run nettest in client mode with TLS:

./nettest -c <server_ip_address> -tls

Examples:

  • Local: ./nettest -c 127.0.0.1 -tls
  • Remote: ./nettest -c 192.168.1.100 -tls
  • Custom TLS port: ./nettest -c <server_ip> -tls -p 8443

Client Port Configuration

If the server uses a custom TLS port, specify it with -p:

./nettest -c <server_ip> -tls -p 8443

Troubleshooting

Certificate Issues

Make sure certificate files are readable and valid:

  • Check file permissions
  • Verify certificate is not expired
  • Ensure private key matches the certificate

Firewall Issues

Make sure the TLS port (default 443) is open in your firewall.

Connection Refused

Verify the server is running with TLS enabled, check the IP address is correct, and ensure both client and server are using the same TLS port.

Protocol Information

The nettest tool implements the RMBT (RTR Multithreaded Broadband Test) protocol over TLS for secure bandwidth measurements. TLS provides encryption and authentication for secure network testing.

🌐 How to Run WebSocket Measurement

Complete guide to setting up and running WebSocket measurements

Download

Download nettest from GitHub Releases

Start WebSocket Server

Run nettest in server mode:

./nettest -s

Run WebSocket Client

Run nettest in client mode with WebSocket:

./nettest -c <server_ip_address> -ws

Examples:

  • Local: ./nettest -c 127.0.0.1 -ws
  • Remote: ./nettest -c 192.168.1.100 -ws

WebSocket + TLS

For secure WebSocket connections, combine WebSocket with TLS:

Server

./nettest -s -c /path/to/server.crt -k /path/to/server.key

Client

./nettest -c <server_ip_address> -ws -tls

Troubleshooting

WebSocket Connection Failed

Make sure the server is running with WebSocket enabled and the client is using the correct WebSocket flag.

Firewall Issues

Ensure WebSocket ports are open in your firewall. WebSocket typically uses the same port as the server (default 5005).

Browser Compatibility

WebSocket measurements are ideal for browser-based clients and provide real-time communication capabilities.

Protocol Information

The nettest tool implements the RMBT (RTR Multithreaded Broadband Test) protocol over WebSocket for browser-compatible bandwidth measurements. WebSocket provides full-duplex communication and is ideal for web applications.

⚙️ Thread Configuration

Optimize measurement quality by configuring the number of threads

Why Configure Threads?

By default, nettest uses 3 threads for measurements. However, you can improve measurement accuracy and performance by using more threads, especially for high-speed connections.

🚀 Better Performance

Multiple threads can better utilize high-speed connections and provide more accurate measurements.

📊 Improved Accuracy

Parallel data streams help overcome single-thread limitations and provide more reliable results.

⚡ Faster Measurements

Concurrent data transfer reduces measurement time and provides better real-time feedback.

Configure Client Threads

Use the -t parameter to specify the number of threads on the client side:

./nettest -c <server_ip_address> -t <number_of_threads>

Best Practices

Start Small

Begin with 2-4 threads and gradually increase based on your connection speed and system performance.

Monitor Performance

Too many threads can cause overhead. Monitor CPU usage and measurement consistency.

Network Conditions

Consider your network conditions. High-latency connections may benefit from fewer threads.

System Resources

Ensure your system has sufficient CPU cores and memory to handle multiple threads efficiently.

Troubleshooting

High CPU Usage

If CPU usage is too high, reduce the number of threads. Start with fewer threads and increase gradually.

Inconsistent Results

If measurements are inconsistent, try reducing the number of threads or check for network congestion.

Connection Timeouts

Too many threads might overwhelm the server. Reduce thread count if you experience timeouts.

📊 Graph Visualization

Real-time visualization of upload and download speeds

Enable Graph Visualization

Use the -g parameter to show real-time graphs of upload and download speeds on the client:

./nettest -c <server_ip_address> -g

What You'll See

The graph visualization provides real-time monitoring of your network performance:

📈 Download Speed

Real-time graph showing download speed over time with smooth curves and accurate measurements.

📤 Upload Speed

Live visualization of upload performance with detailed speed tracking and trend analysis.

⏱️ Time Progress

Visual timeline showing measurement progress and speed variations throughout the test.

🛰️ Server Registration

Auto-registration of measurement servers

Enable Auto-Registration

To enable auto-registration of a measurement server, configure the following fields in your nettest.conf file:

server_registration = true registration_token = "<secret token>" hostname = "<unique hostname>"

If server_registration = false, auto-registration is disabled.

Configuration Parameters

Required Parameters

  • server_registration - Set to true to enable auto-registration
  • hostname - Required for TLS measurements. Must be specified for proper server identification

Optional Parameters

  • registration_token - Contact the Specure team to obtain a unique token for custom server naming

Unique Server Names

If you need a unique server name, contact the Specure team to obtain a registration_token. Without a token, the server will be registered as AUTO_REGISTRATION.

🛰️ Server Registration Workflow

When server_registration = true, the measurement server automatically sends a registration request to the control server using available TCP/TLS ports.

Control Server Process

  1. IP Detection - Determines the client's IP address
  2. Duplicate Check - Ensures no active servers exist with the same IP and hostname
  3. Availability Verification - Confirms the server is listening on provided ports
  4. IP Geolocation - Retrieves city and geographic coordinates using MaxMind

The registered server will appear on the map: 👉 View Server Map

🛑 Shutdown Procedure

When the measurement server receives a shutdown signal:

  1. It sends a message to the control server
  2. The control server identifies the server by its IP address
  3. The server is removed from the registry

🔄 Heartbeat / Ping

While the measurement server is running:

Server Activity

  • Sends a ping to the control server every 30 seconds
  • Control server updates the server's lastActive field on each ping

Background Cleanup

  • Background job on the control server deletes servers whose lastActive timestamp is older than 1 minute

Best Practices

Hostname for TLS

Always specify a hostname when running TLS measurements to ensure proper certificate validation.

Unique Registration

Contact the Specure team for a registration_token if you need a custom server name instead of the default AUTO_REGISTRATION.

Network Requirements

Ensure your server has proper network connectivity to reach the control server for registration and heartbeat messages.