speedtest-rs/README.md

81 lines
2.5 KiB
Markdown
Raw Normal View History

2021-10-03 11:13:07 +02:00
# speedtest-rs
This is a lightweight backend written in Rust for [Librespeed](https://github.com/librespeed/speedtest).
2022-10-10 21:20:08 +02:00
Fork from: https://github.com/camilohe/speedtest-rs.git
Original repos: https://github.com/drobson03/speedtest-rs.git
2021-10-03 11:13:07 +02:00
## Compatibility
Supported by all Librespeed frontends, though some features are missing (see below).
## Features
- [x] Download
- [x] Upload
- [x] Ping
- [x] Jitter
- [x] IP Address, ISP
- [x] Multiple Points of Test (optional)
- [x] Compatible with PHP frontend predefined endpoints (with `.php` suffixes)
2021-10-03 13:52:23 +02:00
- [x] Distance from server (optional)
2021-10-03 11:13:07 +02:00
- [ ] Telemetry (optional)
- [ ] Results sharing (optional)
- [ ] [Proxy Protocol](https://www.haproxy.org/download/2.3/doc/proxy-protocol.txt)?
## Server requirements
* A Rust supported platform
* A fast! Internet connection
## Installation
You need Rust 1.55+ to compile the binary.
1. Clone this repository:
```bash
2022-10-10 21:20:08 +02:00
git clone https://cloud.silique.fr/gitea/Silique/speedtest-rs.git
2021-10-03 11:13:07 +02:00
# Change current working directory to the repository
cd speedtest-rs
```
2. Build before running
```bash
# Compile to target/release/speedtest-rs
cargo build --release
```
2022-10-10 21:20:08 +02:00
3. Copy the `assets` directory and the compiled `speedtest-rs` binary into a single directory.
2021-10-03 11:13:07 +02:00
2022-10-10 21:20:08 +02:00
4. Put `assets` folder under the same directory as your compiled binary.
2021-10-03 11:13:07 +02:00
- Make sure font files and JavaScript files are in the `assets` directory
- You can have multiple HTML pages under `assets` directory. They can be access directly under the server root
(e.g. `/example-singleServer-full.html`)
- It's possible to have a default page mapped to `/`, simply put a file named `index.html` under `assets`
2022-10-10 21:20:08 +02:00
5. Launch: ./speedtest-rs
2021-10-03 11:13:07 +02:00
## Differences between Go and PHP implementation
- FAST (no garbage collector unlike Go)
## License
Copyright (C) 2016-2021 Federico Dossena
Copyright (C) 2021 Darcy Robson
2022-10-10 21:20:08 +02:00
Copyright (C) 2022 Emmanuel Garette
2021-10-03 11:13:07 +02:00
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
2022-10-10 21:20:08 +02:00
along with this program. If not, see <https://www.gnu.org/licenses/lgpl>.