mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
a43653f252
* feat: restrict user permissions and multi-node IP constraints - Non-admin users cannot set speedId or inPort on forward create/update - Multi-entrance tunnels disable custom listen IP for forwards - Multi-exit tunnels disable custom connect IP - Multi-node hop chains disable custom connect IP per hop - Remove tunnel-first-IP fallback in forward ingress resolution - Add contract tests for non-admin permission restrictions Entire-Checkpoint: 133693290660 * fix: allow non-admin users to submit null speedId and zero inPort - Backend: Check speedId is not nil before rejecting non-admin requests - Backend: Only reject inPort if value > 0 for non-admin users - Frontend: Only include speedId and inPort in payload for admin users - Tests: Add contract tests for null speedId and zero inPort cases
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
计划文档已设计完成。以下是计划摘要:
|
|
|
|
## 计划摘要
|
|
|
|
### 格式对比
|
|
| 特性 | flvx格式 | ny格式 |
|
|
|------|----------|--------|
|
|
| 格式 | 管道分隔文本 | 紧凑JSON对象 |
|
|
| 示例 | `ip:port\|name\|port` | `{"dest":["ip:port"],"listen_port":port,"name":"name"}` |
|
|
| 多目标 | 逗号分隔 | dest数组 |
|
|
| 选择器 | 选择隧道 | 选择入口节点→匹配隧道 |
|
|
|
|
### 核心设计
|
|
1. **格式选择器**:手动选择"flvx格式"或"ny格式"
|
|
2. **ny格式流程**:选择入口节点 → 匹配端口转发隧道 → 匹配0个报错、1个直接用、多个弹窗选
|
|
3. **不自动创建隧道**:无匹配时提示用户先创建
|
|
|
|
### 任务清单
|
|
1. 新增`importFormat`、`selectedEntryNode`、`matchedTunnels`等状态
|
|
2. 重构导入模态框UI,添加格式选择器
|
|
3. 实现ny格式紧凑JSON解析函数
|
|
4. 实现入口节点选择与隧道匹配逻辑
|
|
5. 多隧道匹配时的选择器弹窗
|
|
6. 整合ny格式到`executeImport`函数
|
|
7. 更新提示文案
|
|
|
|
### 改动范围
|
|
- `vite-frontend/src/pages/forward.tsx` - 主要改动文件
|
|
|
|
是否需要我调整计划内容? |