Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c1af45a
Implement fromScratch design
Timendus Jul 30, 2024
c7e3fcc
Add some documentation
Timendus Jul 30, 2024
a6e5241
enable new design in docker (no alpine yet)
sstidl Oct 19, 2024
66e967a
Merge branch 'master' of github.com:librespeed/speedtest into newdesign
sstidl Oct 19, 2024
4b6a8b8
merge fixed docker images
sstidl Oct 26, 2024
e8c8ac8
alpine docker added new design
sstidl Oct 26, 2024
74644b0
Merge branch 'master' of https://github.com/librespeed/speedtest into…
sstidl Oct 26, 2024
a02f4e3
fix #685
sstidl Nov 30, 2024
0642af8
Implement fromScratch design
Timendus Dec 1, 2024
1dc40d7
Add some documentation
Timendus Dec 1, 2024
853cb4f
enable new design in docker (no alpine yet)
sstidl Dec 1, 2024
96b0261
alpine docker added new design
sstidl Dec 1, 2024
cc4c2f8
fix #685
sstidl Dec 1, 2024
018c696
Merge branch 'newdesign' of https://github.com/librespeed/speedtest i…
stefanstidlffg Dec 1, 2024
83f7491
fix database permissions alpine, remove baby
sstidl Dec 1, 2024
b345343
Merge remote-tracking branch 'origin/master' into newdesign
sstidl Dec 1, 2024
13f6c49
Merge commit 'dd40a3a4937d88fdc2337adb190fb9d091e849a4' into newdesign
sstidl Dec 29, 2024
f06187a
Merge branch 'fix-docker-images' into newdesign
sstidl Dec 29, 2024
dda7841
hide serverselector on only one server
sstidl Dec 29, 2024
4fc0932
Update frontend/styling/server-selector.css
sstidl Apr 22, 2025
7a11454
Merge branch 'master' into newdesign
sstidl Dec 6, 2025
b1a5cea
Merge commit 'fc2dc5125d60280066e368417534bfe762068156' into newdesign
stefanstidlffg Dec 6, 2025
61ec779
fix alpine image again
stefanstidlffg Dec 6, 2025
ec7b0ab
Merge remote-tracking branch 'orig/master' into newdesign
stefanstidlffg Dec 6, 2025
b1111e5
adjust settings.json in entrypoint
sstidl Dec 7, 2025
3a0e6b3
Update frontend/javascript/index.js
sstidl Dec 7, 2025
235fa63
Add feature switch for new design via config file, URL parameters, an…
Copilot Dec 29, 2025
cb79f72
add armv7
stefanstidlffg Dec 29, 2025
0570377
reformat
stefanstidlffg Dec 29, 2025
119eb1f
Add GDPR_EMAIL environment variable for Docker deployments (#743)
Copilot Dec 29, 2025
48af9e8
cleanup old EMAIL ENV Var
sstidl Dec 29, 2025
a41566f
fix: line break in html prevented sed replacement
sstidl Dec 29, 2025
007a050
version 6.0.0pre1
sstidl Dec 30, 2025
01d7845
test: add mssql docker compose tests
Feb 7, 2026
27acb2d
Update Speedtest screen recording link in README
sstidl Mar 16, 2026
eda4148
Merge remote-tracking branch 'origin/master' into newdesign
Mar 18, 2026
1c7c44e
Filter unreachable servers from selector (newdesign UI) (#769)
sstidl Mar 18, 2026
debd40b
fix: server.json handling
Mar 18, 2026
fdb1681
Use server-list.json in classic frontend by default
Mar 18, 2026
8449b94
Add configurable server list URLs to frontend and Docker
Mar 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# Copy sources
COPY backend/ /speedtest/backend
COPY frontend/ /speedtest/frontend

COPY results/*.php /speedtest/results/
COPY results/*.ttf /speedtest/results/
Expand All @@ -30,7 +31,7 @@
# Prepare default environment variables
ENV TITLE=LibreSpeed
ENV MODE=standalone
ENV PASSWORD=password

Check warning on line 34 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (./Dockerfile, ghcr.io/librespeed/speedtest)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "PASSWORD") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ENV TELEMETRY=false
ENV ENABLE_ID_OBFUSCATION=false
ENV REDACT_IP_ADDRESSES=false
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

# Copy sources
COPY backend/ /speedtest/backend
COPY frontend/ /speedtest/frontend

COPY results/*.php /speedtest/results/
COPY results/*.ttf /speedtest/results/
Expand All @@ -44,7 +45,7 @@
# Prepare default environment variables
ENV TITLE=LibreSpeed
ENV MODE=standalone
ENV PASSWORD=password

Check warning on line 48 in Dockerfile.alpine

View workflow job for this annotation

GitHub Actions / build (./Dockerfile.alpine, ghcr.io/librespeed/speedtest, -alpine)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "PASSWORD") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ENV TELEMETRY=false
ENV ENABLE_ID_OBFUSCATION=false
ENV REDACT_IP_ADDRESSES=false
Expand Down
10 changes: 7 additions & 3 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@ if [ "$MODE" == "backend" ]; then
fi
fi

# Set up unified index.php
if [ "$MODE" != "backend" ]; then
cp /speedtest/ui.php /var/www/html/index.php
# Set up index.php for frontend-only or standalone modes
if [[ "$MODE" == "frontend" || "$MODE" == "dual" ]]; then
cp -av /speedtest/frontend/* /var/www/html/
elif [ "$MODE" == "standalone" ]; then
cp -av /speedtest/frontend/* /var/www/html/
echo '[{"name":"local","server":"/backend", "dlURL": "garbage.php", "ulURL": "empty.php", "pingURL": "empty.php", "getIpURL": "getIP.php", "sponsorName": "", "sponsorURL": "", "id":1 }]' > /var/www/html/server-list.json
fi

# Apply Telemetry settings when running in standalone or frontend mode and telemetry is enabled
if [[ "$TELEMETRY" == "true" && ("$MODE" == "frontend" || "$MODE" == "standalone" || "$MODE" == "dual") ]]; then
cp -r /speedtest/results /var/www/html/results
sed -i 's/telemetry_level": ".*"/telemetry_level": "basic"/' /var/www/html/settings.json

if [ "$MODE" == "frontend" ]; then
mkdir /var/www/html/backend
Expand Down
76 changes: 76 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# LibreSpeed frontend

This is a re-implementation of the LibreSpeed user interface based on [the
design by fromScratch](https://github.com/librespeed/speedtest/issues/585). The
code that's doing the actual speed test is still the same.

### Desktop

![Desktop screenshot](./screenshots/desktop.png)

### Mobile

![Mobile screenshot](./screenshots/mobile.png)

## How to use

Copy everything in this directory into the LibreSpeed root, next to
`speedtest.js` and `speedtest_worker.js`, overwriting the `index.html` file that
may already be there. That's it!

## Configuration

In the [`server-list.json`](./server-list.json) file you can provide a list of
testing servers. If you only have a single testing server, just provide a list
with one item in it, being your server. The frontend will then skip doing an
automatic server selection and will not allow the user to change servers.

For more advanced applications, you can override any of the settings that are
defined in `speedtest_worker.js` using the file
[`settings.json`](./settings.json). See
[`speedtest_worker.js`](../speedtest_worker.js) for documentation on the
different settings (scroll down a bit to where you find the definition of the
`settings` object).

## Features

- Shows upload and download speed and progress
- Shows ping and jitter
- Shows your IP address and internet service provider if the testing server
supports it
- Can handle a single testing server or a list of servers
- Can save telemetry and share results if the hosting server supports it (set
`telemetry_level` in [`settings.json`](./settings.json))
- Does not require any build steps; implementation is pure JS & CSS
- Has zero dependencies

## Limitations

- This frontend relies heavily on modern browser features. It should work very
well in all modern ("evergreen") browsers, but has **no** backwards compatibility
with older browsers.

## Credits

**Design** by fromScratch Studio - 2022, 2023
([www.fromscratch.io](https://www.fromscratch.io))

> "During Hacktoberfest 2022 & 2023, fromScratch Studio took on the request for
> LibreSpeed redesign and UI improvements. We ran 2 design sprints one on '22 and
> one on '23, and produced high-fidelity screens for LibreSpeed redesign.
> Furthermore, this year, we produced high-fidelity screens for mobile-view as
> well."

_-- Chris-ZoGo, https://github.com/librespeed/speedtest/issues/585_

**Implementation** by Timendus - 2024
([https://github.com/Timendus](https://github.com/Timendus))

> "I had a couple of days of free time, and I came across the design by
> fromScratch. I thought it looked great, and that it deserved a good
> implementation, so I set out to make one. I've taken the liberty of changing a
> couple of details, coming up with some animations and adding a few small
> features, but otherwise I've tried to stay as close to the "intention" of the
> design as I could."

_-- Timendus, https://github.com/librespeed/speedtest/pull/649_
Binary file added frontend/fonts/Inter-latin-ext.woff2
Binary file not shown.
Binary file added frontend/fonts/Inter-latin.woff2
Binary file not shown.
Binary file added frontend/images/background-original.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/images/background.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions frontend/images/chevron.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions frontend/images/close-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions frontend/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions frontend/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
151 changes: 151 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta
name="description"
content="Free and Open Source Speedtest. Run it right now in your browser, or self-host on a PHP, Golang, Rust or Node server. License: LGPL."
/>
<link rel="shortcut icon" href="images/favicon.svg" />
<script type="text/javascript" src="speedtest.js"></script>
<script type="text/javascript" src="javascript/index.js"></script>
<link rel="stylesheet" type="text/css" href="styling/index.css" />
<title>LibreSpeed - Free and Open Source Speedtest</title>
</head>

<body>
<header>
<img src="images/logo.svg" alt="LibreSpeed" />
</header>
<main>
<h1>Free and Open Source Speedtest.</h1>
<p class="tagline">No Flash, No Java, No Websockets, No Bullsh*t</p>

<div class="server-selector">
<div class="chosen">
<div class="chevron">
<img src="images/chevron.svg" alt="select..." />
</div>
<p>current server</p>
<h2 id="selected-server">searching nearest server...</h2>
</div>
<ul class="servers"></ul>
<p class="sponsor" id="sponsor">&nbsp;</p>
</div>

<p id="privacy-warning" class="hidden">
by clicking the start button you agree to our privacy policy<br />
<a href="#" id="choose-privacy">or choose your privacy options</a>
</p>
<button class="disabled" id="start-button"></button>

<div class="gauge-layout">
<div class="ping hidden">
<span class="label">Ping</span>:&nbsp;
<span class="value" id="ping">00</span>ms
</div>

<div class="gauge download" id="download-gauge">
<div class="progress"></div>
<div class="speed"></div>
<h1><span id="download-speed">00</span> Mbps</h1>
<h2>Download</h2>
</div>

<div class="gauge upload" id="upload-gauge">
<div class="progress"></div>
<div class="speed"></div>
<h1><span id="upload-speed">00</span> Mbps</h1>
<h2>Upload</h2>
</div>

<div class="jitter hidden">
<span class="label">Jitter</span>:&nbsp;
<span class="value" id="jitter">00</span>ms
</div>
</div>

<button class="small inverted hidden" id="share-results">
Share results
</button>
</main>
<footer>
<p class="source">
<a href="https://github.com/librespeed/speedtest">source code</a>
</p>
</footer>

<dialog id="share">
<div class="close-dialog">
<img src="images/close-button.svg" alt="Close" />
</div>
<img id="results" src="" alt="Test results in graphical form" />
<button id="copy-link">Copy link</button>
</dialog>

<dialog id="privacy">
<div class="close-dialog">
<img src="images/close-button.svg" alt="Close" />
</div>
<section>
<h1>Privacy Policy</h1>
<p>
This HTML5 speed test server is configured with telemetry enabled.
</p>

<h2>What data we collect</h2>
<p>
At the end of the test, the following data is collected and stored:
</p>

<ul>
<li>Test ID</li>
<li>Time of testing</li>
<li>Test results (download and upload speed, ping and jitter)</li>
<li>IP address</li>
<li>ISP information</li>
<li>Approximate location (inferred from IP address, not GPS)</li>
<li>User agent and browser locale</li>
<li>Test log (contains no personal information)</li>
</ul>

<h2>How we use the data</h2>
<p>Data collected through this service is used to:</p>

<ul>
<li>
Allow sharing of test results (sharable image for forums, etc.)
</li>
<li>
To improve the service offered to you (for instance, to detect
problems on our side)
</li>
</ul>

<p>No personal information is disclosed to third parties.</p>

<h2>Your consent</h2>
<p>
By starting the test, you consent to the terms of this privacy policy.
</p>

<h2>Data removal</h2>
<p>
If you want to have your information deleted, you need to provide
either the ID of the test or your IP address. This is the only way to
identify your data, without this information we won't be able to
comply with your request.
</p>
<p>
Contact this email address for all deletion requests:
<a href="mailto:PUT@YOUR_EMAIL.HERE">TO BE FILLED BY DEVELOPER</a>.
</p>
</section>
<button id="close-privacy">Close</button>
</dialog>
</body>
</html>
Loading