feat(proxy): HTTP/SOCKS5 代理支持,按会话独立配置 | 15 files +483/-23 | 96/96 tests passing

功能:
- 代理类型定义 (ProxyType, ProxyConfig)
- 代理工具函数 (验证、解析、构建URL) + 24 测试
- SSH 连接通过 HTTP CONNECT / SOCKS5 隧道
- 数据库 proxy 列持久化 (JSON)
- SessionDialog 代理配置 UI (可折叠面板)
- 连接池传递 proxy 到 IPC
- sessionStore 类型添加 proxy 支持
This commit is contained in:
OpsXShell Dev committed 2026-04-25 05:14:27 +08:00
1 parent 3f636b1b0e
commit 07c4a5b14f
15 files changed
+757 -23

No files matched your search

+15 -13
View File
@@ -6,22 +6,23 @@
## 当前状态
|| 指标 | 当前值 | 目标值 |
|------|--------|--------|
| 测试文件数 | 5 | 15+ |
| 测试用例数 | 72 | 150+ |
| 估算覆盖率 | ~15% | ≥50% |
| 核心模块覆盖 | 60% | ≥80% |
||| 指标 | 当前值 | 目标值 ||
||------|--------|--------|--
|| 测试文件数 | 6 | 15+ ||
|| 测试用例数 | 96 | 150+ ||
|| 估算覆盖率 | ~25% | ≥50% ||
|| 核心模块覆盖 | 60% | ≥80% ||
### 已有测试
|| 测试文件 | 用例数 | 覆盖模块 | 质量 |
|----------|--------|----------|------|
| `test/stores/tabStore.test.ts` | 14 | tabStore | ✅ 完整 |
| `test/stores/connectionPool.test.ts` | 8 | poolStore | 🟡 仅接口验证 |
| `test/components/sftp/utils.test.ts` | 16 | sftp/utils | ✅ 完整 |
| `test/services/crypto.test.ts` | 11 | crypto | ✅ 完整 |
| `test/stores/keybindingStore.test.ts` | 23 | keybindingStore | ✅ 完整 |
||| 测试文件 | 用例数 | 覆盖模块 | 质量 ||
||----------|--------|----------|------|
|| `test/stores/tabStore.test.ts` | 14 | tabStore | ✅ 完整 ||
|| `test/stores/connectionPool.test.ts` | 8 | poolStore | 🟡 仅接口验证 ||
|| `test/components/sftp/utils.test.ts` | 16 | sftp/utils | ✅ 完整 ||
|| `test/services/crypto.test.ts` | 11 | crypto | ✅ 完整 ||
|| `test/stores/keybindingStore.test.ts` | 23 | keybindingStore | ✅ 完整 ||
|| `test/utils/proxy.test.ts` | 24 | proxy utils | ✅ 完整 ||
---
@@ -400,6 +401,7 @@ npm test -- --watch # 监听模式
| v1.2.0 | ~15% | 0% | 40 | — |
| v1.3.0 | ~20% | 60% | 49 | 2026-04-24 |
| v1.4.0-batch1 | ~25% | 60% | 72 | 2026-04-24 |
| v1.4.0-proxy | ~25% | 65% | 96 | 2026-04-25 |
| v1.3.0-batch2 | ~35% | 60% | 104 | — |
| v1.3.0-batch3 | ~45% | 70% | 143 | — |
| v1.3.0-final | **≥50%** | **≥80%** | **150+** | — |