• Stefy Lanza (nextime / spora )'s avatar
    Fix critical architectural issue in wssshc tunnel handling · 0ecabb18
    Stefy Lanza (nextime / spora ) authored
    - Fixed wssshc to act as SSH client instead of SSH server
    - wssshc now connects to target SSH server (localhost:22) when receiving tunnel_request
    - Removed incorrect SSH server listening code that was binding to port 22
    - Implemented proper SSH client connection forwarding
    - Fixed 'Address already in use' error by removing port 22 binding conflict
    - Corrected tunnel architecture: wssshc → SSH server, not SSH server → wssshc
    - Updated handle_tunnel_request to establish SSH client connection to target
    - Removed accept_ssh_connection function (not needed for client mode)
    - Fixed bidirectional forwarding between WebSocket and SSH client connection
    - Resolved socket lifecycle issues by using correct connection direction
    - Eliminated port binding conflicts with system SSH server
    - Implemented proper SSH protocol flow for client-side tunneling
    0ecabb18
wsssh.c 26.1 KB