|
|
il y a 5 ans | |
|---|---|---|
| .github | il y a 7 ans | |
| .logo | il y a 6 ans | |
| assets | il y a 5 ans | |
| config | il y a 5 ans | |
| database | il y a 5 ans | |
| results | il y a 5 ans | |
| web | il y a 5 ans | |
| .gitignore | il y a 6 ans | |
| LICENSE | il y a 6 ans | |
| README.md | il y a 5 ans | |
| go.mod | il y a 5 ans | |
| go.sum | il y a 5 ans | |
| main.go | il y a 5 ans | |
| settings.toml | il y a 5 ans |
No Flash, No Java, No WebSocket, No Bullshit.
This is a very lightweight speed test implemented in JavaScript, using XMLHttpRequest and Web Workers.
Take a speed test (PHP implementation)
All modern browsers are supported: IE11, latest Edge, latest Chrome, latest Firefox, latest Safari.
Works with mobile versions too.
You need Go 1.13+ to compile the binary.
Use this to install the binary into your GOPATH:
$ go get github.com/librespeed/speedtest@go
If you have telemetry enabled,
For PostgreSQL/MySQL, create database and import the corresponding .sql file under database/{postgresql,mysql}
# assume you have already created a database named `speedtest` under current user
$ psql speedtest < database/postgresql/telemetry_postgresql.sql
For embedded BoltDB, make sure to define the database_file path in settings.toml:
database_file="speedtest.db"
Put assets folder under the same directory as your compiled binary.
assets directoryassets directory. They can be access directly under the server root
(e.g. /example-singleServer-full.html)/, simply put a file named index.html under assetsChange settings.toml according to your environment:
# bind address
bind_address="127.0.0.1"
# backend listen port, default is 8989
listen_port=8989
# download test chunks, default is 4
download_chunks=4
# ipinfo.io API key, if applicable
ipinfo_api_key=""
# distance unit used in frontend, available options: M (miles), K (kilometers), N (nautical miles), default is "K"
distance_unit="K"
# enable CORS headers
enable_cors=false
# password for logging into statistics page, change this to enable stats page
statistics_password="PASSWORD"
# redact IP addresses
redact_ip_addresses=false
# database type for statistics data, currently supports: bolt, mysql, postgresql
database_type="postgresql"
database_hostname="localhost"
database_name="speedtest"
database_username="postgres"
database_password=""
# if you use `bolt` as database, set database_file to database file location
database_file="speedtest.db"
.php extension (e.g empty, garbage, getIP)Copyright (C) 2016-2020 Federico Dossena
Copyright (C) 2020 Maddie Zhan
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.