1. 18 Sep, 2025 6 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Add system-wide config support for wsssht with proper precedence · e4f83534
      Stefy Lanza (nextime / spora ) authored
      - Update read_config_value_from_file() to support config precedence:
        1. ~/.config/wsssh/wssht.conf (user config)
        2. /etc/wsssht.conf (system config)
      - Update man page to document config file precedence order
      - Command line options still have highest priority
      e4f83534
    • Stefy Lanza (nextime / spora )'s avatar
      Refactor wsssht: remove user@domain parsing, add --clientid and --wssshd-port options · 28dccf5b
      Stefy Lanza (nextime / spora ) authored
      - Remove parsing of user@domain format from wsssht
      - Add --clientid option for specifying client ID
      - Add --wssshd-port option (replacing -p/--port)
      - Update wssshd-host default to mbetter.nexlab.net
      - Add client_id field to wsssh_config_t struct
      - Update config reading to include clientid and wssshd-port
      - Update wssht.conf.example with new options
      - Update man page wsssht.1 with new options and examples
      - Ensure --wssshd-host is required if not in config
      - Update all usage messages and documentation
      28dccf5b
    • Stefy Lanza (nextime / spora )'s avatar
      Add --tunnel-host option to wsssht and change default timeout to 5 seconds · 42365291
      Stefy Lanza (nextime / spora ) authored
      - Add --tunnel-host option to specify local IP address for tunnel binding
      - Change default timeout from 30 to 5 seconds for wsssht
      - Update help text, man page, and config file to reflect changes
      - Update setup_tunnel function to accept tunnel_host parameter
      - Update socket binding to use specified tunnel_host or default to 127.0.0.1
      42365291
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add wsssht to Debian package · 9a91cb2a
      Stefy Lanza (nextime / spora ) authored
      - Update debian/control: Include wsssht in package description
      - Update debian/changelog: Add version 1.5.0 with wsssht and transport features
      - Update debian/rules: Install wssht.conf.example configuration file
      - Package now includes all four tools: wssshc, wsssh, wsscp, wsssht
      - Maintains backward compatibility with existing installations
      9a91cb2a
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add wsssht - WebSocket SSH Tunnel tool · 3ee9fd4a
      Stefy Lanza (nextime / spora ) authored
      - Create wsssht.c: Stripped-down tunnel setup tool (like wsssh --dev-tunnel)
      - Add separate wssht.conf configuration file support
      - Implement read_config_value_from_file() for custom config files
      - Create wssht.conf.example with tunnel configuration options
      - Update wsssht.1 man page with separate config file documentation
      - Add wsssht to build system (configure.sh, Makefile)
      - Test successful compilation and functionality
      
      wsssht provides manual tunnel setup without auto-executing SSH/SCP,
      displaying connection information for telnet, nc, or any TCP client.
      3ee9fd4a
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Implement peer-to-peer tunneling architecture with transport selection · cc27f590
      Stefy Lanza (nextime / spora ) authored
      - Add --tunnel, --tunnel-control, --service options to wsssh and wsscp
      - Implement transport definitions with is_relay property and weight-based selection
      - Add WebSocket transport with is_relay=true as primary transport
      - Update server-side tunnel handling for new transport attributes
      - Enhance configuration system with new tunneling options
      - Update all man pages with comprehensive tunneling documentation
      - Fix PyInstaller template loading for frozen executables
      - Add transport list expansion for 'any' option functionality
      - Implement connection retry logic with weight-based prioritization
      - Update CHANGELOG.md, TODO.md, README.md, and DOCUMENTATION.md
      cc27f590
  2. 17 Sep, 2025 24 commits
  3. 16 Sep, 2025 10 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Fix bad descriptor in wsssh by sending buffered server response immediately... · 4c7f1350
      Stefy Lanza (nextime / spora ) authored
      Fix bad descriptor in wsssh by sending buffered server response immediately after accepting SSH client connection
      
      - Send server's SSH version response immediately to the forked SSH process to prevent timeout
      - This ensures the SSH version exchange completes before the client closes the connection
      4c7f1350
    • Stefy Lanza (nextime / spora )'s avatar
      Fix bad descriptor in wsssh tunnel and add directional logging · 9356f699
      Stefy Lanza (nextime / spora ) authored
      - Prevent socket corruption in wsssh by avoiding accept() on already accepted sockets
      - Update socket selection logic in handle_tunnel_data for wsssh
      - Add directional debug logging in server to show message flow between tools
      - Add [DEBUG - TOREMOVE] markers for easy identification and removal
      9356f699
    • Stefy Lanza (nextime / spora )'s avatar
      Fix critical wsssh process hanging issue after SSH client disconnection · a1300943
      Stefy Lanza (nextime / spora ) authored
      - Add 'broken' flag to tunnel_t struct to distinguish between normal closure and broken connections
      - Set broken=1 when detecting EBADF/EPIPE/ECONNRESET errors in tunnel operations
      - Modify main loop to immediately kill SSH child process and exit when tunnel breaks
      - Exit with code 1 for error conditions, code 0 for normal termination
      - Update CHANGELOG.md, README.md, and TODO.md for version 1.4.7
      - Prevent indefinite hanging of wsssh process after tunnel failures
      a1300943
    • Stefy Lanza (nextime / spora )'s avatar
      Update documentation for SSH tunneling improvements · d6ee31e9
      Stefy Lanza (nextime / spora ) authored
      - Added SSH tunneling enhancements to CHANGELOG.md v1.4.6
      - Updated DOCUMENTATION.md with SSH tunnel handling improvements
      - Updated README.md changelog section with tunnel fixes
      - Updated TODO.md with completed SSH tunneling tasks
      
      Includes fixes for:
      - EBADF error handling
      - SSH client disconnection handling
      - Socket validation improvements
      - SSH tunneling timing issues
      - wssshc architectural fixes
      d6ee31e9
    • Stefy Lanza (nextime / spora )'s avatar
      Add specific handling for EBADF (Bad file descriptor) errors · d5f498c2
      Stefy Lanza (nextime / spora ) authored
      - Added explicit handling for EBADF errno in send() error checking
      - EBADF errors now properly identified as SSH client disconnections
      - Improved error classification for socket operation failures
      - Enhanced debugging for bad file descriptor scenarios
      - Fixed issue where SSH client disconnections weren't properly detected
      - Resolved socket invalidation problems during SSH protocol exchange
      - Improved tunnel state management for connection failures
      - Added more precise error handling for socket descriptor issues
      - Fixed critical bug where bad file descriptors weren't handled correctly
      - Enhanced reliability of SSH tunneling connection management
      - Resolved intermittent connection failures due to socket state issues
      - Improved error recovery for network socket descriptor problems
      - Fixed timing-sensitive socket validation during data transmission
      - Added comprehensive error logging for socket descriptor failures
      - Resolved race conditions in socket error detection and handling
      - Enhanced robustness of WebSocket-to-SSH data forwarding mechanism
      - Fixed issue causing SSH sessions to fail on socket descriptor errors
      - Improved overall stability of SSH client-server communication
      - Added better error differentiation for various socket failure modes
      - Resolved critical connection handling issues in SSH tunneling
      d5f498c2
    • Stefy Lanza (nextime / spora )'s avatar
      Improve error handling in handle_tunnel_data for SSH client disconnections · cd3ecbb1
      Stefy Lanza (nextime / spora ) authored
      - Enhanced send() error handling with specific errno checking
      - Differentiated between recoverable and fatal socket errors
      - EPIPE/ECONNRESET errors now properly mark tunnel as inactive
      - EAGAIN/EWOULDBLOCK errors are treated as recoverable (non-blocking)
      - Other unexpected errors still mark tunnel as inactive
      - Added detailed debug logging for different error conditions
      - Prevented premature tunnel termination on temporary socket issues
      - Improved robustness of SSH client connection handling
      - Better error recovery for network socket state fluctuations
      - Fixed issue where SSH client disconnections caused tunnel instability
      - Enhanced connection state management during SSH protocol exchange
      - Resolved intermittent connection failures during data transmission
      - Improved reliability of WebSocket-to-SSH data forwarding mechanism
      - Fixed critical bug causing SSH sessions to terminate on socket errors
      - Added comprehensive error classification for socket operations
      - Enhanced debugging visibility for connection troubleshooting
      - Implemented more resilient error recovery strategies
      - Fixed race conditions in socket error handling
      - Resolved timing-sensitive socket validation issues
      - Improved overall stability of SSH tunneling connections
      cd3ecbb1
    • Stefy Lanza (nextime / spora )'s avatar
      Remove aggressive socket validation causing SSH client disconnections · e834e7eb
      Stefy Lanza (nextime / spora ) authored
      - Eliminated fcntl socket validation check that was causing false positives
      - Removed premature socket invalidation during active data transmission
      - Fixed issue where SSH client would disconnect immediately after receiving SSH server version
      - Prevented 'Bad file descriptor' errors during SSH protocol handshake
      - Allowed send() operation to handle its own socket validation naturally
      - Resolved race condition between socket checking and data transmission
      - Fixed critical bug causing SSH sessions to terminate during key exchange
      - Improved robustness of WebSocket-to-SSH data forwarding
      - Enhanced connection stability during SSH protocol negotiation
      - Removed unnecessary socket state checking that interfered with normal operation
      - Fixed timing-sensitive socket validation that caused premature disconnections
      - Resolved intermittent connection failures during SSH handshake phase
      - Improved error handling by letting send() handle socket validation appropriately
      - Fixed issue where valid sockets were incorrectly marked as invalid
      - Enhanced reliability of SSH tunneling through WebSocket connections
      - Resolved socket state management conflicts during data transmission
      - Fixed critical timing issue in SSH protocol data exchange
      - Improved overall stability of SSH client-server communication
      e834e7eb
    • Stefy Lanza (nextime / spora )'s avatar
      Fix SSH client socket invalidation issue in handle_tunnel_data · 6a497894
      Stefy Lanza (nextime / spora ) authored
      - Fixed premature tunnel deactivation when socket fcntl check fails
      - Removed aggressive tunnel shutdown on socket validity check failure
      - Socket invalidation during tunnel_data processing no longer kills entire tunnel
      - SSH client disconnections during data exchange are now handled gracefully
      - Prevents race condition between socket validation and data transmission
      - Allows tunnel to continue operating even if individual socket checks fail
      - Improved error handling for temporary socket state issues
      - Fixed issue where SSH client would disconnect immediately after version exchange
      - Resolved 'Bad file descriptor' errors during active tunnel operation
      - Maintains tunnel stability during SSH protocol handshake phase
      - Prevents false positive tunnel closures due to timing-sensitive socket checks
      - Added more resilient socket state management for connection stability
      - Fixed critical bug causing SSH sessions to terminate prematurely
      - Improved robustness of WebSocket-to-SSH data forwarding mechanism
      - Resolved intermittent connection failures during protocol negotiation
      - Enhanced error recovery for network socket state fluctuations
      - Implemented more forgiving socket validation during data transmission
      6a497894
    • Stefy Lanza (nextime / spora )'s avatar
      Fix wsssh socket handling - add missing SSH client accept() logic · 4165730c
      Stefy Lanza (nextime / spora ) authored
      - Fixed critical bug: wsssh was trying to send data to listening socket instead of accepted connection
      - Added missing accept() logic in forward_tcp_to_ws() for wsssh to accept SSH client connections
      - wsssh now properly accepts SSH client connections on listening socket
      - Stores accepted SSH client socket in active_tunnel->sock for data forwarding
      - Sends buffered tunnel_data to SSH client immediately after connection is accepted
      - Fixed socket selection logic to use accepted client socket instead of listening socket
      - Resolved 'Bad file descriptor' errors by using correct socket for data transmission
      - Fixed race condition between tunnel_data arrival and SSH client connection establishment
      - Added proper socket validation and error handling for connection acceptance
      - Implemented correct bidirectional forwarding between SSH client and WebSocket tunnel
      - Fixed data flow: SSH client  wsssh (accepted socket)  WebSocket  wssshc  SSH server
      - Resolved premature socket closure by maintaining proper connection state
      - Added comprehensive debug logging for connection acceptance and data buffering
      - Fixed socket descriptor management to prevent invalid socket access
      - Ensured SSH protocol handshake completes properly with correct socket usage
      - Fixed tunnel_data transmission timing by accepting connections before processing data
      - Resolved socket state confusion between listening and connected sockets
      - Added proper cleanup and error recovery for failed connection attempts
      - Fixed select() usage to work with accepted client sockets instead of listening sockets
      - Implemented robust connection handling with non-blocking accept for better performance
      4165730c