• 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
Name
Last commit
Last update
templates Loading commit data...
wsssd Loading commit data...
wsssh-server/debian Loading commit data...
wssshtools Loading commit data...
.gitignore Loading commit data...
BRIDGE_MODE_TESTING.md Loading commit data...
CHANGELOG.md Loading commit data...
DOCUMENTATION.md Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
TODO.md Loading commit data...
build.sh Loading commit data...
clean.sh Loading commit data...
image.jpg Loading commit data...
prompt.txt Loading commit data...
requirements.txt Loading commit data...
service.conf.example Loading commit data...
test_bridge_mode.sh Loading commit data...
wssshc.conf.example Loading commit data...
wssshc.init Loading commit data...
wssshc_watcher.sh Loading commit data...
wssshd.conf.example Loading commit data...
wssshd.init Loading commit data...
wssshd.py Loading commit data...
wsssht.conf.example Loading commit data...
wsssht.init Loading commit data...