Files
MoShiro/README.md
T
justme d5ebf29e57
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline was successful
ci/woodpecker/push/e2e Pipeline was successful
docs: tighten wording, soften node capability claims, link architecture to code
- Remove the node capability paragraph from README; soften "pure collector"
  and "no self-update" statements in docs, AGENTS.md and READMEs
- architecture.md: drop scalability goals, design decisions and open items;
  add a component-to-code table and code links
- Replace rhetorical contrasts in security docs with direct statements
- AGENTS.md: add project mental model, change map and writing style rules
2026-10-21 06:52:01 +08:00

70 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MoShiro
MoShiro 旨在解决跨网络线路质量难以量化的问题:
- 家宽到海外 VPS 的延迟、丢包、抖动随时段波动,单点 ping 无法反映真实体验;
- 不同代理、游戏、流媒体服务对线路的敏感度各异,缺少统一的评价口径。
它通过 Probe 与 Agent 之间的主动测量采集原始数据,由 Backend 推算指标,并按服务模型(REALITY、Hysteria2、Minecraft 等)对线路评分与排序。
## 角色
| 角色 | 定位 | 部署位置 |
| --- | --- | --- |
| Probe | 测量发起端,向 Agent 拨出测量会话 | 家宽等出口,可位于 NAT 后 |
| Agent | 测量接收端,响应 Probe 并汇总两端数据上报 | 具备公网地址的 VPS 等节点 |
| Backend | 控制面与数据服务:注册、任务编排、存储、分析、REST / SSE | 自托管服务器 |
| Web | `display` 展示端(可匿名只读)与 `admin` 管理端 | 与 Backend 同源部署 |
```text
┌───────────── Backend ─────────────┐
│ 注册 · 编排 · 存储 · 分析 · API │──▶ Web
└───────▲───────────────────▲───────┘
│ wss(节点发起) │
┌───────┴────────┐ ┌──────┴───────┐
│ Agent × N │◀──│ Probe × N │
│ 公网可达 │ │ NAT 后 │
└────────────────┘ └──────────────┘
测量会话:Probe → Agent
```
## 快速开始
环境:.NET SDK 10(版本见 `global.json`)、Node.js 与 npm。
```sh
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/>。首次访问管理端进入认领向导,认领码输出在后端日志。
构建与测试:
```sh
dotnet build MoShiro.slnx -c Release
dotnet test --solution MoShiro.slnx
npm run build --prefix web
```
## 文档
| 主题 | 文档 |
| --- | --- |
| 架构与数据链路 | [architecture](docs/design/architecture.md) |
| 线协议与方法 | [protocol](docs/design/protocol.md) |
| 采集引擎与任务 | [measurement](docs/design/measurement.md) |
| 分析、存储、查询 | [analysis](docs/design/analysis.md) · [storage](docs/design/storage.md) · [query](docs/design/query.md) |
| 安全:威胁模型、访问控制、注册与身份 | [security](docs/security/security.md) · [access](docs/security/access.md) · [enrollment](docs/security/enrollment.md) |
| REST / SSE 接口 | [api](docs/api/api.md) |
| 构建、发布、CI、部署与更新 | [deployment](docs/ops/deployment.md) |
| 仓库结构与代码风格 | [project-layout](docs/dev/project-layout.md) · [coding-style](docs/dev/coding-style.md) |
| 路线图 | [roadmap](docs/roadmap.md) |
| 子项目 | [backend](backend/README.md) · [fleet](backend/fleet/README.md) · [agent](backend/agent/README.md) · [probe](backend/probe/README.md) · [web](web/README.md) |
贡献与自动化代理的工作约定见 [`AGENTS.md`](AGENTS.md)。
## 许可证
[Apache License 2.0](LICENSE)