Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more
Go to file
Bernd Stellwag fb7575b67b
Refactor results/ PHP code (#369)
* put code to insert and query data from database into separate file

* simplify obfuscation salt file handling

* use new DB interaction functions in telemetry.php

* use new DB interaction functions in stats.php

and fix indentation levels

* format telemetry settings file

* use new function for interacting with DB in index.php

* move drawing of the image into function and try to comment each section with what it does

* reorder lines for parts of the image to align with the order they appear on the image

* bugfix: display obfuscated and deobfuscated id in stats if id obfuscation is enabled

* improve error handling

* add missing PHPDocs to functions

* imageftbbox returns an array on success and false on failure so to check if the font is usable, check if we got an array

* fix dsn for postgres

* fix limit sql statement for postgresql

* remove obsolete require statement

* use require instead of require_once since the settings file might need to be loaded multiple times

because it just contains plain variables which will just get loaded into the current scope

* move require statements to the top of the file

* make sure files are readable before requiring them

* add constant to refer to the telemetry settings file and check if it is readable before loading it

* return null if no speedtest result was found for the given id and show according message to the user instead of just exiting

* use existing constant instead of string for telemetry settings file name

* uniformly use single quotes instead of double quotes as most code places already used single quotes

* somehow some tabs sneaked in, replace them to uniformly use spaces

* mysql now uses pdo, too, reflect that in the requirements documentation

* pass username and password as constructor parameters instead of via DSN
2020-10-20 07:43:48 +02:00
.github/ISSUE_TEMPLATE Added issue templates 2018-09-30 19:25:51 +02:00
.logo Forgot logo 2019-09-25 09:20:49 +02:00
backend Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
results Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
.gitignore Update .gitignore 2019-06-30 08:00:04 +02:00
doc.md Refactor results/ PHP code (#369) 2020-10-20 07:43:48 +02:00
example-multipleServers-full.html make the clickable area around the link to the privacy message a bit bigger again so that it's easier to click on mobile devices (#366) 2020-10-11 19:21:10 +02:00
example-multipleServers-pretty.html Server list can now be loaded from a JSON file instead of hardcoding it 2020-03-09 08:16:06 +01:00
example-singleServer-basic.html Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
example-singleServer-chart.html Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
example-singleServer-customSettings.html Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
example-singleServer-full.html make the clickable area around the link to the privacy message a bit bigger again so that it's easier to click on mobile devices (#366) 2020-10-11 19:21:10 +02:00
example-singleServer-gauges.html Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
example-singleServer-pretty.html Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
example-singleServer-progressBar.html Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
favicon.ico Add favicon.ico (#219) 2019-08-22 06:41:14 +02:00
LICENSE Create LICENSE (#208) 2019-05-21 07:22:01 +02:00
README.md Bumped version to 5.2.2; Updated README.md 2020-09-27 20:35:58 +02:00
speedtest.js Test settings can now be changed while in state 4 and not just state 0 2020-10-20 07:35:28 +02:00
speedtest_worker.js Improved auto test duration formula 2020-09-27 20:18:01 +02:00

LibreSpeed Logo

LibreSpeed

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

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

Try it

Take a Speedtest

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)

Screenshot

Server requirements

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

Installation videos

Android app

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

Docker

Please see the docker branch

Go backend

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

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-2020 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.