GcoreCDNIPSelector
to choose the best IP from Gcore-CDN to reach the lowest latency and stable connections.
Background
Gcore's CDN provide a smooth experience over the world.
However, network connections from China sometime get shipments-lost and high-latency. As a result, some people would have liked to use low-latency IP addresses to bind Gcore's domain.
So, I wrote a script to choose IPs with the lowest latency to cater for this situation.
How to use?
-
set up node environment. In case people who haven't set up node. I highly recommand nvm or nvm-windows to set up.
-
run this JS file.
npm install
node ./main.js
- wait minites to get
result.txt
which contain best IPs will be saved in this folder.
For chosing the best one of them, you may need 站长ping to make sure that connection is stable over China. Otherwise, You you can use your HTTP service to test bandwidth.
In addition
At present, I use https://api.gcorelabs.com/cdn/public-net-list to query IPs. In case it expired, this script will going to be invalid. If you find this script is invalid, please put up an issue or find new url to replace.
Have you tried AWS CDN Cloudfront?
I have written another IP-selector for Cloudfront: https://github.com/BruceWind/CloudFrontIPSelector, you can try it.