Giter Site home page Giter Site logo

openspeedtest / speed-test Goto Github PK

View Code? Open in Web Editor NEW
1.8K 22.0 165.0 30.34 MB

SpeedTest by OpenSpeedTest™ is a Free and Open-Source HTML5 Network Performance Estimation Tool Written in Vanilla Javascript and only uses built-in Web APIs like XMLHttpRequest (XHR), HTML, CSS, JS, & SVG. No Third-Party frameworks or libraries are Required. Started in 2011 and moved to OpenSpeedTest.com dedicated Project/Domain Name in 2013.

Home Page: https://openspeedtest.com

License: MIT License

CSS 11.91% HTML 13.92% JavaScript 74.17%
html5 xhr2 css svg javascript html5-speedtest network-monitoring network-speed-meter network-tools speedtest

speed-test's People

Contributors

cgi-psaunders avatar my1 avatar openspeedtest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

speed-test's Issues

Change port

Hello,

is it possible to use another port?
3000 conflict with grafana.

thank you

when more clients perform the test, the bandwidth result is shared! so its not so usefully

i installed all settings as defaults with 1000Mbps interface..

i try to perform two test and results are divided in clients.. that is not the desired result!

the bandwidth is distributed between the two clients, I know that it is logical if they both go against the same server... how can I make them both suck the same 1000MBps... I know that this is with the webserver... how can be done in lighttp apart from nginx too?

in desktop perform the test at same time as in laptop.. check the video:

video_2022-09-21_19-34-19.mp4

shouldn't relative links be used instead of explicit?

Hi there

On my home apache server, I just created /var/www/html/speedtest/ and unpacked your HTML/etc into that (so I could run it as "https://my.server/speedtest/"). But it didn't work because the HTML was looking for "/assets", "/upload", "/downloading". So I went through the files and removed the leading "/" - turning them all into relative links.

Now it works fine - so I don't see any downside? Should that be the default?

BTW it just worked - well done ;-)

[Feature Request] Set test mode with UI

Instead of having the users input options as URL parameters, maybe have a list of configuration options under the SpeedTest start button? It would help with UX since you won't have to fiddle around with the URL parameter, which gets annoying especially on mobile.

If it's a question of making it as simple as possible to use, maybe have the user scroll down a bit before the options are presented, or hide them behind an "Advanced Options" button.

Use SSL on Windows?

Apparently all tutorials are made for Linux, so, how can I start my server using a TLS certificate that's on a different folder?

Is it by starting it with a .bat file like "openspeedtest.exe --tls-cert "path" --tls-key "path"" or something like that??

Problem with startup trying to do IPv6

So I have run this in a docker on a server and it runs fine, but I am trying to run this in a container runner (cloud foundry)

on docker image latest
I have looked at the scripts and based on the logs IPv6 shouldn't be configured, but then the nginx server gives and IPv6 error,

Is the Docker build file(s) available in version control so I can modify it to just do basic IPv4?

LOGS
2022-10-25T16:33:37.72-0600 [APP/PROC/WEB/0] OUT 10-listen-on-ipv6-by-default.sh: info: ipv6 not available
2022-10-25T16:33:37.73-0600 [APP/PROC/WEB/0] OUT /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
2022-10-25T16:33:37.73-0600 [APP/PROC/WEB/0] OUT /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
2022-10-25T16:33:37.73-0600 [APP/PROC/WEB/0] OUT /docker-entrypoint.sh: Configuration complete; ready for start up
2022-10-25T16:33:37.75-0600 [APP/PROC/WEB/0] ERR 2022/10/25 22:33:37 [emerg] 8#8: socket() [::]:3000 failed (97: Address family not supported by protocol)
2022-10-25T16:33:37.75-0600 [APP/PROC/WEB/0] ERR nginx: [emerg] socket() [::]:3000 failed (97: Address family not supported by protocol)

[Question] - NPM performance

You posted a video on the nginx proxy manager comparing native SSL with NPM ssl, and showed differences in max speeds.

Did you find settings in the advanced section to tune these findings?

Execute from CLI

Is there a way to initiate the speedtest from a cli using curl or wget?

Unexpected low download speed

My PC client and NAS server are connected by 2 x 2.5 Gbps switch. The OpenSpeedTest reports expected upload speed about 2450-2480 Mbps. However, the OpenSpeedTest download speed is always about 1500 Mbps-1800 Mbps (very unstable). Is there any possibility to activate some logs to investigate the issue ? I would like to find "the bottleneck" of download speed using OpenSpeedTest. Possible ?
NOK LAN WIndows 11 PRO 22H2 Client vs NAS Docker OpenSpeedTest Server

flent rrul, dslreports_8dn.conf

Flent is a Qt GUI for {netperf,} that has an approximation of the dslreports.com/speedtest which downloads 8x HTTP streams and measures 'Buffer Bloat'

How much of rrul/dslreports_8dn.conf can be done with just JS?

Results returning only local speeds?

I ran my self-hosted instance and it seems to be reporting 1 GB down and 570mbps up. I know my speeds are only 300/300mbps. I believe it is just measuring my local speeds. I added ?Host= to point to the openspeedtest.com IP, and I get the same results. What do I need to do to measure actual Internet speeds?

caddy config

Do you have a working configuration for caddy?

Currently testing with this one:

    reverse_proxy openspeedtest:3000 {
        flush_interval -1
    }

Change Port while using macvlan

Hello,

I use my Docker with macvlan and when I change Settings in Portainer zu 80:3000 and 443:3001 nothing changed.
Anyway to change the Port the container listens on?

Thanks mcdy!

How about unix CLI version? - Feature Request

Love it, so much nicer then iperf, if only it had CLI version so I could use it form the remote ends of network.
And then maybe a pyhon3 wrapper so I can automate those test?
best regardas
Maciej

Show the result self-hosted too

I think it's not a good practice to have the result shown on your website (opensppedtest) instead I believe it should be shown on the same server that is hosting the speed test, because there might be an environment where there is no internet to open your website or simply someone doesn't want to do it every time they want to see the test result.

Same thing for custom URL parameters, I think there should be a link to a guide on the test page as well which is self-hosted (a short version with less description (maybe just a popup box or tooltip))

[Feature Request] Dark mode

To match with some sites it’d be nice to have a dark background option.

Perhaps it could be a configurable color, or simply a Boolean for dark mode. On Docker it could be a container environment variable.

Error attempting to run on Docker host with IPv6 disabled...

Hi

I'm trying to run this on a Docker and a seperate K3S host, but its refusing to start up, it looks like forcing a hard dependency on IPv6 is the cause. The error I get is:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: ipv6 not available
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2022/11/15 17:24:40 [emerg] 1#1: socket() [::]:3000 failed (97: Address family not supported by protocol)
nginx: [emerg] socket() [::]:3000 failed (97: Address family not supported by protocol)

Fix upload speeds when using Nginx for reverse proxy

I'm trying to get OpenSpeedTest working behind my Nginx based reverse proxy, but I'm getting impossibly high upload speeds (12Gbps on a 1Gbps NIC). I've seen on one of the other closed issues about disabling compression on Traefik to get upload working, but I can't figure out how to get it working on Nginx.

If it makes a difference, this is from hijacking the built in Nginx on a Synology NAS. I know very little about Nginx, so I started with a generated one from Synology's settings app and adjusted it to disable gzip and increase client_body_max_size

Current .conf:

###
### OpenSpeedTest
###

server {
        listen 80;
        listen [::]:80;
        server_name ost.example.com;

        # Include this if you want to get a letsencrypt certificate for the domain you're using
        location ^~ /.well-known/acme-challenge/ {
                auth_basic off;
                root /var/lib/letsencrypt;
                default_type "text/plain";
        }

        # Include this if you want to automatically redirect to HTTPS
        location / {
                return 301 https://$server_name$request_uri;
        }
}

