Update documentation for new operating modes

- Updated README.md with comprehensive operating mode descriptions
- Added detailed usage examples for all modes (interactive, silent, bridge, script, daemon)
- Updated CHANGELOG.md with version 1.6.0 featuring new operating modes
- Updated TODO.md with completed items and new feature descriptions
- Updated DOCUMENTATION.md with operating mode details and API documentation
- Enhanced man pages with new command-line options
- Updated configuration examples to include new [wssht] section options
- Comprehensive documentation coverage for all new features
parent 5e5d32e5
......@@ -5,6 +5,74 @@ 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.6.0] - 2025-09-18
### Added
- **Multiple Operating Modes**: Complete implementation of various operating modes for wsssht
- **Interactive Mode**: Standard interactive SSH/SCP sessions (default)
- **Silent Mode**: Suppresses all informational output for automation
- **Bridge Mode**: JSON-based communication over stdin/stdout for programmatic use
- **Script Mode**: JSON protocol with status updates and command processing
- **Daemon Mode**: Lazy tunnel initialization for resource efficiency
- **Bridge Mode Implementation**: JSON stdin/stdout interface
- Real-time JSON status updates during tunnel establishment
- Command processing from stdin with JSON responses
- Structured error reporting and connection status
- Perfect for programmatic integration and automation
- **Script Mode Implementation**: JSON protocol for scripting
- Periodic status updates (every 30 seconds)
- Script command processing (`status`, `quit`, `exit`)
- Timestamped events for monitoring and logging
- JSON-formatted output for easy parsing by scripts
- **Daemon Mode Implementation**: Lazy tunnel initialization
- Waits for first connection attempt before establishing tunnel
- Resource-efficient operation with on-demand tunnel creation
- Seamless transition to normal operation after first connection
- Reduced resource usage for intermittent connections
- **Configuration Support**: Extended config file support for new modes
- `mode` and `daemon` options in `[wssht]` section
- Command-line options override config file values
- Backward compatibility with existing configurations
### Enhanced
- **Command-Line Interface**: Extended CLI with new operating mode options
- `--mode` option with values: interactive, silent, bridge, script
- Shortcut options: `--silent`, `--bridge`, `--script`, `--daemon`
- Comprehensive help text and usage examples
- Updated man pages with new option documentation
- **Configuration System**: Enhanced configuration file support
- New `[wssht]` section for wsssht-specific options
- Support for mode and daemon configuration
- Updated example configuration files
- **Error Handling**: Improved error handling and user feedback
- Better validation of operating mode parameters
- Clear error messages for invalid configurations
- Graceful handling of mode-specific errors
### Technical Details
- **Mode Architecture**: Extensible operating mode system
- Clean separation of mode-specific logic
- Shared infrastructure for all operating modes
- Consistent behavior across different modes
- **JSON Protocol**: Standardized JSON message format
- Structured status updates and error reporting
- Timestamped events for monitoring
- Easy integration with external tools and scripts
- **Resource Management**: Optimized resource usage
- Lazy initialization reduces startup overhead
- Efficient memory management across all modes
- Proper cleanup and resource deallocation
### Documentation
- **README.md**: Updated with comprehensive operating mode documentation
- Detailed descriptions of each operating mode
- Usage examples for all modes
- Configuration examples and best practices
- **Man Pages**: Enhanced manual pages with new options
- Complete documentation of all new command-line options
- Updated examples and configuration sections
- Clear explanations of operating mode differences
## [1.5.0] - 2025-09-17
### Added
......
......@@ -47,8 +47,56 @@ WebSocket SSH (wsssh) is a tunneling system that enables secure SSH/SCP access t
- **Process Exit Handling**: Fixed critical process hanging issues
- **Code Architecture**: Modular design with shared libraries for better maintainability
- **Cross-platform**: Works on Linux, macOS, and Windows
- **Multiple Operating Modes**: Interactive, silent, bridge, script, and daemon modes
- **Bridge Mode**: JSON-based communication over stdin/stdout for programmatic use
- **Script Mode**: JSON protocol with status updates and command processing
- **Daemon Mode**: Lazy tunnel initialization for resource efficiency
- **Donation Support**: Community funding through PayPal and cryptocurrency
## Operating Modes
wsssht supports multiple operating modes to accommodate different use cases and integration requirements:
### Interactive Mode (Default)
The standard operating mode providing full interactive SSH/SCP sessions with user-friendly output and progress indicators.
### Silent Mode
```bash
wsssht --silent --clientid myclient --wssshd-host example.com
```
Suppresses all informational output, making it ideal for automation scripts and background operations where only error messages should be displayed.
### Bridge Mode
```bash
wsssht --bridge --clientid myclient --wssshd-host example.com
```
Provides a JSON-based interface for programmatic integration:
- Receives JSON commands from stdin
- Sends JSON status updates and responses to stdout
- Perfect for integration with other tools and automation frameworks
- Structured error reporting and connection status updates
### Script Mode
```bash
wsssht --script --clientid myclient --wssshd-host example.com
```
Designed for scripting environments with:
- JSON protocol for all communications
- Periodic status updates (every 30 seconds)
- Script command processing (`status`, `quit`, `exit`)
- Timestamped events for monitoring and logging
- Easy parsing by external scripts and monitoring tools
### Daemon Mode
```bash
wsssht --daemon --clientid myclient --wssshd-host example.com
```
Implements lazy tunnel initialization:
- Waits for the first connection attempt before establishing the tunnel
- Reduces resource usage for intermittent connections
- Maintains full functionality after tunnel establishment
- Ideal for resource-constrained environments
## Architecture
### System Architecture
......@@ -387,10 +435,18 @@ wssshc --server-ip IP --port PORT --id ID --password PASS [--interval SEC] [--de
```bash
wsssh user@client.domain -p PORT [SSH_OPTIONS...]
wsssh --clientid myclient --wssshd-host example.com [--mode MODE]
```
- `-p PORT`: wssshd server port
- `--local-port PORT`: Local tunnel port (default: auto)
- `--clientid ID`: Client ID for the tunnel (required in new format)
- `--wssshd-host HOST`: wssshd server hostname (required in new format)
- `--mode MODE`: Operating mode (interactive, silent, bridge, script)
- `--silent`: Shortcut for silent mode
- `--bridge`: Shortcut for bridge mode
- `--script`: Shortcut for script mode
- `--daemon`: Enable daemon mode (lazy initialization)
- `--debug`: Enable debug output
#### wsscp (C SCP Wrapper)
......
......@@ -26,6 +26,10 @@ A modern SSH tunneling system that uses WebSocket connections to securely route
- **Watchdog Monitoring**: Automatic daemon restart and high availability
- **Enterprise Reliability**: Professional process supervision and monitoring
- **Advanced Logging**: Automatic log rotation with logrotate for all daemons
- **Multiple Operating Modes**: Interactive, silent, bridge, script, and daemon modes
- **Bridge Mode**: JSON-based communication over stdin/stdout for programmatic use
- **Script Mode**: JSON protocol with status updates and command processing
- **Daemon Mode**: Lazy tunnel initialization for resource efficiency
- **Donation Support**: Community funding through PayPal and cryptocurrency
## Architecture
......@@ -53,13 +57,17 @@ Located in the `wssshtools/` directory:
- Optimized for embedded systems
2. **`wsssh`** - SSH wrapper with tunneling
- Simplified CLI (no need to specify "ssh" command)
- Parses SSH commands and hostnames intelligently
- Establishes WebSocket tunnels automatically
- Launches SSH to local tunnel port
- Uses shared libraries for WebSocket, SSL, and tunnel management
- Direct system integration, no Python runtime required
- High performance for production use
- Simplified CLI (no need to specify "ssh" command)
- Parses SSH commands and hostnames intelligently
- Establishes WebSocket tunnels automatically
- Launches SSH to local tunnel port
- Uses shared libraries for WebSocket, SSL, and tunnel management
- Direct system integration, no Python runtime required
- High performance for production use
- **Multiple Operating Modes**: Interactive, silent, bridge, script, and daemon modes
- **Bridge Mode**: JSON-based communication over stdin/stdout for programmatic use
- **Script Mode**: JSON protocol with status updates and command processing
- **Daemon Mode**: Lazy tunnel initialization for resource efficiency
3. **`wsscp`** - SCP wrapper with tunneling
- Simplified CLI (no need to specify "scp" command)
......@@ -205,6 +213,37 @@ This automatically:
- Requests tunnel to client `myclient`
- Opens local port and launches `ssh user@localhost`
## Operating Modes
wsssht supports multiple operating modes for different use cases:
### Interactive Mode (Default)
Standard interactive SSH/SCP sessions with full user interface.
### Silent Mode
```bash
./wsssh --silent --clientid myclient --wssshd-host example.com
```
Suppresses all informational output, perfect for scripts and automation.
### Bridge Mode
```bash
./wsssh --bridge --clientid myclient --wssshd-host example.com
```
JSON-based communication over stdin/stdout for programmatic use. Receives JSON commands from stdin and sends JSON responses to stdout.
### Script Mode
```bash
./wsssh --script --clientid myclient --wssshd-host example.com
```
JSON protocol with status updates and command processing. Provides periodic status updates and accepts script commands.
### Daemon Mode
```bash
./wsssh --daemon --clientid myclient --wssshd-host example.com
```
Lazy tunnel initialization - waits for first connection attempt before establishing the tunnel, conserving resources.
## Hostname Format
The system uses intelligent hostname parsing with config file support:
......
# WebSocket SSH - Future Enhancements Roadmap
## Recently Completed (v1.6.0)
- [x] **Multiple Operating Modes**: Complete implementation of various operating modes for wsssht
- **Interactive Mode**: Standard interactive SSH/SCP sessions (default)
- **Silent Mode**: Suppresses all informational output for automation
- **Bridge Mode**: JSON-based communication over stdin/stdout for programmatic use
- **Script Mode**: JSON protocol with status updates and command processing
- **Daemon Mode**: Lazy tunnel initialization for resource efficiency
- [x] **Bridge Mode Implementation**: JSON stdin/stdout interface
- Real-time JSON status updates during tunnel establishment
- Command processing from stdin with JSON responses
- Structured error reporting and connection status
- Perfect for programmatic integration and automation
- [x] **Script Mode Implementation**: JSON protocol for scripting
- Periodic status updates (every 30 seconds)
- Script command processing (`status`, `quit`, `exit`)
- Timestamped events for monitoring and logging
- JSON-formatted output for easy parsing by scripts
- [x] **Daemon Mode Implementation**: Lazy tunnel initialization
- Waits for first connection attempt before establishing tunnel
- Resource-efficient operation with on-demand tunnel creation
- Seamless transition to normal operation after first connection
- Reduced resource usage for intermittent connections
- [x] **Configuration Support**: Extended config file support for new modes
- `mode` and `daemon` options in `[wssht]` section
- Command-line options override config file values
- Backward compatibility with existing configurations
- [x] **Command-Line Interface**: Extended CLI with new operating mode options
- `--mode` option with values: interactive, silent, bridge, script
- Shortcut options: `--silent`, `--bridge`, `--script`, `--daemon`
- Comprehensive help text and usage examples
- Updated man pages with new option documentation
- [x] **Documentation Updates**: Comprehensive documentation for new features
- Updated README.md with operating mode descriptions and examples
- Updated CHANGELOG.md with detailed feature descriptions
- Updated man pages with new option documentation
- Updated configuration examples
## Recently Completed (v1.5.0)
- [x] **Peer-to-Peer Tunneling Architecture**: Complete implementation of advanced tunneling system
- Added `--tunnel` option to wsssh and wsscp for data channel transport specification
......
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