1. 19 Sep, 2025 19 commits
    • Stefy Lanza (nextime / spora )'s avatar
      Version 1.6.2: Tunnel Close Forwarding & Web Terminal Enhancements · 6ab396ec
      Stefy Lanza (nextime / spora ) authored
      - FIX: Tunnel close forwarding between wssshc, server, and wsssht
        * Server now properly forwards tunnel_close messages to wsssht
        * Prevents wsssht processes from hanging after client-initiated closure
        * Ensures proper cleanup of tunnel resources on all endpoints
      
      - FIX: Web terminal JavaScript issues
        * Fixed FitAddon loading issues by switching to unpkg CDN
        * Resolved JavaScript variable scoping error (fitAddon undefined)
        * Added proper error handling for xterm.js library loading failures
        * Enhanced debug logging for library loading and terminal initialization
      
      - FEATURE: Fullscreen terminal support
        * Added fullscreen toggle button (⛶/⛝) to terminal interface
        * Cross-browser fullscreen API support (Chrome, Firefox, Safari, IE11)
        * Automatic terminal resizing when entering/exiting fullscreen mode
        * Backend synchronization of terminal dimensions during fullscreen changes
      
      - FIX: Logo serving path
        * Updated Flask routes to serve logo files from logos/ directory
        * Added proper PyInstaller support for bundled logo assets
        * Fixed favicon.ico and image.jpg serving for both development and frozen executables
      
      - DOCS: Updated changelog, README, and documentation
        * Added version 1.6.2 changelog with comprehensive change details
        * Updated README with fullscreen feature mention
        * Enhanced documentation with recent updates section
      
      Technical Details:
      - Server-side tunnel close message routing in websocket.py
      - JavaScript library management with robust error recovery
      - Cross-browser fullscreen API implementation
      - Asset management for both development and production environments
      6ab396ec
    • Stefy Lanza (nextime / spora )'s avatar
      Fix tunnel close message issue when wsscp is interrupted · b3ef97b4
      Stefy Lanza (nextime / spora ) authored
      - Added SIGINT signal handler to wsscp.c for proper signal handling
      - Modified execute_scp_command() to fork/exec instead of using system()
      - Added process tracking with scp_pid global variable
      - Signal handler sends SIGTERM to SCP process when Ctrl+C is received
      - Added proper cleanup and exit code handling for interrupted transfers
      - Ensures wsssht (ProxyCommand) gets time to send tunnel_close message
      - Prevents orphaned processes and ensures clean tunnel closure
      
      This resolves the issue where Ctrl+C on wsscp didn't allow the underlying wsssht process to send tunnel_close messages to the server.
      b3ef97b4
    • Stefy Lanza (nextime / spora )'s avatar
      Fix double Ctrl+C signal handling in wssshd · 873872d7
      Stefy Lanza (nextime / spora ) authored
      - Replaced counter-based signal handling with flag-based approach
      - Added sigint_handled flag to prevent multiple signal handler executions
      - First Ctrl+C: Sets flag and initiates graceful shutdown
      - Second Ctrl+C: Forces immediate exit with os._exit(1)
      - Prevents race conditions and multiple signal handler calls
      - Ensures proper single-signal behavior for graceful shutdown
      
      This resolves the issue where a single Ctrl+C was triggering both graceful shutdown and immediate exit messages.
      873872d7
    • Stefy Lanza (nextime / spora )'s avatar
      Update README.md logo reference to use image.jpg · 26930a9b
      Stefy Lanza (nextime / spora ) authored
      - Changed logo reference from logos/logo-256.png to image.jpg
      - Updated main documentation to use the new logo image directly
      - Maintains backward compatibility with existing logos system for web interface
      
      This ensures the README displays the logo correctly using the image.jpg file.
      26930a9b
    • Stefy Lanza (nextime / spora )'s avatar
      Fix linking errors in wssshc build · ffe1f7c0
      Stefy Lanza (nextime / spora ) authored
      - Add missing object files to wssshc target in configure.sh
      - Include libwsssht/control_messages.o and libwsssht/data_messages.o in wssshc linking
      - Resolve undefined reference errors for:
        - send_registration_message
        - send_ping_frame
        - send_pong_frame
        - send_tunnel_data_message
        - send_tunnel_response_message
      - Update configure.sh to generate correct Makefile with all required dependencies
      - Ensure wssshc builds successfully with all message functions available
      
      This fixes the ld linker errors that were preventing wssshc from building properly.
      ffe1f7c0
    • Stefy Lanza (nextime / spora )'s avatar
      Improve wssshd graceful shutdown with better messaging and cleanup · f7f3f417
      Stefy Lanza (nextime / spora ) authored
      - Add informative messages during graceful shutdown indicating what the server is waiting for
      - Stop cleanup task immediately during shutdown to prevent keepalive timeouts
      - Send tunnel close messages to ALL tunnels (both client and tool endpoints) during shutdown
      - Import TUNNEL_CLOSE_MSG constant for proper tunnel closure
      - Enhanced shutdown sequence with clear progress indicators
      - Ensure all active connections receive proper shutdown notifications
      
      This ensures wssshd provides clear feedback during shutdown and properly closes all tunnels without waiting for keepalive timeouts.
      f7f3f417
    • Stefy Lanza (nextime / spora )'s avatar
      Add double Ctrl+C handling to wssshd for force exit · b46562ea
      Stefy Lanza (nextime / spora ) authored
      - Implement double SIGINT (Ctrl+C) detection in wssshd server
      - First Ctrl+C: Initiates graceful shutdown with cleanup
      - Second Ctrl+C: Forces immediate exit using os._exit(1) without cleanup
      - Consistent behavior with wssshc double Ctrl+C handling
      - Prevents hanging during shutdown when graceful shutdown fails
      - Maintains backward compatibility with single Ctrl+C graceful shutdown
      
      This ensures wssshd can be forcefully terminated if graceful shutdown gets stuck, while still allowing proper cleanup on normal shutdown.
      b46562ea
    • Stefy Lanza (nextime / spora )'s avatar
      Complete implementation of graceful shutdown and configuration reload · 730d21eb
      Stefy Lanza (nextime / spora ) authored
      This commit implements comprehensive improvements to WSSSH tools:
      
      ## Graceful Shutdown Implementation
      - Added SIGINT signal handlers for both wssshc and wsssht
      - Implemented graceful tunnel close on exit with 3-second timeout
      - Added double Ctrl+C detection for immediate exit without waiting
      - Enhanced signal handling throughout both programs
      - Added tunnel_close messages for all active tunnels before shutdown
      
      ## Configuration Reload (SIGHUP)
      - Implemented SIGHUP signal handling in wssshc for live configuration reload
      - Added reload_configuration() function to reload services config and password
      - Reloads password from config files without service restart
      - Reloads services configuration from /etc/wsssh.d/ directory
      - Updates connect_to_server() to support dynamic configuration reloading
      
      ## Version Information in Messages
      - Added WSSSH_VERSION define to websocket.h
      - Updated registration messages to include version field
      - Updated tunnel_request messages to include version field
      - Resolved function naming conflicts between wssshc and wsssht
      
      ## Build System and Code Organization
      - Fixed compilation errors and improved code structure
      - Enhanced error handling and memory management
      - Improved cross-platform compatibility
      - Added proper cleanup for all allocated resources
      
      ## Files Modified
      - wsssd/__init__.py, config.py, server.py - Server-side improvements
      - wssshd.py - Main daemon enhancements
      - wssshtools/ - Complete C implementation updates
      - Multiple library files for better modularity
      
      All changes maintain backward compatibility while adding new functionality for better service management and configuration handling.
      730d21eb
    • Stefy Lanza (nextime / spora )'s avatar
      Add SIGHUP signal handling to wssshc for configuration reload · e4bfac6f
      Stefy Lanza (nextime / spora ) authored
      - Implement SIGHUP signal handler that triggers configuration reload
      - Add reload_configuration() function to reload services config and password
      - Reload password from config files when SIGHUP is received
      - Reload services configuration from service files
      - Update connect_to_server() to accept services parameters for reload functionality
      - Add proper cleanup for services in main function
      
      This allows wssshc to reload its configuration without restarting:
      - Services configuration from /etc/wsssh.d/ directory
      - Password from config files
      - All changes take effect immediately without service interruption
      e4bfac6f
    • Stefy Lanza (nextime / spora )'s avatar
      Add graceful shutdown with tunnel close on SIGINT · 821af834
      Stefy Lanza (nextime / spora ) authored
      - Implement SIGINT signal handler for both wssshc and wsssht
      - Add graceful shutdown logic that sends tunnel_close messages for active tunnels
      - Implement 3-second timeout for tunnel close operations to complete
      - Add double Ctrl+C detection for immediate exit without waiting
      - Update signal handling throughout both programs to use graceful_shutdown flag
      
      This ensures that active tunnels are properly closed when the programs
      exit, either normally or via Ctrl+C, with a timeout mechanism and
      fallback for immediate exit on second Ctrl+C.
      821af834
    • Stefy Lanza (nextime / spora )'s avatar
      Add WSSSH version to registration and tunnel request messages · d57e6c9c
      Stefy Lanza (nextime / spora ) authored
      - Add WSSSH_VERSION define to websocket.h
      - Include version field in wssshc registration messages to wssshd
      - Include version field in wsssht tunnel_request messages
      - Resolve function naming conflicts between wssshc and wsssht
      - Update function declarations and calls accordingly
      
      This allows for better version compatibility checking and debugging
      between WSSSH client and server components.
      d57e6c9c
    • Stefy Lanza (nextime / spora )'s avatar
      Implement comprehensive keep-alive system and debug enhancements · 71a6296d
      Stefy Lanza (nextime / spora ) authored
      - Fix tunnel_data debug logging suppression with proper JSON spacing detection
      - Add high-resolution timing for request_id generation using gettimeofday
      - Implement complete keep-alive protocol with statistics tracking:
        * tunnel_keepalive messages with total_bytes and rate_bps
        * tunnel_keepalive_ack responses
        * 30-second keep-alive intervals
      - Add dual-endpoint keep-alive monitoring in wssshd (220s timeout)
      - Implement 190s timeout mechanism for tunnel cleanup
      - Add periodic tunnel list debug output in wssshc (every 60 seconds)
      - Track comprehensive tunnel statistics (bytes sent/received, transfer rates)
      - Enhanced debug logging with detailed tunnel health information
      - Proper message forwarding between wssshc  wssshd  wsssht
      - Automatic tunnel closure on keep-alive timeout with cleanup
      71a6296d
    • Stefy Lanza (nextime / spora )'s avatar
      Fix wssshc tunnel timeout and debug output issues · e25fd993
      Stefy Lanza (nextime / spora ) authored
      - Add periodic ping frames to keep WebSocket connections alive (15s interval)
      - Implement send_ping_frame() function in websocket.c
      - Fix tunnel request_id generation to ensure unique IDs for recreations
      - Suppress raw data in tunnel_data debug messages, show size instead
      - Sanitize both 'Received message' and 'Processing message' debug outputs
      - Improve tunnel cleanup and state management
      e25fd993
    • Stefy Lanza (nextime / spora )'s avatar
      debian: Update changelog files to version 1.6.1 · 293be902
      Stefy Lanza (nextime / spora ) authored
      - Update wsssh-tools changelog to version 1.6.1
      - Update wsssh-server changelog to version 1.6.1
      - Document major code refactoring and documentation updates
      - Include details about wsssht modularization
      - Add documentation rewrite information
      - Maintain proper Debian changelog format
      293be902
    • Stefy Lanza (nextime / spora )'s avatar
      8d1ee9bc
    • Stefy Lanza (nextime / spora )'s avatar
      docs: Rewrite documentation and README with updated project description · b7dae7b4
      Stefy Lanza (nextime / spora ) authored
      - Update project description from WebSocket-based to universal tunneling system
      - Rewrite README.md with comprehensive features, installation, and examples
      - Rewrite DOCUMENTATION.md with detailed technical specifications
      - Update TODO.md with current project status and future enhancements
      - Ensure all command-line examples are accurate and exclude hidden options
      - Maintain consistency across all documentation files
      b7dae7b4
    • Stefy Lanza (nextime / spora )'s avatar
      fix: Replace 'WebSocket SSH' with 'WSSH' in documentation and man pages · 561b47d4
      Stefy Lanza (nextime / spora ) authored
      - Update README.md to use 'WSSH' instead of 'WebSocket SSH' in various sections
      - Update DOCUMENTATION.md to use 'WSSH' instead of 'WebSocket SSH'
      - Update wssshtools/man/wssshc.1 to use 'WSSH Client' instead of 'WebSocket SSH Client'
      - Update wssshtools/man/wsssht.1 to use 'WSSH' instead of 'WebSocket SSH' in descriptions
      - Maintain consistency with the new project branding
      561b47d4
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Add complete init system for wsssht tunnel setup tool · 9e3c9377
      Stefy Lanza (nextime / spora ) authored
      - Create wsssht.init init script by copying and modifying wssshc.init
      - Add wsssht logrotate script for log management
      - Create wsssht systemd service file for systemd integration
      - Implement wsssht-watchdog script for process monitoring and restart
      - Add /etc/default/wsssht configuration file
      - Update debian/rules to include wsssht init files in package
      - Modify debian/postinst to create wsssht user/group and setup init system
      - Enable both sysv init and systemd service integration
      - Configure proper permissions and ownership for wsssht daemon
      9e3c9377
    • Stefy Lanza (nextime / spora )'s avatar
      feat: Rebrand project to WSSSH:: Warp-Powered Stefy's Spatial Secure Hyperdrive · 388bad08
      Stefy Lanza (nextime / spora ) authored
      - Update project name from 'WebSocket SSH' to 'WSSSH:: Warp-Powered Stefy's Spatial Secure Hyperdrive'
      - Update project description to emphasize evolution as universal tunneling utility
      - Update README.md, DOCUMENTATION.md, CHANGELOG.md, TODO.md
      - Update all man pages (wsssh.1, wsscp.1, wssshc.1, wsssht.1)
      - Update Debian control files for both packages
      - Update configuration examples and build scripts
      - Update source code comments in tunnel and client files
      388bad08
  2. 18 Sep, 2025 21 commits
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Add wsscp - WebSocket SCP wrapper application · cea666ef
      Stefy Lanza (nextime / spora ) authored
      New wsscp application:
      - WebSocket SCP wrapper similar to wsssh but for SCP instead of SSH
      - Uses -P option for port detection (SCP standard) instead of -p
      - Automatically constructs ProxyCommand for WebSocket tunnels
      - Supports same command line syntax as regular SCP
      - Includes automatic port detection from -P option
      - Full integration with wsssht WebSocket tunnel infrastructure
      
      Implementation details:
      - wsscp.h: Header file with configuration structures and function declarations
      - wsscp.c: Complete implementation with argument parsing and SCP command generation
      - Updated configure.sh to build wsscp alongside other tools
      - Added wsscp.1 man page with comprehensive documentation
      - Tested functionality with debug mode and argument parsing
      
      Features:
      - Automatic wsssht path detection (PATH or same directory)
      - Smart port detection: explicit --wssshd-port takes precedence over -P option
      - Support for all wsssht tunnel options (--tunnel, --tunnel-control, --debug)
      - Compatible with existing wssshc/wsssht infrastructure
      - Proper error handling and user-friendly help messages
      
      Usage examples:
        wsscp localfile user@myclient:/remote/path
        wsscp -P 2222 localfile user@myclient.server.com:/remote/path
        wsscp --debug --tunnel websocket localfile user@myclient:/remote/path
      cea666ef
    • Stefy Lanza (nextime / spora )'s avatar
      Enhance wsssh and wsssht with improved functionality · e9748765
      Stefy Lanza (nextime / spora ) authored
      wsssh improvements:
      - Parse SSH arguments for -p option to extract port value
      - Automatically add --wssshd-port to ProxyCommand when -p is specified and --wssshd-port is not explicitly set
      - Fix build warnings in find_wsssht_path function
      - Change debug mode to execute SSH command instead of just printing it
      
      wsssht improvements:
      - Modify pipe mode debug output to use stderr instead of stdout
      - Prevent debug messages from interfering with piped data streams
      - All debug output in pipe mode now goes to stderr to avoid contaminating stdin/stdout
      
      These changes improve the usability and reliability of both wsssh and wsssht applications, especially when used in pipe mode or with SSH port specifications.
      e9748765
    • Stefy Lanza (nextime / spora )'s avatar
      Add new wsssh application - SSH wrapper with ProxyCommand support · 382c9c46
      Stefy Lanza (nextime / spora ) authored
      - Create wsssh.h header file with configuration structures and function declarations
      - Implement wsssh.c with comprehensive SSH wrapper functionality:
        * Parse command line arguments (--help, --clientid, --wssshd-host, --wssshd-port, --debug, --tunnel, --tunnel-control)
        * Parse target string in format: user[@clientid[.wssshd-host[:sshstring]]]
        * Build ProxyCommand using wsssht --pipe with appropriate options
        * Find wsssht in PATH or same directory as wsssh
        * Construct and execute SSH command with ProxyCommand
        * Debug mode shows constructed command without executing
      - Add wsssh to build system (configure.sh and Makefile)
      - Update debian/control to include wsssh in package description
      - Create comprehensive man page (man/wsssh.1) with usage examples
      - Tested functionality with various command line options
      
      wsssh provides a convenient wrapper around SSH that automatically sets up
      WebSocket tunneling through wsssht, making it easy to use SSH with WebSocket
      relays without manual ProxyCommand configuration.
      382c9c46
    • Stefy Lanza (nextime / spora )'s avatar
      Remove wsssh and wsscp from the project · 66a58d82
      Stefy Lanza (nextime / spora ) authored
      - Remove wsssh.c and wsscp.c source files
      - Remove wsssh.1 and wsscp.1 man pages
      - Remove wsssh.conf.example and wsscp.conf.example config files
      - Update configure.sh to exclude wsssh and wsscp from build
      - Update debian/control to reflect remaining tools (wssshc + wsssht)
      - Verified build works with only wssshc and wsssht binaries
      - Project now focuses on wssshc (client) and wsssht (tunnel tool with pipe mode)
      66a58d82
    • Stefy Lanza (nextime / spora )'s avatar
      Add --pipe mode for SSH ProxyCommand support · 76ac4c24
      Stefy Lanza (nextime / spora ) authored
      - Add MODE_PIPE constant to wsssht.h
      - Implement run_pipe_mode() function with proper tunnel negotiation
      - Add --pipe and --mode pipe command line options
      - Pipe mode negotiates tunnel (tunnel_request -> tunnel_ack) like other modes
      - Redirects raw tunnelled data to stdin/stdout instead of binding to TCP ports
      - Silent operation with no terminal output
      - Compatible with SSH ProxyCommand for transparent WebSocket SSH tunneling
      - Update include paths in all affected files after moving headers to libwsssht/
      - Update configure.sh to generate correct makefile with new file locations
      76ac4c24
    • Stefy Lanza (nextime / spora )'s avatar
    • Stefy Lanza (nextime / spora )'s avatar
      Fix double-free segmentation fault in concurrent tunnel cleanup · 4fd5bcc3
      Stefy Lanza (nextime / spora ) authored
      - Remove duplicate remove_tunnel() call in handle_connection cleanup
      - Prevent double-free of tunnel resources during concurrent connection cleanup
      - Ensure proper thread synchronization during tunnel cleanup
      - Fix race condition between forwarding thread exit and cleanup
      4fd5bcc3
    • Stefy Lanza (nextime / spora )'s avatar
      Fix segmentation fault when closing concurrent tunnels · 220bdb98
      Stefy Lanza (nextime / spora ) authored
      - Add forward_thread field to tunnel_t structure for thread synchronization
      - Remove pthread_detach() to allow proper thread joining during cleanup
      - Add pthread_join() in cleanup to wait for forwarding thread completion
      - Prevent race conditions between cleanup and forwarding threads
      - Ensure tunnel resources are not freed while threads are still using them
      - Fix concurrent connection cleanup issues in wsssht daemon mode
      220bdb98
    • Stefy Lanza (nextime / spora )'s avatar
      Fix concurrent connection issues in wsssht daemon mode · 5227651d
      Stefy Lanza (nextime / spora ) authored
      - Implement thread-based concurrent connection handling
      - Fix segmentation fault caused by shared static variables
      - Each connection now gets its own WebSocket tunnel and resources
      - Replace global tunnel management with per-thread instances
      - Add proper cleanup for individual connection threads
      - Allow multiple SSH sessions to connect simultaneously to the same port
      5227651d
    • Stefy Lanza (nextime / spora )'s avatar
      Update documentation for wsssht refactoring · 91fe8573
      Stefy Lanza (nextime / spora ) authored
      - Updated README.md project structure to reflect new libwsssht/ modular organization
      - Updated DOCUMENTATION.md with new modular component descriptions
      - Added CHANGELOG.md entry for version 1.6.1 with refactoring details
      - Added TODO.md entry documenting the completed refactoring work
      
      All documentation now reflects the new modular architecture with improved maintainability.
      91fe8573
    • Stefy Lanza (nextime / spora )'s avatar
      Refactor wsssht.c: Split large monolithic file into modular components · 698acaa3
      Stefy Lanza (nextime / spora ) authored
      - Created libwsssht/ directory with modular components:
        * utils.h/c: Utility functions (print_usage, parse_connection_string, parse_args)
        * modes.h/c: Mode-specific functions (bridge, script, daemon modes)
        * threads.h/c: Thread-related functions and structures
        * wsssht.h: Main header with includes and declarations
      
      - Reduced wsssht.c from 2769 lines to 674 lines (main function only)
      - Updated Makefile and configure.sh to handle new modular structure
      - Maintained exact same functionality and command-line interface
      - Improved code maintainability and organization
      
      All functionality preserved, build successful, and wsssht binary works correctly.
      698acaa3
    • Stefy Lanza (nextime / spora )'s avatar
      Commit latest changes · 8b1388b8
      Stefy Lanza (nextime / spora ) authored
      8b1388b8
    • Stefy Lanza (nextime / spora )'s avatar
      Suppress tunnel_data debug messages in wsssht --debug mode · 08729ae7
      Stefy Lanza (nextime / spora ) authored
      - Suppress verbose tunnel_data debug messages in main tunnel loop
      - Suppress tunnel_data debug messages in thread function
      - Suppress tunnel_data debug messages in daemon mode
      - Suppress WebSocket 'Received message' and 'Processing message' debug messages for tunnel_data
      - Maintain functionality while reducing debug log verbosity
      - Preserve other debug messages (tunnel_response, tunnel_close, etc.)
      08729ae7
    • Stefy Lanza (nextime / spora )'s avatar
      Complete implementation of extensive debug logging for control channel messages · 0bbca2da
      Stefy Lanza (nextime / spora ) authored
      - wssshd: Added full JSON logging for all received/sent control messages when --debug enabled
      - wssshc: Verified existing control message logging
      - wsssht: Suppressed verbose data channel messages in debug mode
      - Fixed wsssht daemon mode for multiple sequential connections
      - Fixed wsssht script mode data forwarding and JSON output
      - Increased thread cleanup timeout to prevent race conditions
      - All components compile and work correctly
      0bbca2da
    • Stefy Lanza (nextime / spora )'s avatar
      Add extensive debug logging for control channel messages in wssshd and wssshc · d81db287
      Stefy Lanza (nextime / spora ) authored
      - wssshd (websocket.py): Log full JSON content of all received and sent control channel messages when --debug enabled
      - wssshc: Verified existing debug logging for control messages
      - Fixed wsssht script mode data forwarding for tunnel_response messages
      - Suppressed data channel message output in script mode for clean JSON protocol
      - Fixed wsssht daemon mode to properly handle multiple connections and wait indefinitely
      d81db287
    • Stefy Lanza (nextime / spora )'s avatar
      Add extensive debug logging for control channel messages and enhance script mode · 4614c081
      Stefy Lanza (nextime / spora ) authored
      - Add debug logging for all control channel messages in wssshd and wssshc
        when --debug flag is enabled, showing full JSON content of received and sent messages
      - Fix data forwarding issue in wsssht script mode
      - Suppress data channel message output in wsssht script mode for cleaner output
      - Enhance script_started message in wsssht script mode to include tunnel_host, tunnel_port, and service fields
      - Remove obsolete test_bridge_interactive.sh file
      
      Control channel messages now logged include: register, registered, registration_error,
      tunnel_request, tunnel_ack, tunnel_close, tunnel_error for both server and client.
      4614c081
    • Stefy Lanza (nextime / spora )'s avatar
      Fix bridge mode to use SSL for WebSocket communication · 9ae67412
      Stefy Lanza (nextime / spora ) authored
      - Bridge mode was incorrectly using raw socket operations over SSL connection
      - Updated to use SSL_read/SSL_write for all WebSocket communication
      - Fixed send_websocket_message to use send_websocket_frame with SSL
      - Fixed pong frame sending to use SSL
      - Fixed select() and FD_ISSET to monitor correct socket
      
      This resolves the 'send_error' and connection closure issues in bridge mode tests.
      9ae67412
    • Stefy Lanza (nextime / spora )'s avatar
      Add extensive debug logging for control channel messages · 84781de4
      Stefy Lanza (nextime / spora ) authored
      - wssshd: Log full content of all received and sent control messages when --debug is enabled
      - wssshc: Already logs control messages, registration message logging enhanced
      - wsssht: Fixed memory corruption issue with config struct allocations
      
      Control channel messages include: register, registered, registration_error,
      tunnel_request, tunnel_ack, tunnel_error, tunnel_close, tunnel_data, tunnel_response
      84781de4
    • Stefy Lanza (nextime / spora )'s avatar
      Add tunnel control channel message handling to bridge mode · 2ea94e22
      Stefy Lanza (nextime / spora ) authored
      - Enhanced bridge mode to handle incoming tunnel control messages from WebSocket
      - Added JSON output for tunnel_data, tunnel_response, tunnel_close messages
      - Added WebSocket connection status messages (websocket_close, websocket_connection_closed)
      - Updated test scripts to include tunnel control channel message testing
      - Updated documentation with comprehensive examples of control channel messages
      - Added new testing scenario for tunnel control channel verification
      
      Bridge mode now properly forwards all tunnel control channel messages as JSON
      through stdout, allowing external applications to monitor tunnel state and
      server communications in real-time.
      2ea94e22
    • Stefy Lanza (nextime / spora )'s avatar
      Add comprehensive bridge mode testing tools · 549ffa56
      Stefy Lanza (nextime / spora ) authored
      - test_bridge_mode.sh: Automated test script for bridge mode functionality
      - test_bridge_interactive.sh: Interactive testing tool with manual JSON command input
      - BRIDGE_MODE_TESTING.md: Complete testing guide with examples and integration patterns
      
      Features:
      - Automated and interactive testing modes
      - JSON command examples and validation
      - Real-time response monitoring
      - Error handling and process management
      - Integration examples in Python and Node.js
      - Troubleshooting guide and best practices
      - Colored output and user-friendly interface
      
      These tools provide comprehensive testing capabilities for the new bridge mode,
      allowing developers to easily test and integrate with the JSON stdin/stdout interface.
      549ffa56