Commit b77037ab authored by nextime's avatar nextime

Version 1.3.4: Enhanced WebSocket connection management

- Fixed ping frame parsing in wsssh.c to properly handle WebSocket ping frames
- Added automatic pong responses with correct payload echoing
- Implemented WebSocket reconnection logic for both wsssh.c and wsscp.c
- Added --interval option for configurable connection retry intervals
- Smart timing: 1-second WebSocket reconnections vs 30-second initial connection retries
- Improved connection resilience and automatic recovery from network interruptions
- Updated documentation and changelog for version 1.3.4
parent 5c4d312a
......@@ -5,6 +5,41 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.3.4] - 2025-09-13
### Added
- **Enhanced WebSocket Connection Management**: Robust ping/pong frame handling and automatic reconnection
- Fixed ping frame parsing in wsssh.c to properly handle WebSocket ping frames
- Added automatic pong responses with correct payload echoing
- Implemented WebSocket reconnection logic for both wsssh.c and wsscp.c
- Added --interval option for configurable connection retry intervals
- Smart timing: 1-second WebSocket reconnections vs 30-second initial connection retries
- **Connection Resilience Features**:
- Automatic WebSocket reconnection during active tunnel operations
- Configurable retry intervals with --interval option (default: 30 seconds)
- Up to 3 reconnection attempts with proper error handling
- Seamless tunnel recovery without disrupting active SSH/SCP sessions
- Enhanced debug logging for connection state changes
### Changed
- **wsssh.c and wsscp.c Connection Handling**: Both tools now support automatic WebSocket reconnection
- **Ping Frame Processing**: Fixed parse_websocket_frame function to accept ping frames (0x89)
- **Reconnection Timing**: Fast 1-second intervals for WebSocket reconnections, configurable intervals for initial setup
- **Error Recovery**: Improved resilience to network interruptions and temporary disconnections
### Technical Details
- **WebSocket Protocol Compliance**: Proper ping/pong frame handling with RFC 6455 compliance
- **Reconnection Logic**: reconnect_websocket() function for seamless connection recovery
- **Configuration Options**: Added --interval parameter to both wsssh and wsscp
- **Backward Compatibility**: All existing functionality preserved, new features are additive
- **Cross-Tool Consistency**: Identical reconnection behavior between wsssh and wsscp
### Fixed
- **Ping Frame Parsing**: wsssh.c now correctly parses and responds to WebSocket ping frames
- **Connection Recovery**: Automatic reconnection when WebSocket connections are lost
- **Tunnel Stability**: Improved tunnel reliability during network interruptions
## [1.3.2] - 2025-09-13
### Added
......@@ -28,6 +63,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Implementation**: Added config file parsing to wssshd.py using configparser
- **Backward Compatibility**: All existing functionality preserved, config file is optional
## [1.3.2] - 2025-09-13
### Added
- **Enhanced Client Registration Management**: Improved wssshd client disconnection handling
- Clients are marked as "disconnected" instead of immediately removed from registry
- 30-second timeout before removing expired client registrations
- Automatic cleanup of expired clients with periodic background task
- Better resilience to temporary network disconnections
- **Improved Debug Message Clarity**: Enhanced debug output to distinguish between protocol levels
- `[WebSocket]` prefix for WebSocket-level messages and events
- `[TCP Tunnel]` prefix for TCP tunnel-level messages and events
- Clear separation between close frame handling and tunnel operations
- More detailed logging for connection state changes
### Changed
- **WebSocket Close Frame Handling**: Close frames no longer immediately terminate client registration
- Close frames trigger reconnection rather than client removal
- Client registration persists during temporary disconnections
- Improved reliability for unstable network conditions
- **Debug Output Format**: Standardized debug message format across all components
- Consistent prefix system for different protocol layers
- Clear indication of message source and type
- Better troubleshooting capabilities
### Technical Details
- **Client Registry Structure**: Enhanced client storage with status and timestamp tracking
- `clients[client_id] = {'websocket': ws, 'last_seen': timestamp, 'status': 'active'|'disconnected'}`
- Automatic status transitions based on connection state
- Timestamp-based expiration for disconnected clients
- **Background Cleanup**: Asynchronous cleanup task running every 10 seconds
- Removes clients disconnected for more than 30 seconds
- Maintains registry cleanliness without affecting active connections
- Non-blocking operation that doesn't interfere with normal processing
- **Web Interface Updates**: Enhanced client status display in web management interface
- Shows client connection status (active/disconnected)
- Displays last seen timestamp for disconnected clients
- Improved API responses with detailed client information
### Security
- **Connection State Tracking**: Better monitoring of client connection states
- **Timeout-based Cleanup**: Prevents accumulation of stale client registrations
- **Maintained Security**: All existing security measures preserved during improvements
## [1.3.1] - 2025-09-13
### Added
......
......@@ -291,6 +291,32 @@ id = client1
- Configuration file provides defaults when command line options are not specified
- Required parameters must be provided either via command line or configuration file
#### Enhanced Features (v1.3.4)
**WebSocket Connection Management:**
- Fixed ping frame parsing in C implementations (wsssh.c and wsscp.c)
- Added automatic pong responses with correct payload echoing
- Implemented WebSocket reconnection logic with smart timing
- Added --interval option for configurable connection retry intervals
**Connection Resilience:**
- 1-second intervals for WebSocket reconnection during active tunnels
- 30-second intervals for initial connection setup failures
- Up to 3 automatic reconnection attempts
- Seamless tunnel recovery without disrupting active SSH/SCP sessions
#### Enhanced Features (v1.3.2)
**Improved Debug Output:**
- `[WebSocket]` prefix for WebSocket-level messages and events
- `[TCP Tunnel]` prefix for TCP tunnel-level messages and events
- Clear distinction between protocol layers for better troubleshooting
**Resilient Connection Handling:**
- WebSocket close frames trigger reconnection rather than client removal
- 30-second timeout for expired client registrations on server side
- Better handling of temporary network disconnections
### wsssh (SSH Wrapper)
#### Command Line Options
......
......@@ -511,8 +511,14 @@ Your support helps us continue developing and maintaining this open-source proje
## Changelog
### Latest Updates
### Version 1.3.4 (Latest)
- **Enhanced WebSocket Connection Management**: Robust ping/pong frame handling and automatic reconnection for wsssh.c and wsscp.c
- **Fixed Ping Frame Parsing**: Corrected WebSocket ping frame processing in C implementations with proper pong responses
- **Automatic Reconnection Logic**: Added smart reconnection with 1-second intervals for WebSocket recovery and configurable --interval for initial setup
- **Improved Connection Resilience**: Better handling of network interruptions with seamless tunnel recovery
- **Enhanced Debug Output**: Clear logging for connection state changes and reconnection attempts
### Previous Updates
- Enhanced logo assets with higher quality versions for better visual presentation
- Improved C implementation files for better performance and reliability
- Added dedicated clean script for easier project maintenance
......
wsssh-tools (1.3.4-1) unstable; urgency=medium
* Version 1.3.4: Enhanced WebSocket connection management and ping/pong handling
* Fixed ping frame parsing in wsssh.c to properly handle WebSocket ping frames
* Added automatic pong responses with correct payload echoing
* Implemented WebSocket reconnection logic for both wsssh.c and wsscp.c
* Added --interval option for configurable connection retry intervals
* Smart timing: 1-second WebSocket reconnections vs 30-second initial connection retries
* Improved connection resilience and automatic recovery from network interruptions
-- Stefy Lanza <stefy@nexlab.net> Fri, 13 Sep 2025 16:30:00 +0200
wsssh-tools (1.3.2-1) unstable; urgency=medium
* Version 1.3.2: Added configuration file support to wssshd
......@@ -8,15 +20,15 @@ wsssh-tools (1.3.2-1) unstable; urgency=medium
-- Stefy Lanza <stefy@nexlab.net> Fri, 13 Sep 2025 15:50:00 +0200
wsssh-tools (1.3.1-1) unstable; urgency=medium
wsssh-tools (1.3.2-1) unstable; urgency=medium
* Version 1.3.1: Extended configuration file support to wssshc
* Added wssshc parameters to ~/.config/wsssh/wssshc.conf
* Default password, domain, server-ip, port, and id settings for wssshc
* Command line arguments take precedence over config file values
* Optional parameters become required only when not provided in config
* Version 1.3.2: Enhanced client registration management and debug clarity
* Improved WebSocket close frame handling with timeout-based client cleanup
* Enhanced debug messages with clear [WebSocket] and [TCP Tunnel] prefixes
* Better client reconnection handling with 30-second timeout for expired registrations
* Improved web interface client status display
-- Stefy Lanza <stefy@nexlab.net> Fri, 13 Sep 2025 15:45:00 +0200
-- Stefy Lanza <stefy@nexlab.net> Fri, 13 Sep 2025 15:50:00 +0200
wsssh-tools (1.3.0-1) unstable; urgency=medium
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment