ddsol / speedtest.net

node.js SpeedTest.net client module
MIT License
611 stars 124 forks source link

How do i add specific server to test against ? #88

Closed rvblerk closed 5 years ago

rvblerk commented 5 years ago

I have this script setup in node-red but it seems to want to default to overseas servers and not to one locally in my country.

This is what it corrently looks like

image

and the code image

ddsol commented 5 years ago

The server is picked based on the IP. This is fairly accurate these days, so I'm thinking your originating IP may not be from the country you expect it to be. Note that this module does not determine the IP location, it's speedtest.net that does this and I can't change how they do what they do, so if it's broken I can't fix it.

That said, as the docs clearly state, you can pass a serverId in the options. You can get a list of servers here (also in the docs). This is not a webpage, it's an XML document.

The code in the picture you posted doesn't call this module, but just moves some data around. There's nothing in it that can be changed to allow you to specify a server.