Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Cannot set any parameters in config.json #28

Open
Shadebzh opened this issue Jan 20, 2021 · 5 comments
Open

Cannot set any parameters in config.json #28

Shadebzh opened this issue Jan 20, 2021 · 5 comments
Assignees
Labels

Comments

@Shadebzh
Copy link

Dear Sir,

Thank you for this great software ! Very useful... I try to change some options, but it seem my config.json is never read, when I launch npm run start:dev, I've got my good config.json in "dist" directory, but the option don't seem to be used
Any help ? Thank you a lot !

Here is an example for my config.json file :

{
"download": {
"duration": 30
}
}

@e7d e7d added the bug label Jan 21, 2021
@e7d
Copy link
Owner

e7d commented Jan 21, 2021

Hello @Shadebzh,

You are right. I just figured the documentation is way out of date with latest set of configurable options.
I'll try to address that as soon as possible.

@Shadebzh
Copy link
Author

Shadebzh commented Jan 21, 2021

Thank you a lot ! Just to know, is there a way to find new parameters in a source code file ?

@e7d
Copy link
Owner

e7d commented Jan 23, 2021

You can find all configurable options in this file:
https://github.com/e7d/speedtest/blob/master/packages/web/src/js/worker/config.js
Be aware that the final configuration is mage by combining the result of the different methods. You would need to be able to understand a bit of JavaScript.
I also reckon that there is a problem with the current state of the configuration handling.

Despite being able to configure a lot of download/upload options, some of them are overridden by the front end, through the presets. You can find them by clicking the cog on the top right corner.
As long as you don't change the preset you are fine. But as soon as you set one, even the "normal" one, a combination of parameters are overridden, including the download duration you are interested on. That's probably why you would not see your change on config.json being reflected.

That is definitely an issue i would need to address.

@Shadebzh
Copy link
Author

Shadebzh commented Jan 23, 2021

Thank you again a lot for your answer.

In fact, I try to make (force) download and upload request via websocket rather than XHR (due to XHR number concurrent limit in browser).

I have noticed the parameter endpoint.websocket with ws://, get parameters in config.js and also noticed you make a GET request on config.json in xhr, but when I try to make this :
{
"endpoints": [
{
"label": "Websocket1",
"uri": "ws://185.176.168.169:5080"
}
]
}

No websocket, only XHR. Is there any wat to do this ? Last question I promise ;-) Thank you.

@e7d
Copy link
Owner

e7d commented Feb 19, 2021

Hi again @Shadebzh

The endpoints key only goal is to setup the list of external endpoints usable from a defined speedtest instance.
In this section, you would only reference other speedtest websites, through their respective HTTP-based URIs.

What you seem to want to achieve is to switch from XHR-based bandwidth tests to WebSocket-based ones.
It was possible in past versions, but not anymore. It was kind of working, but the behavior was really inconsistent from an environment to another. Long story short, Chrome was kind of OK on any OS, other browsers/OS combinations lead regularly to strange or unpredictable behaviors.

My project having in mind to be as much all-terrain as possible, i decided to lock out this option, as long as I can't find a satisfying enough solution.

Regards.

@e7d e7d self-assigned this Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants