Skip to content
Commit 14eef6e4 authored by Stefy Lanza (nextime / spora )'s avatar Stefy Lanza (nextime / spora )
Browse files

Implement correct SSH tunneling architecture for wssshc

- Fixed wssshc to act as SSH server that forwards to target SSH server
- Added handle_ssh_server_connection() to accept SSH client connections
- Added forward_ssh_client_to_target() for bidirectional SSH forwarding
- wssshc now listens on available port and accepts SSH client connections
- wssshc connects to target SSH server (localhost:22) when tunnel is established
- Implemented proper SSH protocol bridging between SSH client and target server
- Fixed socket lifecycle management for SSH server mode
- Resolved 'Bad file descriptor' issues by correcting connection architecture
- SSH client now gets proper SSH server responses instead of immediate disconnection
- Added proper error handling for SSH connection establishment and forwarding
- Implemented correct tunnel flow: SSH client → wssshc → target SSH server
- Fixed WebSocket integration with SSH protocol forwarding
- Added comprehensive debug logging for SSH connection lifecycle
- Resolved premature socket invalidation by maintaining proper connection state
parent 0ecabb18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment