Warren
a8d81f2a9c
Revert "Remove Download Center routes from server.rs (dead code cleanup)"
...
This reverts commit 20b208bb7f .
2026-06-22 14:12:14 +08:00
Warren
20b208bb7f
Remove Download Center routes from server.rs (dead code cleanup)
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Removed routes:
- /api/v2/products/* (CRUD + file assignment)
- /api/v2/download/* (file download + stats)
- /api/v2/files/:user_id (list + info via download module)
- /upload, /files, /products (HTML pages)
Kept: /api/v2/upload-unlimited, /downloads, category/series APIs
2026-06-22 11:00:41 +08:00
Warren
60e4329eed
Add VirtualFs tag-mode WebDAV + MyFiles UI + Admin WebDAV endpoint
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- VirtualFs: SQLite-backed virtual folders (tag mode), 16 unit tests
- MyFiles module: API endpoints + Web UI for folder/tag management
- Admin WebDAV: /admin-webdav/*path with Basic Auth + URI prefix rewrite
- CLI: webdav-folder/tag/untag/list/start --virtual-mode commands
- Deployed and tested on M5Max48: PROPFIND, PUT, GET, DELETE all working
2026-06-22 10:38:25 +08:00
Warren
e7a9f886ed
Fix web server bind to 0.0.0.0 for external access
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-22 06:20:17 +08:00
Warren
097521b35d
P2: Fix S3 multipart route - use query param for action
...
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
- Change route from /s3/multipart/:bucket/*key/init to /s3/multipart/:bucket/*key?action=init
- Add multipart_handler to unify all multipart operations
- Use Response type instead of impl IntoResponse for type compatibility
2026-06-22 01:22:16 +08:00
Warren
9b02bbac27
A: Code quality improvements - fix clippy warnings
...
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
02d98419e1
P3: Bucket Policy implementation complete
...
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
- BucketPolicy struct with Version + Statement array
- PolicyStatement: Effect, Principal, Action, Resource, Condition
- Principal matching (wildcard + user-specific)
- Action/Resource pattern matching with wildcards
- GetBucketPolicy: GET /s3/policy/:bucket
- PutBucketPolicy: PUT /s3/policy/:bucket
- DeleteBucketPolicy: DELETE /s3/policy/:bucket
- Policy persistence to data/s3_policies/:bucket/policy.json
- check_bucket_policy() for authorization
- 6 unit tests
Tests: 299 passed, 0 failed
2026-06-21 22:50:53 +08:00
Warren
ca0f541a79
P2: S3 Multipart Upload support complete
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- InitiateMultipartUpload: POST /s3/multipart/:bucket/:key/init
- UploadPart: PUT /s3/multipart/:bucket/:key/part
- CompleteMultipartUpload: POST /s3/multipart/:bucket/:key/complete
- AbortMultipartUpload: DELETE /s3/multipart/:bucket/:key/abort
- In-memory upload tracking with once_cell::Lazy
- Part files stored in temp dir during upload
- Final file assembled on CompleteMultipartUpload
- XML responses for all operations
Tests: 293 passed, 0 failed
2026-06-21 22:44:17 +08:00
Warren
5000ba7c14
WebDAV async + cache TTL: spawn_blocking for props persistence, 5min TTL eviction
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
P2 improvements:
- patch_props: use tokio::spawn_blocking for blocking VFS writes
- WEBDAV_HANDLER_CACHE: add CachedHandler with Instant timestamp
- TTL check on each request (300s = 5 minutes), recreate if expired
- create_handler_for_user() helper function
Tests: 288 passed, 0 failed
2026-06-21 16:14:42 +08:00
Warren
9acd174388
WebDAV improvements: flush fix, RwLock recovery, expired lock cleanup, atomic set_times
...
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
P0 fixes:
- flush(): add flushed flag, proper error logging, Drop warning for data loss
- props_data RwLock: replace unwrap() with try_read/try_write recovery
- PersistedLs: add is_expired() + cleanup_expired_locks() helper
P1 improvements:
- Props persistence via VFS (load_props/save_props/patch_props)
- COPY/MOVE sync dead props (copy on COPY, move key on rename)
- Atomic set_atime/set_mtime via filetime crate (no race condition)
New files:
- webdav_locks.rs: PersistedLs with lock persistence + expiry cleanup
Tests: 288 passed, 0 failed
2026-06-21 16:07:12 +08:00
Warren
62927825d5
feat(web): Add WebDAV endpoint to web server (Port 11438)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 01:14:55 +08:00
Warren
a235be312f
Fix duplicate route panic: Remove conflicting '/' route
2026-06-19 09:20:20 +08:00
Warren
00824df4ae
Update AGENTS.md: WebDAV VFS complete, protect Download Center
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Document WebDAV VFS integration status
- Add warning about not affecting Port 11438
- Revert WebDAV routes (temporarily) to protect Download Center
- WebDAV can be tested via CLI: webdav-start --port 8002
2026-06-19 09:12:37 +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
ea156b65f1
Implement Web frontend Phase 2: Tab switching + search box UI
...
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
- New category_view.html with Apple-style design
- Tab switching between Category and Series views
- Search box with API integration
- Navigation stack for back button
- Routes: /downloads and / (root)
- All tests pass (135 passed)
2026-06-19 01:25:44 +08:00
Warren
f90e4f496c
VFS/DataProvider/Config refactoring + SSH public key authentication
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Phase 1-6 of refactoring plan:
- VFS abstraction (VfsBackend trait + LocalFs + OpenFlags builder)
- DataProvider trait (SqliteProvider + PgProvider, SFTPGo-compatible)
- Config refactoring (AppConfig unified sections, env overrides)
- SSH handlers (sftp/scp/rsync) migrated to VFS + DataProvider
- SSH public key authentication (Ed25519 signature verification)
- SSH stderr → CHANNEL_EXTENDED_DATA support
- Web auth uses DataProvider instead of direct SQL
- User home directory from provider (per-user isolation)
- PostgreSQL auth provider for SFTPGo compatibility
2026-06-18 23:35:18 +08:00
Warren
1300a4e223
MarkBase架构升级:Multi-Volume Virtual Tree + Dual-View Management + Git Remote修正
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
核心功能:
- ✅ Categories/Series双视图管理(category_view.rs + import_markdown.rs)
- ✅ FUSE Multi-Volume支持(tree_type参数)
- ✅ SSH/SFTP/SCP/rsync协议完整实现(4042行)
- ✅ NFS/SMB Module Phase 1-3完成
- ✅ Archive Module Phase 1-4完成(2916行)
- ✅ Download Center API完整实现
- ✅ S3兼容API实现(560行)
Git配置修正:
- ✅ 删除错误origin(gitea.momentry.ddns.net)
- ✅ 删除m5max128(指向机器名)
- ✅ 设置origin = m5max128gitea.momentry.ddns.net/admin/markbase
- ✅ 设置m4minigitea = m4minigitea.momentry.ddns.net/warren/markbase
数据清理:
- ✅ 删除38个临时SQLite(保留accusys.sqlite、demo.sqlite)
- ✅ 删除.bak、test_*.bin、调试脚本等临时文件
- ✅ 删除临时目录(build/、download files/、raid_test/等)
- ✅ 更新.gitignore排除临时文件
架构优化:
- 52个文件修改,2434行新增,4739行删除
- Workspace成员整合(16个crate)
- 数据库状态:accusys.sqlite保留(主demo测试)
远程同步:
- ✅ 准备推送到m5max128gitea(远程Gitea)
- ✅ 准备推送到m4minigitea(本地Gitea)
2026-06-12 12:59:54 +08:00
Warren
9b2d75935e
NFS Module完成
2026-06-10 22:47:34 +08:00
Warren
06f18d9ca1
修复数据库字段名称问题(进行中)
...
问题:
- file_registry表没有sha256字段
- file_locations表使用added_at而非created_at
修复:
- 将sha256插入到file_nodes表而非file_registry
- 将created_at改为added_at(多处)
状态:编译中(还有变量名问题待修复)
已验证功能:
- ZIP自动解压成功 ✅
- FormatDetector检测成功 ✅
- 提取文件完整性 ✅
- 文件解压到extracted目录 ✅
2026-06-10 21:42:15 +08:00
Warren
954d6ca98f
修复Upload Service db_path重复问题
...
问题:
- FileTree::open_user_db(user_id)期望user_id参数
- 但server.rs中先调用user_db_path(user_id),再传递db_path给open_user_db
- 导致路径重复:data/users/data/users/test_user.sqlite.sqlite
修复:
- extract_and_register_archive:直接传递user_id给init_user_db
- upload_file原始注册逻辑:直接传递user_id给init_user_db
- 使用init_user_db确保数据库表创建(file_registry)
测试验证:
- ZIP文件上传成功 ✅
- 自动解压成功(test_archive_extracted目录) ✅
- 提取文件正确(file1.txt, file2.txt, subdir/file3.txt) ✅
- 数据库初始化成功 ✅
2026-06-10 21:22:04 +08:00
Warren
ff8bc16565
Archive Module Phase 1-4完成(2916行代码,Upload Service集成)
...
Phase 1-3(2916行):
- Phase 1: 核心框架(900行)- ProcessorRegistry, FormatDetector, ArchiveConfig
- Phase 2: 核心处理器(1332行)- ZIP, TAR, GZIP, TAR.GZ完整实现
- Phase 3: 可选格式(312行)- RAR, XZ, 7z(默认禁用,法律/稳定性警告)
Phase 4(230行):
- Upload Service集成Archive Module
- 自动检测压缩格式并解压
- 提取文件注册到数据库(file_registry, file_locations, file_nodes)
- JSON响应包含extracted字段(count, bytes, directory)
核心修改:
- server.rs: extract_and_register_archive函数(150行)
- server.rs: upload_file自动解压逻辑(80行)
- Cargo.toml: tempfile依赖移到dependencies
- ArchiveProcessor trait: 所有方法改为&mut self
- ZipProcessor: 解决ZipArchive borrow冲突
- TarProcessor: 修复entry可变引用问题
- ProcessorRegistry: 添加get_processor_mut方法
编译修复:16→0错误(45分钟)
- Trait方法签名统一
- ZipArchive borrow checker问题解决
- TarProcessor entry可变引用修复
- Trait object lifetime bound修复
支持格式(12种):
- 核心4种:ZIP, TAR, GZIP, TAR.GZ(已实现)
- 可选3种:RAR, XZ, 7z(已实现,默认禁用)
- 扩展5种:ZSTD, BZIP2, LZ4, TAR.BZ2, TAR.ZST(stub)
2026-06-10 21:07:03 +08:00
Warren
b362e9b3f1
Test Gitea Runner functionality
2026-05-30 14:08:55 +08:00