LibreSpeed.NET 1.0.0

dotnet add package LibreSpeed.NET --version 1.0.0
                    
NuGet\Install-Package LibreSpeed.NET -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibreSpeed.NET" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LibreSpeed.NET" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="LibreSpeed.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LibreSpeed.NET --version 1.0.0
                    
#r "nuget: LibreSpeed.NET, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LibreSpeed.NET@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LibreSpeed.NET&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=LibreSpeed.NET&version=1.0.0
                    
Install as a Cake Tool

LibreSpeed.NET

A .NET client library for LibreSpeed speed test servers.

Measure download speed, upload speed, ping, and jitter against self-hosted or public LibreSpeed servers.

Installation

dotnet add package LibreSpeed.NET

Quick Start

One-liner with public servers

using LibreSpeed.NET;

using var client = new LibreSpeedClient();
var result = await client.RunWithBestServerAsync();

Console.WriteLine($"Server: {result.Server.Name}");
Console.WriteLine($"Ping: {result.Latency:F2} ms (jitter: {result.Jitter:F2} ms)");
Console.WriteLine($"Download: {result.DownloadSpeed:F2} Mbps");
Console.WriteLine($"Upload: {result.UploadSpeed:F2} Mbps");

Custom/self-hosted server

using LibreSpeed.NET;

var server = new Server
{
    Name = "My Server",
    BaseUrl = "https://speedtest.example.com/backend/"
};

using var client = new LibreSpeedClient();
var result = await client.RunAsync(server);
Console.WriteLine(result); // Ping: 12.34ms (+/-1.23ms) | Download: 95.67 Mbps | Upload: 45.23 Mbps

Multiple servers with automatic selection

using LibreSpeed.NET;

var servers = new List<Server>
{
    new Server { Name = "Frankfurt", BaseUrl = "https://fra.speedtest.clouvider.net/backend/" },
    new Server { Name = "Amsterdam", BaseUrl = "https://ams.speedtest.clouvider.net/backend/" },
    new Server { Name = "London", BaseUrl = "https://lon.speedtest.clouvider.net/backend/" }
};

using var client = new LibreSpeedClient();
var bestServer = await client.GetBestServerAsync(servers);
Console.WriteLine($"Best server: {bestServer.Name} ({bestServer.Latency:F0}ms)");

var result = await client.RunAsync(bestServer);

Fetch public server list

using LibreSpeed.NET;

// Fetch all public servers from librespeed.org
var servers = await ServerList.FetchPublicServersAsync();

foreach (var server in servers.Take(5))
{
    Console.WriteLine($"{server.Name}: {server.BaseUrl}");
}

Configuration

var client = new LibreSpeedClient
{
    ParallelStreams = 4,      // Number of concurrent connections (default: 3)
    DownloadDuration = 10,    // Download test duration in seconds (default: 15)
    UploadDuration = 10,      // Upload test duration in seconds (default: 15)
    PingCount = 5,            // Number of ping samples (default: 10)
    DownloadChunkSize = 100,  // Chunk size in MB (default: 100)
    UploadChunkSize = 1024 * 1024  // Upload chunk size in bytes (default: 1MB)
};

Progress Reporting

var client = new LibreSpeedClient
{
    OnDownloadProgress = progress => Console.WriteLine($"Download: {progress:P0}"),
    OnUploadProgress = progress => Console.WriteLine($"Upload: {progress:P0}")
};

Individual Tests

using var client = new LibreSpeedClient();

// Ping only
var (latency, jitter) = await client.TestPingAsync(server);

// Download only
var (downloadSpeed, bytesDownloaded) = await client.TestDownloadAsync(server);

// Upload only
var (uploadSpeed, bytesUploaded) = await client.TestUploadAsync(server);

// Get client IP
var ip = await client.GetClientIpAsync(server);

Cancellation Support

All async methods support cancellation:

using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var result = await client.RunAsync(server, cts.Token);

Custom HttpClient

For advanced scenarios (proxies, custom handlers, etc.):

var httpClient = new HttpClient(new HttpClientHandler
{
    Proxy = new WebProxy("http://proxy:8080")
});

using var client = new LibreSpeedClient(httpClient);

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 276 12/18/2025