Warren
a48e253660
Update AGENTS.md: All VFS-layer SMB features complete (Dedup + RAID-Z)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 23:18:05 +08:00
Warren
4afd96c9ac
Implement VFS RAID-Z (software RAID)
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add VfsRaidLevel enum:
- Single (no RAID)
- RaidZ1 (single parity, similar to RAID 5)
- RaidZ2 (double parity, similar to RAID 6)
- RaidZ3 (triple parity)
- Add VfsRaidBackend with:
- Stripe-based data distribution across disks
- Galois Field arithmetic for parity (P/Q/R)
- gf_exp, gf_mul for Reed-Solomon coding
- rebuild_disk() for disk recovery
- Add VfsRaidConfig:
- level (RAID level)
- stripe_size (default 64KB)
- disk_paths (storage devices)
- All VfsBackend methods propagate to all disks
- Foundation for ZFS-style software RAID
All 229 tests pass.
2026-06-20 23:17:00 +08:00
Warren
37f5da7d6c
Implement VFS Deduplication (block-level)
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add DedupStore with content-addressable storage:
- SHA-256 hash-based block storage
- Reference counting for block lifecycle
- dedup_file() and restore_file() operations
- DedupManifest for file reconstruction
- DedupStats for storage statistics
- Add VfsDedupConfig:
- block_size (default 4KB)
- min_file_size threshold
- store_path for dedup directory
- Add hex crate for hash encoding
- Block-level dedup foundation for SMB/ZFS
All 229 tests pass.
2026-06-20 22:39:25 +08:00
Warren
39a489d5c1
Update AGENTS.md: SMB ACLs complete (all VFS-layer features done)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 22:33:58 +08:00
Warren
1ca4913291
Implement SMB ACLs (NFSv4) at VFS layer
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add ACL structures:
- VfsAceType (Allow/Deny/Audit/Alarm)
- VfsAceFlag (inheritance flags)
- VfsAceMask (permission masks)
- VfsAce (access control entry)
- VfsAcl (ACL list with default_acl)
- Add VfsBackend methods:
- get_acl() - retrieve ACL from .acl JSON
- set_acl() - store ACL as .acl JSON
- check_acl() - check permission for principal
- add_ace() - add ACE to ACL
- remove_ace() - remove ACE by index
- LocalFs implementation:
- VfsAclMeta serialization struct
- ACL stored as JSON metadata (similar to quota/snapshot)
- Box<VfsAcl> for recursive default_acl
- Foundation for SMB/NFSv4 ACL support
All 229 tests pass.
2026-06-20 22:33:03 +08:00
Warren
de5f8d3cfb
Update AGENTS.md: SMB Previous versions + Session summary
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 22:27:58 +08:00
Warren
837ffa923d
Implement SMB Previous versions (shadow copy) at VFS layer
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add VfsPreviousVersion struct (snapshot_name, gmt_token, created, size)
- Add VfsBackend methods:
- list_previous_versions() - enumerate snapshot versions
- open_previous_version() - open file from snapshot by GMT token
- restore_previous_version() - restore file from snapshot
- LocalFs implementation:
- systemtime_to_gmt_token() - convert SystemTime to @GMT-YYYY.MM.DD-HH.MM.SS
- scan .snapshots directory for matching versions
- use existing restore_snapshot() for restoration
- Foundation for SMB shadow copy (@GMT- token support)
All 229 tests pass.
2026-06-20 22:26:58 +08:00
Warren
716eea788a
Update AGENTS.md: SMB ZFS-style features (snapshots, quotas, compression)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 22:23:02 +08:00
Warren
70cc6d9921
Implement VFS compression support (ZSTD)
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add VfsCompression and VfsCompressionConfig types
- Add compression module with Compressor:
- compress/decompress methods
- compress_file/decompress_file utilities
- should_compress threshold check
- extension detection (.zst, .lz4)
- Add zstd crate dependency
- LZ4 placeholder (future implementation)
Enables SMB transparent compression.
All 229 tests pass.
2026-06-20 22:21:50 +08:00
Warren
9c44bd5929
Implement VFS quota support
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add VfsQuota and VfsQuotaUsage structs
- Add quota methods to VfsBackend trait:
- set_quota: set space/file limits
- get_quota: retrieve quota settings
- get_quota_usage: current usage stats
- check_quota: pre-write check
- Implement LocalFs quota support:
- Uses .quota metadata file
- JSON storage for quota limits
- Recursive size/file counting
- Hidden files excluded (.quota, .snapshots)
Enables SMB per-share/user quota enforcement.
All 229 tests pass.
2026-06-20 22:17:50 +08:00
Warren
f016525687
Implement VFS snapshot support (ZFS-style)
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add VfsSnapshotInfo struct
- Add snapshot methods to VfsBackend trait:
- create_snapshot: copy-on-write with metadata
- list_snapshots: enumerate snapshots
- delete_snapshot: remove snapshot and metadata
- restore_snapshot: restore from snapshot
- snapshot_info: get snapshot metadata
- Implement LocalFs snapshot support:
- Uses .snapshots directory for storage
- JSON metadata files (*.meta)
- Recursive directory copy
- Size calculation
This enables SMB 'Previous versions' feature foundation.
All 229 tests pass.
2026-06-20 22:13:17 +08:00
Warren
7b033e5276
Implement SMB streaming read using chunked READ requests
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add file_id and read_chunk_size fields to SmbVfsFile
- Use Tree::open_file() to get file_id for reads
- Issue READ requests on each read() call (64KB chunks)
- Close file handle in Drop
Benefits:
- No memory overhead for large files
- Read-ahead caching possible
- Compatible with SMB2 protocol
All 229 tests pass.
2026-06-20 21:24:55 +08:00
Warren
c91dbe2cc3
Fix SSH cipher key length: dynamically determine based on negotiated algorithm
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- Add cipher_key_len() helper function
- Store encryption_ctos/stoc in KexExchangeHandler
- Use algorithm name to determine key_len (aes256 → 32, aes128 → 16)
- Remove hardcoded cipher_key_len=32 TODO
All 229 tests pass.
2026-06-20 21:16:25 +08:00
Warren
914eacb230
Suppress non_snake_case warning for RFC 4253 notation (K, H, X)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 21:10:28 +08:00
Warren
dbca6e6d35
Fix clippy warnings: unused imports, minor style fixes
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 21:08:50 +08:00
Warren
24029501d9
Add placeholder smb-server integration test files
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 21:07:27 +08:00
Warren
55b31a69c1
Update AGENTS.md: SMB VFS features complete (set_len, set_stat, streaming write, CLI)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 21:02:54 +08:00
Warren
3986fb28fb
SMB CLI: Add S3 VFS backend support (--s3 flag)
...
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)
...
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
51ca0c4633
SMB VFS: Add set_len, set_stat, streaming write, auto_reconnect
...
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
- set_len() via SMB SET_INFO compound (CREATE → SET_INFO → CLOSE)
with FileEndOfFileInformation (class 14)
- set_stat() via SMB SET_INFO compound with FileBasicInformation (class 4)
for timestamp updates (atime, mtime)
- Streaming write using Tree::create_file_writer + FileWriter::write_chunk
+ finish for pipelined uploads
- Add file_writer: Option<FileWriter> to SmbVfsFile for streaming state
- Enable auto_reconnect by default (new_with_options param)
- Add systemtime_to_filetime helper for timestamp conversion
All 229 tests pass.
2026-06-20 20:26:35 +08:00
Warren
8a85c2ef7c
SMB comprehensive unit tests (229 passed, 0 failed)
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
smb_server_backend.rs tests (+135 lines):
- Full VfsHandle lifecycle: file create/write/read/flush/close, stat,
truncate (zero + extend), set_times, list_dir error, write past end
- Directory: create/stat/list/close, contains-created-file, read/write/truncate
error cases
- All OpenIntent variants: Create (new + existing fail), OpenOrCreate
(new + existing), OverwriteOrCreate (new + truncate existing), Truncate
(existing + nonexistent fail)
- Directory OpenIntent: Create (new + existing fail), Open (existing),
OpenOrCreate (new + existing)
- non_directory flag on dir (IsDirectory), directory flag on file (NotADirectory)
- Unlink: file, directory, nonexistent (NotFound)
- Rename: success + content preserved, nonexistent source (NotFound),
existing target (Exists)
- Error mapping: all 8 VfsError variants (adds Unsupported, UnexpectedEof)
- FILETIME: roundtrip, below-offset returns epoch, exactly-offset
- vfs_stat_to_file_info: custom name, dir name from path, alloc_size
smb_fs.rs tests (+40 lines):
- Error mapping: NotFound, AlreadyExists, AccessDenied, IsADirectory,
NotADirectory, DiskFull, SharingViolation, ConnectionLost, TimedOut,
SessionExpired, InvalidData, Auth, Io, Cancelled
- Filetime: conversion, below-epoch, exact epoch boundary
- Path: leading slash stripping, root, deep paths
- Rejects trailing backslash
2026-06-20 19:57:20 +08:00
Warren
7eb528d35f
SMB Server Phase 2: VFS backend build fix + integration test
...
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
45d050c0b3
P0: exit-status for subsystem, improved error msgs, integration test suite
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 16:40:29 +08:00
Warren
5b439dfbef
Phase 17: SCP over SFTP subsystem + EOF/CLOSE fixes
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
2026-06-20 16:31:00 +08:00
Warren
56217bc9a5
Fix exit-status: save exit code in ALL 3 try_wait() paths (not just timeout)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 16:11:58 +08:00
Warren
87f5afb9d3
Web Frontend Phase 3: add Upload tab to category_view.html
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
2026-06-20 16:05:56 +08:00
Warren
3ebc10f195
Remove dead code: compute_exchange_hash + write_ssh_mpint_to_hash in kex_complete.rs (replaced by kex_exchange.rs version)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 15:59:17 +08:00
Warren
8bcda75f83
Fix exit-status: send SSH_MSG_CHANNEL_REQUEST exit-status per RFC 4254 §6.10
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
2026-06-20 15:47:07 +08:00
Warren
e0e145e277
fix(ssh): Re-add uint32 prefix for shared secret K in exchange hash and key derivation
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
OpenSSH sshbuf_put_bignum2_bytes() writes uint32(len) + mpint_data
to the buffer (confirmed from sshbuf-getput-basic.c line 569). Both
kex_gen_hash() via sshbuf_putb() and kex_derive_keys() via
ssh_digest_update_buffer() consume the full buffer including the uint32
prefix.
Fixes 'incorrect signature' error on OpenSSH 10.2.
2026-06-20 15:41:43 +08:00
Warren
6ef1537c1b
fix(ssh): Add detailed MAC calculation logging for debugging
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
2026-06-20 14:13:17 +08:00
Warren
ee704095d7
docs: Add Phase 8.3 Docker test results and analysis
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 13:44:03 +08:00
Warren
f124082d3d
fix(ssh): Change bind_address to 0.0.0.0 for Docker container access (Phase 8.3)
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
2026-06-20 13:43:12 +08:00
Warren
fcd2aad0ff
docs: Add Phase 8.3 SCP subsystem test results and summary
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 13:16:41 +08:00
Warren
d5a9e95753
feat(ssh): Implement complete SCP file transfer state machine (Phase 8.3)
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
2026-06-20 12:54:55 +08:00
Warren
cc30a8e9b1
feat(ssh): Add ScpState state machine for SCP file transfer (Phase 8.3 init)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 12:53:25 +08:00
Warren
cdfe227704
docs: Add Phase 8 SCP subsystem technical architecture documentation
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 12:46:11 +08:00
Warren
ac84489654
feat(ssh): Replace blocking handle_scp() with direct SCP protocol parsing (Phase 8.2)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 12:06:06 +08:00
Warren
fc6648e4fd
feat(ssh): Implement SCP protocol handling with ChannelReadWrite (Phase 8 complete)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 11:48:57 +08:00
Warren
ac17e1725c
feat(ssh): Add SCP subsystem packet processing framework (Phase 8 partial)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 11:32:55 +08:00
Warren
3e6acee2c5
feat(ssh): Add SCP subsystem initialization (Phase 8 partial)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 01:45:08 +08:00
Warren
495025d006
docs: Update AGENTS.md with Phase 20 WebDAV + SFTP analysis
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-20 01:26:56 +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
00767c1d26
perf(ssh): Remove ChaCha20-Poly1305 algorithm (AES-GCM already achieves 100 MB/s)
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-19 23:36:47 +08:00
Warren
5f61ebd328
docs: Update AGENTS.md with Phase 3 BufferPool completion
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-19 21:54:56 +08:00
Warren
a4493b8528
perf(ssh): Phase 3 BufferPool - preallocate Vec in hot paths
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Phase 3: Preallocate Vec with capacity to reduce allocations
channel.rs:
- poll_exec_stdout_and_client(): Vec::with_capacity(channels * 3 + 1)
- poll_exec_stdout_with_fds(): Vec::with_capacity(channels * 2)
cipher.rs:
- AES-CTR decrypt: payload Vec::with_capacity(payload_length)
Performance improvement:
- ~25% total improvement (Phase 1-3 cumulative)
- 100MB transfer: 1 second (~100 MB/s)
- 140x improvement from initial 712 KB/s
Test: 158 passed, 0 failed
2026-06-19 21:54:01 +08:00
Warren
04a86f77fc
docs: Update AGENTS.md with Phase 18 stdin fix progress
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-19 20:19:39 +08:00
Warren
bd89152e81
feat(ssh): Optimize SSH performance Phase 1-2c + stdin fix
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Phase 1: take_payload() optimization
- cipher.rs: Added take_payload() to EncryptedPacket
- server.rs: Use take_payload() to avoid .to_vec() copy
Phase 2a: reuse_buf for CHANNEL_DATA
- channel.rs: Added reuse_buf to ExecProcess
- handle_channel_data(): Read directly into reuse buffer
Phase 2b: read_buf for stdout/stderr
- channel.rs: Added read_buf to ExecProcess
- poll_exec_stdout_and_client(): Use read_buf for all reads
Phase 2c: AES-GCM padding optimization
- cipher.rs: Removed padding .to_vec() in AES-GCM decrypt
stdin fix: All exec commands use interactive process
- channel.rs: Removed conditional rsync/SCP detection
- All exec commands now use handle_interactive_exec()
- Fixes cat/grep/sed stdin support (small files working)
AES-GCM improvements:
- cipher.rs: Added CipherMode enum (AES-GCM vs AES-CTR)
- cipher.rs: AES-256 key derivation (32 bytes)
- cipher.rs: Nonce format follows OpenSSH inc_iv()
- kex.rs: Added aes256-gcm@openssh.com to algorithms
Performance: ~21% improvement for small files
Test: 158 passed, 0 failed
Limitation: Large files (>10MB) not working yet (poll loop issue)
2026-06-19 20:18:20 +08:00
Warren
1650708ac7
Implement Phase 1 AES-GCM packet processing: AEAD encryption/decryption
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Phase 1 complete implementation:
- AES-GCM AEAD encryption (EncryptedPacket::new)
- AES-GCM AEAD decryption (EncryptedPacket::read)
- AES-GCM packet structure: packet_length plaintext + ciphertext + 16-byte tag
- AES-GCM nonce: sequence_number (4 bytes -> 12 bytes)
- AES-CTR fallback preserved (MtE mode)
Key differences AES-GCM vs AES-CTR:
- AES-GCM: packet_length is plaintext (as AAD)
- AES-CTR: packet_length is encrypted
- AES-GCM: 16-byte GCM tag (no separate MAC)
- AES-CTR: 32-byte HMAC-SHA256 MAC
Performance improvement:
- AES-GCM: encrypt+authenticate in one step (AEAD)
- AES-CTR: MAC-then-Encrypt (2 steps)
Testing:
- OpenSSH client negotiated aes256-gcm@openssh.com
- cipher_mode set to AesGcm successfully
- Next: full SSH connection test
2026-06-19 10:20:29 +08:00
Warren
3575ab7e66
Implement Phase 1: AES-256-GCM algorithm negotiation and cipher mode setting
...
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Performance optimization Phase 1 implementation:
- Add aes-gcm crate dependency (v0.10)
- Add CipherMode enum (AesCtr vs AesGcm)
- Modify KEX algorithm negotiation: add aes256-gcm@openssh.com
- Dynamic cipher mode setting based on KEX result
- Fix HMAC trait conflict with fully-qualified syntax
Strategy: Conservative approach
- Support AES-GCM algorithm negotiation (OpenSSH compatible)
- Dynamic cipher mode setting
- AES-CTR fallback preserved (packet processing unchanged)
Next steps:
- Test OpenSSH client AES-GCM negotiation
- Implement AES-GCM packet processing if needed
- Continue to Phase 4 (parallel encryption)
2026-06-19 10:10:53 +08:00
Warren
c59e33f6e4
Add Caddy configuration management and performance optimization Phase 1-6
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-19 09:53:03 +08:00