Convert Figma logo to code with AI

librespeed logospeedtest

Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more

13,285
2,308
13,285
123

Top Related Projects

SpeedTest by OpenSpeedTest™ is a Free and Open-Source HTML5 Network Performance Estimation Tool Written in Vanilla Javascript and only uses built-in Web APIs like XMLHttpRequest (XHR), HTML, CSS, JS, & SVG. No Third-Party frameworks or libraries are Required. Started in 2011 and moved to OpenSpeedTest.com dedicated Project/Domain Name in 2013.

11,877

wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.

A dynamically generated activity graph to show your GitHub activities of last 31 days.

Test your internet connection speed and ping using speedtest.net from the CLI

Quick Overview

LibreSpeed is an open-source HTML5 network speed test that runs entirely in the browser without the need for Flash or Java. It's designed to be lightweight, customizable, and easy to self-host, providing accurate measurements of download and upload speeds, ping, and jitter.

Pros

  • Lightweight and fast, with minimal server requirements
  • Highly customizable and easy to integrate into existing websites
  • No Flash or Java dependencies, runs entirely in modern browsers
  • Self-hostable, allowing for better privacy and control over data

Cons

  • May not be as comprehensive as some commercial speed test solutions
  • Accuracy can be affected by browser limitations and network conditions
  • Requires some technical knowledge to set up and customize
  • Limited support for older browsers or devices

Code Examples

  1. Basic HTML integration:
<iframe width="100%" height="650px" frameborder="0" 
src="https://yourserver.com/speedtest/"></iframe>
  1. JavaScript API usage:
var s = new Speedtest();
s.setParameter("telemetry_level", "basic");
s.setParameter("test_order", "IP_D_U");
s.start();
  1. Custom result handling:
s.onend = function(result) {
    console.log("Download speed: " + result.dlStatus + " Mbps");
    console.log("Upload speed: " + result.ulStatus + " Mbps");
    console.log("Ping: " + result.pingStatus + " ms");
    console.log("Jitter: " + result.jitterStatus + " ms");
};

Getting Started

  1. Clone the repository:

    git clone https://github.com/librespeed/speedtest.git
    
  2. Move the speedtest folder to your web server's root directory.

  3. Configure the speedtest_worker.js file with your server settings.

  4. Access the speed test through your web browser at http://yourserver.com/speedtest/.

  5. For advanced customization, refer to the documentation in the repository's README file.

Competitor Comparisons

SpeedTest by OpenSpeedTest™ is a Free and Open-Source HTML5 Network Performance Estimation Tool Written in Vanilla Javascript and only uses built-in Web APIs like XMLHttpRequest (XHR), HTML, CSS, JS, & SVG. No Third-Party frameworks or libraries are Required. Started in 2011 and moved to OpenSpeedTest.com dedicated Project/Domain Name in 2013.

Pros of Speed-Test

  • More comprehensive UI with additional features like multi-server testing
  • Supports WebSocket for real-time data transfer
  • Includes a mobile-friendly interface

Cons of Speed-Test

  • Larger codebase, potentially more complex to set up and maintain
  • Less actively maintained (fewer recent commits and releases)
  • May have higher resource requirements due to additional features

Code Comparison

Speed-Test (JavaScript):

function getSpeedMbps(bytes, elapsedMs) {
    return ((bytes * 8) / elapsedMs / 1000).toFixed(2);
}

speedtest (PHP):

function format($d){
    if($d<10) return number_format($d,2,".","");
    if($d<100) return number_format($d,1,".","");
    return number_format($d,0,".","");
}

Both projects aim to provide web-based speed testing solutions, but they differ in their approach and feature set. Speed-Test offers a more feature-rich experience with a polished UI, while speedtest focuses on simplicity and ease of deployment. The code snippets show different approaches to formatting speed results, with Speed-Test using JavaScript and speedtest using PHP. Ultimately, the choice between the two depends on specific requirements and preferences for UI complexity and deployment ease.

11,877

wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.

Pros of Wallabag

  • More comprehensive functionality as a full-featured read-it-later application
  • Supports multiple platforms and integrations (web, mobile apps, browser extensions)
  • Actively maintained with regular updates and a larger community

Cons of Wallabag

  • More complex setup and configuration compared to Speedtest
  • Requires more server resources and maintenance
  • Steeper learning curve for users and administrators

Code Comparison

Wallabag (PHP):

public function getContent($url)
{
    $this->url = $url;
    $html = $this->getHtml($url);
    $this->parseContent($html);
    return $this->content;
}

Speedtest (JavaScript):

function getMbps(speed) {
    return (speed * 8 / 1000000).toFixed(2);
}

function getIpInfo(done) {
    xhr.onload = function () {
        done(JSON.parse(xhr.responseText));
    }
    xhr.open("GET", "backend/getIP.php", true);
    xhr.send();
}

While both projects are open-source and self-hosted, Wallabag is a more feature-rich application for saving and organizing web content, whereas Speedtest focuses on network performance testing. Wallabag requires more setup and resources but offers a broader range of functionality. Speedtest is simpler to deploy and use but has a more specific purpose.

A dynamically generated activity graph to show your GitHub activities of last 31 days.

Pros of github-readme-activity-graph

  • Focuses on visualizing GitHub activity, providing a unique and engaging way to showcase contributions
  • Highly customizable with various themes and color options
  • Integrates seamlessly with GitHub profile READMEs

Cons of github-readme-activity-graph

  • Limited to GitHub activity visualization, lacking broader functionality
  • May require more setup and configuration compared to speedtest
  • Potential for rate limiting issues when fetching data from GitHub API

Code Comparison

speedtest:

function runTest() {
    var xhr = new XMLHttpRequest();
    xhr.onload = function() {
        // Process speed test results
    };
    xhr.open("GET", testUrl, true);
    xhr.send();
}

github-readme-activity-graph:

const fetchContributions = async (username) => {
  const query = `query ($username: String!) {
    user(login: $username) {
      contributionsCollection {
        contributionCalendar {
          totalContributions
          weeks {
            contributionDays {
              contributionCount
              date
            }
          }
        }
      }
    }
  }`;
  // Fetch and process GitHub contributions data
};

Test your internet connection speed and ping using speedtest.net from the CLI

Pros of speed-test

  • Command-line interface for easy integration into scripts and workflows
  • Lightweight and fast, with minimal dependencies
  • Uses multiple servers for more accurate results

Cons of speed-test

  • Limited to testing download and upload speeds only
  • Lacks a graphical interface for less technical users
  • May not be as comprehensive as full-featured speed testing solutions

Code Comparison

speed-test:

const speedTest = require('speedtest-net');

(async () => {
  try {
    const result = await speedTest({maxTime: 5000});
    console.log(result.server.ping);
    console.log(result.speeds.download);
    console.log(result.speeds.upload);
  } catch (err) {
    console.error(err);
  }
})();

speedtest:

<?php
require_once 'speedtest.php';
$st = new SpeedTest();
$result = $st->getResult();
echo "Ping: " . $result['ping'] . " ms\n";
echo "Download: " . $result['download'] . " Mbps\n";
echo "Upload: " . $result['upload'] . " Mbps\n";
?>

speed-test is a Node.js-based CLI tool, while speedtest is a more comprehensive PHP-based solution with both CLI and web interfaces. speedtest offers more features like server selection, telemetry, and a customizable web interface, making it suitable for self-hosted speed testing. speed-test, on the other hand, is more focused on simplicity and ease of use in command-line environments.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

LibreSpeed Logo

LibreSpeed

No Flash, No Java, No Websocket, No Bullshit.

This is a very lightweight speed test implemented in Javascript, using XMLHttpRequest and Web Workers.

Try it

Take a speed test

Compatibility

All modern browsers are supported: IE11, latest Edge, latest Chrome, latest Firefox, latest Safari. Works with mobile versions too.

Features

  • Download
  • Upload
  • Ping
  • Jitter
  • IP Address, ISP, distance from server (optional)
  • Telemetry (optional)
  • Results sharing (optional)
  • Multiple Points of Test (optional)

Screenrecording of a running Speedtest

Server requirements

  • A reasonably fast web server with Apache 2 (nginx, IIS also supported)
  • PHP 5.4 or newer (other backends also available)
  • MariaDB or MySQL database to store test results (optional, Microsoft SQL Server, PostgreSQL and SQLite also supported)
  • A fast! internet connection

Installation

Assuming you have PHP and a web server installed, the installation steps are quite simple.

  1. Download the source code and extract it
  2. Copy the following files to your web server's shared folder (ie. /var/www/html/speedtest for Apache): index.html, speedtest.js, speedtest_worker.js, favicon.ico and the backend folder
  3. Optionally, copy the results folder too, and set up the database using the config file in it.
  4. Be sure your permissions allow execute (755).
  5. Visit YOURSITE/speedtest/index.html and voila!

Installation Video

This video shows the installation process of a standalone LibreSpeed server: Quick start installation guide for Debian 12

More videos will be added later.

Android app

A template to build an Android client for your LibreSpeed installation is available here.

CLI client

A command line client is available here.

Docker

A docker image is available on GitHub, check our docker documentation for more info about it. The image is built every week to include an updated version of the ipinfo-DB used for ISP detection. Also this ensures, that the latest security patches in PHP are installed. Therefore we recommend to use the latest image.

Go backend

A Go implementation is available in the speedtest-go repo, maintained by Maddie Zhan.

Rust backend

A Rust implementation is available in the speedtest-rust repo, maintained by Sudo Dios.

Node.js backend

A partial Node.js implementation is available in the node branch, developed by dunklesToast. It's not recommended to use at the moment.

Donate

Donate with Liberapay Donate with PayPal

License

Copyright (C) 2016-2024 Federico Dossena

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/lgpl.