{"id":13588701,"url":"https://github.com/XGHeaven/homebox","last_synced_at":"2025-04-08T06:32:28.472Z","repository":{"id":44477892,"uuid":"246213373","full_name":"XGHeaven/homebox","owner":"XGHeaven","description":"A Toolbox for Home Local Networks","archived":false,"fork":false,"pushed_at":"2025-02-11T17:39:18.000Z","size":473,"stargazers_count":563,"open_issues_count":8,"forks_count":44,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T00:34:34.706Z","etag":null,"topics":["home","homebox","network","speedtest"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/XGHeaven.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,"publiccode":null,"codemeta":null}},"created_at":"2020-03-10T05:09:31.000Z","updated_at":"2025-04-05T05:25:24.000Z","dependencies_parsed_at":"2022-07-19T03:47:06.324Z","dependency_job_id":"f96785db-58ab-4cd5-bfb2-b649e7c3c664","html_url":"https://github.com/XGHeaven/homebox","commit_stats":{"total_commits":53,"total_committers":2,"mean_commits":26.5,"dds":"0.018867924528301883","last_synced_commit":"0188b67ead6f59a522a0e4810cf044bf65b4b397"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XGHeaven%2Fhomebox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XGHeaven%2Fhomebox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XGHeaven%2Fhomebox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XGHeaven%2Fhomebox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XGHeaven","download_url":"https://codeload.github.com/XGHeaven/homebox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792147,"owners_count":20996878,"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":["home","homebox","network","speedtest"],"created_at":"2024-08-01T15:06:52.488Z","updated_at":"2025-04-08T06:32:28.462Z","avatar_url":"https://github.com/XGHeaven.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Homebox\n\n家庭网络工具箱。用于组建家庭局域网时，对网络进行调试、检测、压测的工具集合。\n\n## Feature\n\n- 面向未来浏览器设计\n- 高达 10G 的浏览器速度测试\n- 自带 Ping 检测\n- 丰富的自定义测速参数\n- 服务端无需像传统文件拷贝一样需要固态的支持\n- 友好的 UI 交互\n- 针对低速网络(\u003c 2.5G)优化测速资源占用\n\n[v1 进度追踪看板](https://github.com/XGHeaven/homebox/projects/1)\n\n![dark-theme](./doc/dark-theme.png)\n\n![light-theme](./doc/light-theme.png)\n\n## Requirement\n\n- 本软件需要一个服务端进行部署，然后通过客户端访问网页进行测试\n- 当需要对万兆以上网络测试的时候，需要保证客户端的性能（主要为 CPU 单核）足够强劲，否则可能会成为瓶颈。\n  具体的要求可以看后文的[性能测试](#Performance)\n\n## Install\n\n### Docker\n\n首先你需要有一台服务器，只要能支持安装 Docker 即可，比如群辉、FreeNas、unRaid、CentOS 等等，暂时只支持 x86 服务器。\n\n```bash\ndocker run -d -p 3300:3300 --name homebox xgheaven/homebox\n```\n\n安装并启动 `xgheaven/homebox` 镜像，默认情况下暴露的端口是 `3300`。\n然后在浏览器中输入 `http://your.server.ip:3300` 即可。\n\n### Binary\n\n直接在 [Release](https://github.com/XGHeaven/homebox/releases) 下载对应版本即可。\n\n解压之后直接执行 serve 命令即可启动服务，参数如下\n\n```text\nUsage: homebox serve [OPTIONS]\n\nOptions:\n      --port \u003cPORT\u003e  Port to listen\n      --host \u003cHOST\u003e  Host to listen\n  -h, --help         Print help\n```\n\n## Usage\n\n输入网址之后，会看到分为两种测试模式，分别是单次测速和持续压测。\n\n- **单次测速**的模式下，会依次执行 Ping/Download/Upload 测试，一般可以直接用这个模式。\n- **持续压测**的模式下，可以不限时的以最高速度压测链路，通常可以用于设备移动中链路稳定性测试、多设备压测、路由器转发散热性能测试等。\n\n默认情况下，设备会以低速模式运行，适用于大部分网络情况。\n也可以在**高级配置**中切换为高速模式，此时会将客户端资源榨干的方式尽可能压榨网络流量，用于万兆以上的高速网络。\n\n### Terminal(WIP)\n\n某些极端情况下，机器性能不足或者浏览器版本过低，可以直接通过复制浏览器中提供的测速脚本，在终端中测速。\n一方面方便某些懒人不愿意打命令行，另一方面脱离了浏览器的环境，测速性能和准确度会更高\n\n## Design\n\n由于众所周知的原因，浏览器中 JavaScript 的效率是比较低的，再加上网络请求的时候，需要占用大量的内存。\n所以为了避免主线程的卡顿，所有的请求都是在 Web Worker 中进行的。\n\n但仅仅一个 Worker 是支撑不住万兆网络的测速要求的，因为一个 Worker 并发请求的能力依旧很低。\n比如使用 curl 单链接单进程最高可以达到 2GB/s 的速度，核算过来大约 16Gbps。\n而一个 Worker 就算是开启多请求并发的速度，也仅仅只能达到 500MB/s，可见性能有多低。\n\n解决方案也很简单，创建多个 Worker 叠加测速，来叠加到万兆网络的要求。\n但是多个 Worker 对机器的性能要求很高，如果只是用于千兆网络测速，而机器性能又比较弱，就会导致测速不准。\n\n这就是为什么会有两种模式的原因，**高速模式**和**低速模式**。\n在高速模式下，会启用多 Worker，而低速模式下，仅仅启用一个 Worker 来减少资源的占用。\n\n## Performance\n\n\u003e 目前我暂时没有万兆以上的移动端设备，如果哪位小伙伴有的话，可以将结果告诉我\n\n以下为客户端测试\n\n- 在 2017 款 13 寸 Macbook 上，低速配置下能够实现 4G 下载速度以及 3G 上传速度\n- 在 2019 款 16 寸 Macbook 上，在开启高速模式下，最高可以达到 12G 的下载速度以及 10G 的上传速度\n- 在 AMD 3600 的设备上，高速模式下可以达到 15G 的下载速度以及 12G 的上传速度\n- 在 M2 Macbook Air 的设备上，低速模式可以达到 20G 的下载速度以及 16G 的上传速度，不建议开启高速模式，会导致资源调度竞争从而数值下降且不稳定\n\n## Powered by\n\n- Rust(actix-web) 服务端\n- TypeScript 前端语言\n- React 前端框架\n- Rspack 前端打包工具\n- 其他依赖请查看相应文件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXGHeaven%2Fhomebox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXGHeaven%2Fhomebox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXGHeaven%2Fhomebox/lists"}