Cloudflare workers自建测速地址,再也不用担心v2rayN测速地址不能用了

 



涉及的相关的网址和代码:

https://github.com/XIU2/CloudflareSpeedTest/issues/168

https://dash.cloudflare.com/


addEventListener("fetch", event => {

  let url = new URL(event.request.url);

  if (url.pathname == "/" && url.search == "") {

    url.href=""

    let request = new Request(url, event.request);

    event.respondWith(fetch(request));

  }

})

视频演示: