Commit Graph

10 Commits

Author SHA1 Message Date
Warren
cf57d46ca5 Fix WebDAV: handle_dav extract WebdavCredentials Extension
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-22 07:22:01 +08:00
Warren
8a5a23a309 Fix WebDAV Extension layer order
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-22 07:20:34 +08:00
Warren
a7f50ff747 Update WebDAV: root path + 0.0.0.0 bind
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-22 07:17:45 +08:00
Warren
9b02bbac27 A: Code quality improvements - fix clippy warnings
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Remove unused imports in server.rs (Body, HeaderValue, RwLock)
- Remove unused imports in forward_acl.rs (tests still need Ipv4Addr)
- Remove unused imports in host_key.rs (Read, Write)
- Remove unused imports in kex_exchange.rs (HostKeyType)
- Remove unused imports in known_hosts.rs (tests need Ipv4Addr)
- Remove unused imports in multiplex.rs (Arc)
- Auto-fix other unused imports via clippy --fix

Tests: 303 passed, 0 failed (4 new tests added)
2026-06-21 23:08:07 +08:00
Warren
f5074b2ce2 P0: AWS Signature V4 implementation complete
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Full Canonical Request with signed headers
- Proper URI encoding (encode_slash option)
- X-Amz-Date timestamp support
- SignedHeaders extraction from Authorization header
- Payload hash from X-Amz-Content-Sha256
- 4 unit tests passing

Tests: 297 passed (293 + 4 new)
2026-06-21 22:14:34 +08:00
Warren
dbca6e6d35 Fix clippy warnings: unused imports, minor style fixes
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 21:08:50 +08:00
Warren
eb80c07c85 Implement WebDAV VFS integration: dav-server 0.11 compatible
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add webdav.rs module: VfsDavFs, VfsDavFile, VfsDavMetaData
- Implement DavFileSystem + Clone for GuardedFileSystem blanket impl
- Add clone_boxed to VfsBackend trait (required for Sync)
- Update CLI webdav.rs to use VFS instead of SQLite
- Add bytes dependency
- All 155 tests pass
2026-06-19 08:19:16 +08:00
Warren
d94cb2df4c Fix code quality: trailing whitespace, unused imports, clippy warnings
- Fix trailing whitespace in kex.rs and s3.rs
- Add missing KexProposal import in kex_complete.rs
- Auto-fix clippy warnings across all crates
- All 153 tests pass
2026-06-19 05:21:38 +08:00
Warren
a9098a3c48 fix(cli): resolve all command name duplication issues
Some checks failed
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
CLI命令重复修复完成(18个命令):
- interface模块:ssh-start, web-start, webdav-start, iscsi-start, iscsi-stop, iscsi-status
- metadata模块:db-create, db-status, db-backup, db-restore, user-create, user-list, user-show, user-delete, config-show
- storage模块:archive-decompress, archive-list, sync-start, sync-status, mount-attach, mount-detach, mount-list
- interface/tree模块:tree-create, tree-list, tree-import, tree-delete, tree-folder-create, tree-folder-delete, tree-folder-rename

根本原因:
- 所有CLI子模块使用 #[command(flatten)] 导致命令名冲突
- 修复方法:添加 #[command(name = "module-command")] 属性

测试结果:
-  编译成功(150 warnings, 0 errors)
-  CLI命令列表正确(所有命令在顶层命名空间)
-  SSH服务器启动成功(port 2024)
-  SSH版本交换测试通过(SSH-2.0-MarkBaseSSH_1.0)

影响范围:
- 13个CLI文件修改
- 18个命令添加唯一命名属性
- CLI结构从 interface/metadata/storage/tools 四层变为扁平化单层
2026-06-13 17:56:56 +08:00
Warren
cdc2e4b9d6 CLI三层架构重构完成:interface/metadata/storage/tools层
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
架构设计:
- 上层(interface):虚拟操作系统层
  - web.rs: HTTP Server
  - ssh.rs: SSH/SFTP Server
  - webdav.rs: WebDAV Server
  - iscsi.rs: iSCSI Server
  - tree.rs: File Tree管理(categories/series)

- 中层(metadata):核心数据库层
  - config.rs: 配置管理(从framework.rs迁移)
  - user.rs: 用户管理
  - db.rs: 数据库管理
  - auth.rs: 认证授权

- 底层(storage):文件存取层
  - scan.rs: 文件扫描导入(从framework.rs迁移)
  - hash.rs: 哈希计算(从framework.rs迁移)
  - archive.rs: 压缩解压缩
  - sync.rs: 文件同步
  - mount.rs: 存储挂载

- 辅助工具(tools):辅助功能
  - render.rs: Markdown渲染(从framework.rs迁移)
  - test.rs: 测试命令(从framework.rs迁移)

架构优势:
 清晰的三层分离,符合架构理念
 21个独立模块,职责清晰
 main.rs简化至23行,cli/mod.rs24行
 删除旧架构(cli/apps和framework.rs)
 编译成功,所有CLI命令可用

命令範例:
markbase interface web start --port 11438
markbase interface ssh start --port 2024
markbase interface tree import --user accusys --tree-type categories
markbase metadata config show
markbase storage scan directory --user accusys --dir data/downloads
markbase tools render file --file README.md

文件统计:
- 新增文件:20个Rust模块
- 删除文件:3个旧架构文件
- 修改文件:2个核心入口
- 总计:21个文件变更
2026-06-13 01:36:15 +08:00