You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reliable way to use speedtest-cli with proxies?
Under certain circumstances the environment parameter http_proxy seems to be taken into account on different operating systems if this is configured.
Tested it mainly on windows. but even there on different systems there were different test results with the same exe.
However, the actual download of the server list or the transmission of the statistics at the end (--share) does not seem to run via the proxy at all. Maybe someone has a solution before I start tinkering.
The text was updated successfully, but these errors were encountered:
Seems only partially complicated with my knowledge of go. But that is rather ephemeral, if i be honest.
The following botch works but the code is not suitable for production in my mind.
I tested this in my fork. It works but it's not yet worthy of a pull request.
Insert the transport.Proxy = nil at line 158 in speedtest.go and no proxy is used at all.
That's where the easy part ends. More or less.
Insert the following at the same line and the HTTP_PROXY environment variable will be respected except the --share part. proxyUrl, _ := url.Parse(os.Getenv("HTTP_PROXY"))
transport.Proxy = http.ProxyURL(proxyUrl)
After that, at least the speedtest server list download and the test itself are transported via the proxy.
Something similar could be realized with a start parameter like --proxy-http.
But at the end the --share still needs some tinkering.
Is there a reliable way to use speedtest-cli with proxies?
Under certain circumstances the environment parameter http_proxy seems to be taken into account on different operating systems if this is configured.
Tested it mainly on windows. but even there on different systems there were different test results with the same exe.
However, the actual download of the server list or the transmission of the statistics at the end (--share) does not seem to run via the proxy at all. Maybe someone has a solution before I start tinkering.
The text was updated successfully, but these errors were encountered: