Commit Graph

5 Commits

Author SHA1 Message Date
Warren
3986fb28fb SMB CLI: Add S3 VFS backend support (--s3 flag)
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Usage:
  smb-start --s3     --s3-endpoint https://s3.example.com     --s3-bucket mybucket     --s3-access-key AKIA...     --s3-secret-key secret...

All SMB operations now work over S3-compatible storage.

All 229 tests pass.
2026-06-20 20:49:22 +08:00
Warren
d1467f03bd SMB CLI: Add multi-user support (--user name:password)
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add --user CLI argument (repeatable) format: name:password
- Default user 'demo:demo123' if no users specified
- All users get ReadWrite access to the share
- Note: SMB3 encryption not available (smb-server v1 out of scope)

Example:
  smb-start --user alice:pass1 --user bob:pass2 --share-name myshare

All 229 tests pass.
2026-06-20 20:44:23 +08:00
Warren
7eb528d35f SMB Server Phase 2: VFS backend build fix + integration test
Some checks failed
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
- Add VfsFile: Send supertrait for Mutex compatibility
- Fix SmbServerCommand: struct → Subcommand enum with Start variant
- Fix tracing_subscriber::init() → try_init() to avoid panic when
  logger already initialized
- Fix CLI subcommand name: smb-server → smb-start (flatten naming)
- Add #[command(name = "smb-start")] for CLI disambiguation
- Fix unused variable warnings (smb_fs.rs, smb_server_backend.rs)
- Remove unused VfsFile imports (webdav.rs, scp_handler.rs)
- Integration test: Docker smbclient verified (list, upload, read)
2026-06-20 19:42:29 +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
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