server {

        listen 443 ssl;
        listen [::]:443 ssl;
        server_name ost.example.com;

        # Include these if you want to use a specific certificate,
        # you'll need to find the location of the letsencrypt after you get it...
        # so this might need to be updated afterwards
        # ssl_certificate /usr/syno/etc/certificate/_archive/TI0h6w/fullchain.pem;
        # ssl_certificate_key /usr/syno/etc/certificate/_archive/TI0h6w/privkey.pem;
        # add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload" always;

        # Include this if you want basic authentication required
        #auth_basic “Restricted”;
        #auth_basic_user_file /etc/nginx/.htpasswd;

        location ^~ /.well-known/acme-challenge/ {
                auth_basic off;
                root /var/lib/letsencrypt;
                default_type "text/plain";
        }

        location / {

                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Proto $scheme;
                proxy_set_header        Upgrade                         $http_upgrade;
                proxy_set_header        Connection                      $connection_upgrade;
                client_max_body_size 100000M;
                gzip off;
                fastcgi_read_timeout 999;

                proxy_pass          http://localhost:3000/;
                proxy_read_timeout  90;

        }

  }

I think upload is broken?

My net specs I pay for
1gbps down/750mbps up
I see usually in the neighbourhood of around 650-750 down and about 500-600 up typically throughout the day,
I deployed this to a gke cluster and ran a test from the gke cluster to home, this is the results.
image

The download speed is typical of what I would see from lets say speettest.net, the upload though is definitely broken.
The docker image I used was openspeedtest/latest:latest (pushed 15 days ago from typing this)
DIGEST:sha256:2b058dda797e8bac0861a92cf5e6a34afbdf748b07f3b16fc65347916b62e504

Results from speed test immediately after running the openspeedtest one with negligible network traffic differences from my device
image

it's almost like the decimal place is off by 2 digits like I would expect to see around 579.64 would be normal for me

[Feature Request] Test logging / sharing

It would be great to be able to log all test runs (client ip, client geoloc, download, upload, jitter, ping) in a datasource (ie mysql), and ideally also provide a durable URL that users can use to share a result they got running the tool with others.

Upload speeds off by orders of magnitude

Running OpenSpeedTest on a local server on my home LAN. Downloads speeds clock in at just under 1 GBps, which makes sense given I am on Gigabit Ethernet. However, upload speeds come in at 100+ GBps results. The same issue happens when testing via WiFi from my phone. Screenshot of result attached.

Server is TrueNAS (FreeBSD), OpenSpeedTest is cloned locally via git clone command into a directory on the web server and served via Caddy web server.

Screen Shot 2022-08-16 at 6 01 39 PM

Unrealisticly high upload measurements

While my download measurements with OpenSpeedtest compare close to other measurements I did and the values are pretty much expected, my upload measurements are way higher than it is technically possible.
My home internet connection has an upload rate of 30 Mbps on paper, and my measurements with LibreSpeed are around 33 Mbps. However, OpenSpeedtest reports 2351.2 Mbps.

Any idea what may cause this?
I'm using a reverse proxy for SSL (Traefik) in front of the official Docker image, if that matters.
The only guess I have is that there's some kind of compression going on. But I don't have this issue with LibreSpeed and it is set up the same way and is even running on the same server.

Jitter time always shows zero, and request for option of number of decimal places for Jitter and Latency

Hi I have noticed that the jitter value always shows as zero. This is over an Internet connection with lots of Jitter. Other speed test websites show high amounts of jitter. I figure that there is an issue with it.
Also, is it possible to put in an option within index.html for configuring the number of displayed digits after the decimal place for Latency between 0 and 2 digits, and the same for the Jitter?

[Feature Request] Site branding customization

Really like OpenSpeedTest, thanks for the work on this. It would be great if we could add site information to the page about the hosting site. Docker environment variables or a config file would be ideal. For example:

  • Ability to change page title from "Speed Test OpenSpeedtest.com" to something custom, for example "mydomain.com Speed Test by OpenSpeedTest.com"
  • An optional additional box (next to or below the ping/jitter box) that indicates server "name" (env/config provided) and geographic location (City, State, or City, Country), and maybe ip address
  • An option to replace the pre-run logo on the speedometer

[Feature Request] Configurable length of test

The option to set the length of time the test will run, would be of great use.
for troubleshooting/upgrading/configuring network equipment, would be helpful to have the test run continuously so you can notice the effects instantly.

testing limit

hi,

is there any limit to checking the speed test? for example, if my site gets 100,000 visitors daily to test speed test, will it work out properly without problem? (if I have unlimited bandwidth) or does it need an API?

