feat: validate the cc when using city params#175
Conversation
|
previous code not realy filter the cc, i just update it |
Co-authored-by: r3inbowari <atuk@qq.com>
|
Hi, @gandol. It doesn't seem to work because cc was not set when using lat and lon. |
|
yeah its true, if the cc was not filtered set because of this so the filter can run only if the cc was set before |
|
We can preload cc from here. |
|
In fact, filtering them has no practical effect, because the lat and lon parameters are determined by the ookla's server and they are always correct. Can you list a use case? |
|
try using |
|
This is normal, because location is searched within a rough radius. Even if you use the official speedtest, you will still get these results. The intention of |
|
For now, I think the best way is to add a
|
CityFlag and CC(country code) are not related. CityFlag only maps to a build-in geographical coordinate. |
if just use cc how to get the list of server, i was try use params of cc directly in url params can't get it |
cc should be used with city location as much as possible. |
|
@r3inbowari check my last commit, like that what you mean ? |
r3inbowari
left a comment
There was a problem hiding this comment.
Thank you! I left some comments.
|
I changed some code here. examples: ./speedtest-go --city=tokyo -l // disable filter by default
./speedtest-go --city=tokyo --filter-cc=jp -l
./speedtest-go --city=hongkong --filter-cc=cn --filter-cc=hk -l // excludes MO servers which close to HongKong and includes CN
./speedtest-go --city=hongkong --filter-cc=auto -l // auto attach which decided by your network provider
./speedtest-go --location=xx,xx --filter-cc=jp -lIf there is no server for this cc in the area you specify, the result will be empty. Do you think this is ok? |
hmm i think this is ok |
when just use lat lon the countty not correct, with these fix can check the valid county by the cc