Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 error fix #790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

403 error fix #790

wants to merge 1 commit into from

Conversation

Loukious
Copy link

Fixing the 403 error by making all requests use HTTPS instead of HTTP. Also removing the --secure flag as it's now enabled by default.

Fixing the 403 error by making all requests use HTTPS instead of HTTP. Also removing the --secure flag as it's now enabled by default.
@rgaufman
Copy link

Please merge as the tool is unusable at the moment

@EVOTk
Copy link

EVOTk commented Nov 21, 2022

This version doesn't work for me

@Loukious
Copy link
Author

This version doesn't work for me

Do you have any specific error?

@EVOTk
Copy link

EVOTk commented Nov 21, 2022

#788 (comment)

image

@Loukious
Copy link
Author

#788 (comment)

image

Can you try this on Windows?

@EVOTk
Copy link

EVOTk commented Nov 21, 2022

no on Linux Debian

@Loukious
Copy link
Author

no on Linux Debian

Yes but can you try it on Windows?

@EVOTk
Copy link

EVOTk commented Nov 21, 2022

I have to modify the first line with "#! python3" for the script run, but I still get the error :

image

@smerkousdavid
Copy link

Can confirm that on linux (arch). I was originally getting this error until I provided the --secure flag.
image
I'm pretty sure if you're connecting to speedtest.net then the HTTPS part should be working.

@darth-crunchus
Copy link

Where do you provide the '--secure' flag? I'm running speedtest.py through curl. And every time I I try to pass the '--secure' flag to the script in the url, curl gripes at me about it being an unknown option. ([...]/master/speedtest.py --secure | python3 -) Or can you not pass options to the script when running as a url?

@smerkousdavid
Copy link

smerkousdavid commented Nov 22, 2022

Where do you provide the '--secure' flag? I'm running speedtest.py through curl. And every time I I try to pass the '--secure' flag to the script in the url, curl gripes at me about it being an unknown option. ([...]/master/speedtest.py --secure | python3 -) Or can you not pass options to the script when running as a url?

You're just simply using curl to download the file from GitHub and then telling python to read the contents of the file through stdin using the - after python. You can provide any arguments you want, specifically to the python script, after the - argument like this. Again think of the dash as you telling python that instead of reading from a file on the disk just read from stdin, which in this case you're piping stdout of curl into stdin of python. You might already know this, but just wanted to clarify.
curl [...]master/speedtest.py | python3 - --secure
Although, I would personally just download the file or use pip to install it.

@darth-crunchus
Copy link

Thank you; I'm kinda new to working with curl like this, (or really in much of any capacity) so, I wasn't sure.

@LinuxOnTheDesktop
Copy link

I have speedtest-cli 2.1.3, which I run on Linux (Mint) and occasionally I see the following.

Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: HTTP Error 403: Forbidden

I am unsure what workaround, if any, this page (the current webpage) is suggesting.

@artickl
Copy link

artickl commented Jun 27, 2023

@LinuxOnTheDesktop - just run it with the "secure" flag and everything will be good. Provider finally starts blocking HTTP requests and looks like most of their servers allowing only HTTPS protocol:
$ speedtest-cli --secure

@LinuxOnTheDesktop
Copy link

just run it with the "secure" flag and everything will be good.

Right. Thank you. Will do.

Provider finally starts blocking HTTP requests and looks like most of their servers allowing only HTTPS protocol

Yet me clarify that, in case someone else comes across it and has trouble understanding it. So: the servers that provide the speed tests are blocking speedtest-cli (or rather, in my experience: blocking it sometimes) because (by default, i.e. without --secure) speedtest-cli uses HTTP rather than HTTPS.

@milahu
Copy link

milahu commented Nov 26, 2023

i prefer #800 for the --insecure flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants