• Stefy Lanza (nextime / spora )'s avatar
    Correct wssshc architecture - wssshc acts as SSH client, not SSH server · 5a1b73b4
    Stefy Lanza (nextime / spora ) authored
    - Fixed fundamental misunderstanding of wssshc's role in the architecture
    - wssshc now acts as SSH client connecting to target SSH server (localhost:22)
    - Removed incorrect SSH server implementation that was listening for connections
    - Implemented proper SSH client connection in handle_tunnel_request()
    - Added forward_ws_to_ssh_server() for bidirectional forwarding
    - Removed handle_ssh_server_connection() and related SSH server functions
    - Fixed handle_tunnel_data() to send data directly to SSH server connection
    - Eliminated need for data buffering since wssshc connects directly to SSH server
    - Corrected tunnel flow: WebSocket → wssshc → SSH server (not SSH server → wssshc)
    - Fixed socket management for direct SSH server connection
    - Resolved 'waiting for SSH connection' issue by removing server listening code
    - Implemented proper SSH client architecture matching original design intent
    - Fixed race conditions by establishing SSH connection immediately on tunnel_request
    - Removed unnecessary complexity from SSH server mode implementation
    - Streamlined code by removing unused SSH server connection handling
    - Fixed data flow to match intended architecture: wssshc receives from tunnel, forwards to SSH server
    - Eliminated port binding conflicts by not listening on SSH port
    - Corrected bidirectional forwarding between WebSocket and SSH server connection
    5a1b73b4
tunnel.h 2.48 KB