490b008a570d3a9e2ebea8803e38d3553637ebef
Build musl and glibc for amd64 and arm64 through one native package path. Reuse musl outputs for OCI images and OpenWrt installers, and export binaries inside a rootless unshare session. Restore the executable dependency graph into a shared persistent NuGet cache, build managed dependencies once, and run isolated native publishes in parallel. Clean temporary outputs and expired image layers under store locks, retire inactive legacy stores after seven days, and retain two toolchain exports. Add regression coverage for staging, extraction, packaging and cleanup boundaries.
MoShiro
MoShiro 旨在解决跨网络线路质量难以量化的问题:
- 家宽到海外 VPS 的延迟、丢包、抖动随时段波动,单点 ping 无法反映真实体验;
- 不同代理、游戏、流媒体服务对线路的敏感度各异,缺少统一的评价口径。
它通过 Agent 之间的主动测量采集原始数据,由 Backend 推算指标,并按服务模型(REALITY、Hysteria2、Minecraft 等)对线路评分与排序。
组件
| 组件 | 职责 |
|---|---|
| Agent | 统一采集节点,默认同时监听和拨号;可部署在 VPS、家宽或 NAT 后 |
| Backend | 注册、线路编排、存储、分析和 REST / SSE |
| Web | 匿名只读展示端 display 与管理端 admin |
Backend ---- REST / SSE ---- Web
^ ^
| | 每个 Agent 独立建立 wss,汇报自身及线路状态
| |
Agent A <=====> Agent B
直连测量
Agent 默认向其他可拨号 Agent 建立测量线路,A→B 和 B→A 分别记录;节点不连接自身。
管理端统一展示 Agent,在线路画板中按方向开关测量、查看连接状态和立即重试。
家宽或 NAT 后的 Agent 仍可拨出;入站测量需要其他节点能够访问其监听地址和端口。
可在本地 agent.json 中显式设置 listen.enabled: false 关闭监听,节点身份和程序保持统一。
快速开始
环境:.NET SDK 10(版本见 global.json)、Node.js 与 npm。
cd backend && dotnet run --project src/MoShiro.Backend -- --urls http://localhost:5000 # Backend
npm ci --prefix web && npm run dev --prefix web # Web(另开终端,仓库根目录)
展示端 http://localhost:5173/,管理端 http://localhost:5173/admin/。首次访问管理端进入认领向导,认领码输出在后端日志。
构建与测试:
dotnet build MoShiro.slnx -c Release
dotnet test --solution MoShiro.slnx
npm run build --prefix web
文档
| 主题 | 文档 |
|---|---|
| 架构与数据链路 | architecture |
| 线协议与方法 | protocol |
| 采集引擎与任务 | measurement |
| 分析、存储、查询 | analysis · storage · query |
| 安全:威胁模型、访问控制、注册与身份 | security · access · enrollment |
| REST / SSE 接口 | api |
| 构建、发布、CI、部署与更新 | deployment |
| 仓库结构与代码风格 | project-layout · coding-style |
| 路线图 | roadmap |
| 子项目 | backend · fleet · agent · web |
贡献与自动化代理的工作约定见 AGENTS.md。
许可证
Releases
5
MoShiro v0.4.0
Latest
Languages
C#
69.7%
TypeScript
19.2%
Shell
5%
CSS
2.6%
Python
2.2%
Other
1.3%