-
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