{"id":17526696,"url":"https://github.com/cmliu/CF-Workers-SpeedTestURL","last_synced_at":"2025-03-06T06:30:38.881Z","repository":{"id":224975685,"uuid":"764739987","full_name":"cmliu/CF-Workers-SpeedTestURL","owner":"cmliu","description":"使用 CloudFlare Workers 搭建专属CloudFlareSpeedTest测速地址","archived":false,"fork":false,"pushed_at":"2024-03-17T08:31:29.000Z","size":7,"stargazers_count":9,"open_issues_count":0,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-17T09:29:07.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmliu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-28T16:17:05.000Z","updated_at":"2024-03-17T09:29:09.178Z","dependencies_parsed_at":"2024-02-28T17:50:54.841Z","dependency_job_id":"391037f1-d9a0-40e6-acc2-ba62d06e5463","html_url":"https://github.com/cmliu/CF-Workers-SpeedTestURL","commit_stats":null,"previous_names":["cmliu/speedtest-cloudflareworker","cmliu/cf-workers-speedtesturl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FCF-Workers-SpeedTestURL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FCF-Workers-SpeedTestURL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FCF-Workers-SpeedTestURL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmliu%2FCF-Workers-SpeedTestURL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmliu","download_url":"https://codeload.github.com/cmliu/CF-Workers-SpeedTestURL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242161249,"owners_count":20081832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T15:02:12.890Z","updated_at":"2025-03-06T06:30:38.602Z","avatar_url":"https://github.com/cmliu.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# SpeedTest-CloudflareWorker\n\n## 一、项目简介\n\n本项目是一个使用Cloudflare的Worker搭建SpeedTest测速地址的工程，主要代码在`worker.js`文件中。通过本项目，你可以很容易地在Cloudflare上搭建起自己的测速服务。\n\n## 二、功能介绍\n\n例如您的项目域名为 `speedtest.cmliussss.workers.dev`\n\n1. **默认测速大小为200MB**：当未在路径中指定测速大小时，项目会默认进行200MB的测速。\n\n- 200M   默认测试下载地址: `https://speedtest.cmliussss.workers.dev`\n \n\n2. **自定义测速大小**：通过在路径中指定数字和单位（可选的单位包括 K，M，G），可以设定想要进行测速的数据大小，如“/500M”表示进行500MB的测速。\n\n- 1024K  测试下载地址: `https://speedtest.cmliussss.workers.dev/1024k`\n- 200M   测试下载地址: `https://speedtest.cmliussss.workers.dev/200m`\n- 1G     测试下载地址: `https://speedtest.cmliussss.workers.dev/1g`\n\n3. **推荐使用workers部署方案并绑定自定义域，即可同时具备 http/https 两种测速途径。**\n\n## 三、使用指南\n\n1. 克隆或下载本项目到你的本地设备。\n\n2. 在Cloudflare的Worker中创建一个新的项目，并将`worker.js`文件中的代码复制粘贴到你的项目中。\n\n3. 部署你的Worker项目。\n\n现在，你可以访问你的Worker的URL，进行网速测试了。\n\n## 四、注意事项\n\n- 代码中的路径需要做适当修改，以反映你自己的Cloudflare Worker的URL。\n- 当路径不符合预设的格式时，程序将返回400错误。\n\n希望这个星级的项目能对你有所帮助，如果你喜欢或用到了本项目，希望能给我一个星级鼓励一下。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmliu%2FCF-Workers-SpeedTestURL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmliu%2FCF-Workers-SpeedTestURL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmliu%2FCF-Workers-SpeedTestURL/lists"}