20 releases

0.1.5 Feb 12, 2024
0.1.4 Feb 27, 2023
0.1.2 Jul 24, 2021
0.1.1 Jul 26, 2020
0.0.1 Nov 19, 2015

#1659 in Network programming

Download history 66/week @ 2023-11-20 52/week @ 2023-11-27 30/week @ 2023-12-04 21/week @ 2023-12-11 74/week @ 2023-12-18 49/week @ 2023-12-25 55/week @ 2024-01-01 46/week @ 2024-01-08 77/week @ 2024-01-15 128/week @ 2024-01-22 64/week @ 2024-01-29 58/week @ 2024-02-05 317/week @ 2024-02-12 148/week @ 2024-02-19 172/week @ 2024-02-26 94/week @ 2024-03-04

735 downloads per month

MIT/Apache

51KB
1K SLoC

speedtest-rs

a tool like speedtest-cli, but in Rust

Continuous integration

Status: This is usable for lower-end residential connections using "HTTP Legacy Fallback"

Install from AUR

paru -S speedtest-rs

or

paru -S speedtest-rs-bin

HTTP Legacy Fallback

This tool currently only supports HTTP Legacy Fallback for testing.

High bandwidth connections higher than ~200Mbps may return incorrect results!

The testing operations are different from socket versions of tools connecting to speedtest.net infrastructure. In the many FOSS Go versions, tests are done to find an amount of data that can run for a default of 3 seconds over some TCP connection. In particular, speedtest-cli and speedtest-rs tests with what Ookla calls the "HTTP Legacy Fallback" for hosts that cannot establish a direct TCP connection.

Ookla speedtest now has their own non-FOSS CLI tool that's native and available for many platforms.

  • TCP-based
  • Higher Bandwidth capable.

https://www.speedtest.net/apps/cli

Please look here. Unfortunately, it is not FOSS. Still, it is supported by them and can be used for non-commercial purposes.

Purpose

This is a learning exercise for me to learn Rust and keeping up with its ecosystem.

The HTTP Legacy Fallback is currently based on the popular Python implementation:

https://github.com/sivel/speedtest-cli @ 2.1.2

There are also other speedtest.net using tools using different approaches to be stolen from in the future. For example:

https://github.com/traetox/speedtest

This example seems different as it appears to just use TCP connections and some protocol. It's probably more suitable to high-speed connections. TODO: Add a default TCP-mode.

Use as a Library

The API is very much not stable. Use at your own risk. Semver adherence definitely not guaranteed. Please lock to exact versions if you must.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~11–27MB
~394K SLoC