Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adolfintel committed Jul 31, 2024
1 parent 2a7face commit 1932906
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@ Works with mobile versions too.
* A fast! internet connection

## Installation
Assuming you have PHP installed, the installation steps are quite simple.
I set this up on a QNAP.
For this example, I am using a folder called **speedtest** in my web share area.

1. Choose one of the example-xxx.html files in `examples` folder as your index.html if the default index.html does not fit.
2. Add: speedtest.js, speedtest_worker.js, and favicon.ico to your speedtest folder.
3. Download all of the backend folder into speedtest/backend.
4. Download all of the results folder into speedtest/results.
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
4. Optionally, copy the results folder too, and set up the database using the config file in it.
5. Be sure your permissions allow execute (755).
6. Visit YOURSITE/speedtest/index.html and voila!

Expand Down Expand Up @@ -71,7 +68,7 @@ A partial Node.js implementation is available in the `node` branch, developed by
[Donate with PayPal](https://www.paypal.me/sineisochronic)

## License
Copyright (C) 2016-2022 Federico Dossena
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
Expand Down
12 changes: 6 additions & 6 deletions doc_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Here's a list of additional environment variables available in this mode:
* __`REDACT_IP_ADDRESSES`__: When set to true with telemetry enabled, IP addresses and hostnames are redacted from the collected telemetry, for better privacy. Default value: `false`
* __`PASSWORD`__: Password to access the stats page. If not set, stats page will not allow accesses.
* __`EMAIL`__: Email address for GDPR requests. Must be specified when telemetry is enabled.
* __`IPINFO_APIKEY`__: API key for ipinfo.io. Optional, but required if you expect to serve a large number of tests
* __`DISABLE_IPINFO`__: If set to true, ISP info and distance will not be fetched from ipinfo.io. Default: value: `false`
* __`DISTANCE`__: When `DISABLE_IPINFO` is set to false, this specifies how the distance from the server is measured. Can be either `km` for kilometers, `mi` for miles, or an empty string to disable distance measurement. Default value: `km`
* __`DISABLE_IPINFO`__: If set to true, ISP info and distance will not be fetched from either ipinfo.io or the offline database. Default: value: `false`
* __`IPINFO_APIKEY`__: API key for ipinfo.io. Optional, but required if you want to use the full ipinfo.io APIs (required for distance measurement)
* __`DISTANCE`__: When `DISABLE_IPINFO` is set to false, this specifies how the distance from the server is measured. Can be either `km` for kilometers, `mi` for miles, or an empty string to disable distance measurement. Requires an ipinfo.io API key Default value: `km`
* __`WEBPORT`__: Allows choosing a custom port for the included web server. Default value: `80`. Note that you will have to expose it through docker with the -p argument

If telemetry is enabled, a stats page will be available at `http://your.server/results/stats.php`, but a password must be specified.
Expand Down Expand Up @@ -85,7 +85,7 @@ In backend mode, LibreSpeed provides only a test point with no UI. To do this, s
The following backend files can be accessed on port 80: `garbage.php`, `empty.php`, `getIP.php`

Here's a list of additional environment variables available in this mode:
* __`IPINFO_APIKEY`__: API key for ipinfo.io. Optional, but required if you expect to serve a large number of tests
* __`IPINFO_APIKEY`__: API key for ipinfo.io. Optional, but required if you want to use the full ipinfo.io APIs (required for distance measurement). If no API key is provided, the offline database will be used instead.

###### Example:
This command starts LibreSpeed in backend mode, with the default settings, on port 80:
Expand Down Expand Up @@ -130,8 +130,8 @@ Here's a list of additional environment variables available in this mode:
* __`REDACT_IP_ADDRESSES`__: When set to true with telemetry enabled, IP addresses and hostnames are redacted from the collected telemetry, for better privacy. Default value: `false`
* __`PASSWORD`__: Password to access the stats page. If not set, stats page will not allow accesses.
* __`EMAIL`__: Email address for GDPR requests. Must be specified when telemetry is enabled.
* __`DISABLE_IPINFO`__: If set to true, ISP info and distance will not be fetched from ipinfo.io. Default: value: `false`
* __`DISTANCE`__: When `DISABLE_IPINFO` is set to false, this specifies how the distance from the server is measured. Can be either `km` for kilometers, `mi` for miles, or an empty string to disable distance measurement. Default value: `km`
* __`DISABLE_IPINFO`__: If set to true, ISP info and distance will not be fetched from the backend server. Default: value: `false`
* __`DISTANCE`__: When `DISABLE_IPINFO` is set to false, this specifies how the distance from the server is measured. Can be either `km` for kilometers, `mi` for miles, or an empty string to disable distance measurement. Requires an ipinfo.io API Key on the backend server. Default value: `km`
* __`WEBPORT`__: Allows choosing a custom port for the included web server. Default value: `80`

###### Example
Expand Down
4 changes: 3 additions & 1 deletion docker/ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
function I(i){return document.getElementById(i);}

//LIST OF TEST SERVERS. See documentation for details if needed
<?php if(getenv("MODE")=="standalone"){ ?>
<?php
$mode=getenv("MODE")
if($mode=="standalone" || $mode=="dual"){ ?>
var SPEEDTEST_SERVERS=[];
<?php } else { ?>
var SPEEDTEST_SERVERS= <?= file_get_contents('/servers.json') ?: '[]' ?>;
Expand Down

0 comments on commit 1932906

Please sign in to comment.