Latest Docker fails to start /docker-entrypoint.sh: exec: line 38: illegal option --

cconetboxpi01:/home/phpIPAM$ sudo docker run openspeedtest/latest --restart=unless-stopped --name openspeedtest -d -p 80:3000
/docker-entrypoint.sh: exec: line 38: illegal option --

Since the recent update I can't setup openspeedtest on machines that haven't had it before.
I've tried Ubuntu 20.04 LTS and 22.04 LTS but both give this error.
However it works fine on a Windows Docker with Ubuntu 20.04 LTS backend so unsure what the cause is.
Can you please review docker-entrypoint.sh in the docker?

Unrealistic upload speeds using Safari

I'm seeing unrealistic upload speeds using the current version of Safari on my iPhone and my Mac.

I have a small virtual machine using Debian 11 with Nginx as webserver for hosting openspeedtest on my internal network. The wired network speed is 1 Gbit/s.

Now when I run openspeedtest on my Mac (wired connection) using Safari I get completely unrealistic upload speeds (left side of the screenshot). But when I do the same thing using Firefox everything is plausible regarding the upload speed (right side of the screenshot).

Safari-Firefox

Using an iPhone and wifi is pretty much the same. For example my older iPhone 7 reports 210 Mbps as download and 4728 Mbps as upload.

I have turned off GZIP in the config file of Nginx. But the mystery remains.

What's wrong here?

New Feature: PowerShell Client

This is a great tool, thanks for all the hard work. It would be great if you could provide a Windows Command version, even better if it is PowerShell compatible.

thanks,
Larry

https don't work.

Hi, tried using adding this to my build with the path of where my cert and key were, -v /PATH-TO-YOUR-OWN-SSL-CERTIFICATE**:/etc/ssl/**. However I couldn't seem to get the https working. Is there something I'm missing. My key and cert are "fastpe.cert" and "fastpe.key". These cert and key are working on my other applications.

Upload speeds inconstant with actual file system performance

Docker image: openspeedtest/latest:latest
Docker version: 20.10.3, build 55f0773
Hardware: Synology DS1019+ (x86_64), DSM 7.1-42661 Update 4
Network: Gigabit Ethernet (10/100/1000)

I can typically saturate the local link to my Synology, sending/receiving ~960 Mbit. The download speeds shown with OpenSpeedTest on the same server somewhat accurately reflect this, showing 800-960 Mbit variably depending on other load factors. However, the upload speed test portion never exceeds 460-500 Mbit.

I'm unsure if this is expected due to the technologies involved or not. My apologies if they are. Thanks for any info and a snazzy tool!

[Feedback] Some things that I found

  1. I have a Wire and a WiFi connection on the PC.
    A. http://192.168.1.100:3000 for Wire and http://192.168.1.113:3000 for WiFi
    If I try to speed test both (only one at once) the connection is not going trought router, because I get speeds over 2000 and the router can maximum of 100 on Wire and is not using Network card, Utilization is 0%, just big CPU usage.
    B. Same for 192.168.1.113 seams I can't test the PC Wire -> Router -> PC WiFi / PC Wire, going straight to PC -> Self
  2. Add a way to change the mb/s to MB/s.

Apple Mac OS X Find-By-Content .DS_Store Web Directory Listing

Description
It is possible to read a '.DS_Store' file on the remote web server.

This file is created by MacOS X Finder; it is used to remember the icons position on the desktop, among other things, and contains the list of files and directories present in the remote directory.

Note that deleted files may still be present in this .DS_Store file.

Solution

  • Configure your web server so as to prevent the download of .DS_Store files

Output
http://127.0.0.1/.DS_Store
reveals the following entries:
hosted.html
upload
assets
app-2.5.1.js
images
css
License.md
downloading
README.md
index.html

Risk Factor: Medium
CVSS v2.0 Base Score: 5.0
CVSS v2.0 Temporal Score: 3.7
CVSS v2.0 Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N
CVSS v2.0 Temporal Vector: CVSS2#E:U/RL:OF/RC:C
https://nvd.nist.gov/vuln/detail/CVE-2001-1446

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.