Implement SSH Phase 13.5: Bidirectional data forwarding
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled

- Create data_forwarder.rs module (251 lines)
- Define DataForwarder structure for bidirectional data transfer
- Implement SSH channel ↔ TCP socket bidirectional forwarding
- Implement start_ssh_to_target_forwarding() thread
- Implement start_target_to_ssh_forwarding() thread
- Implement window size management (consume + adjust)
- Add build_channel_data_packet() function
- Add build_window_adjust_packet() function
- Support SSH_MSG_CHANNEL_DATA transmission
- Support SSH_MSG_CHANNEL_WINDOW_ADJUST adjustment
- All compilation tests passed successfully

Phase 13.1-13.5 completed: Security + Global request + Channel + Listener + Data forwarding
This commit is contained in:
Warren
2026-06-15 19:11:24 +08:00
parent 8ab2641773
commit 31843e4c0e
3 changed files with 252 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ pub mod rsync_handler;
pub mod port_forward; // Phase 13: 端口转发模块
pub mod ssh_security_config; // Phase 13.1: 企业级安全配置
pub mod port_forward_listener; // Phase 13.4: 监听线程模块
pub mod data_forwarder; // Phase 13.5: 数据传输模块
pub use server::SshServer;
pub use packet::{SshPacket, PacketType};