XIU2 / CloudflareSpeedTest

🌩「自选优选 IP」测试 Cloudflare CDN 延迟和速度,获取最快 IP !当然也支持其他 CDN / 网站 IP ~
GNU General Public License v3.0
18.24k stars 3.51k forks source link

Speed Test with Websocket #289

Closed iPurya closed 1 year ago

iPurya commented 1 year ago

hi,

while we use WS + CDN its better to test speed with websocket protocol.

iPurya commented 1 year ago

or if someone can help me to use TCP + CDN ?

XIU2 commented 1 year ago

Unable to achieve. Because the conditions for speed measurement through the WSS protocol will be more stringent. You need to build a WSS application on the server to be used as the download speed measurement address, and WSS cannot be cached (it needs to consume the same traffic as the server), so each speed measurement is returned to the source in real time.

Also, I personally don't need the feature, so I'm not motivated to research and write code.


I know a lot of people will use Cloudflare CDN as a proxy, but this is actually a violation of Cloudflare CDN's terms of service (abuse), so while I won't prevent this behavior, I won't encourage it either.

I temporarily taught myself the Golang language to develop this software just to optimize the access speed of all websites using the Cloudflare CDN. But now I am no longer limited to the Cloudflare CDN, and have begun to be widely used in other CDNs and website speed measurement.