chore: update documentation
This commit is contained in:
parent
4baff571de
commit
c48fadba08
3 changed files with 158 additions and 15 deletions
152
CONFIG.md
Normal file
152
CONFIG.md
Normal file
|
@ -0,0 +1,152 @@
|
|||
# Breaking Changes in Configuration Format
|
||||
|
||||
This document outlines the breaking changes and updates to the configuration format between versions. These changes require manual updates to your existing `config.json` files.
|
||||
|
||||
## Major Structure Changes
|
||||
|
||||
### Removed Sections
|
||||
The following sections have been completely removed:
|
||||
- `socketio` - Socket.IO configuration is now handled internally
|
||||
- `terminal` - Terminal configuration moved to client-side
|
||||
- `serverlog` - Logging configuration simplified
|
||||
- `algorithms` - Moved under the `ssh` section
|
||||
- `accesslog` - Removed
|
||||
- `verify` - Removed
|
||||
- `safeShutdownDuration` - Removed
|
||||
|
||||
### Renamed and Restructured Sections
|
||||
|
||||
#### HTTP Configuration
|
||||
- Old: `socketio.origins`
|
||||
- New: `http.origins`
|
||||
```diff
|
||||
- "socketio": {
|
||||
- "serveClient": false,
|
||||
- "path": "/ssh/socket.io",
|
||||
- "origins": ["localhost:2222"]
|
||||
- }
|
||||
+ "http": {
|
||||
+ "origins": ["*.*"]
|
||||
+ }
|
||||
```
|
||||
|
||||
#### SSH Algorithms
|
||||
- Old: Root-level `algorithms` object
|
||||
- New: Moved to `ssh.algorithms`
|
||||
```diff
|
||||
- "algorithms": {
|
||||
+ "ssh": {
|
||||
+ "algorithms": {
|
||||
"kex": [...],
|
||||
"cipher": [...],
|
||||
"hmac": [...],
|
||||
"compress": [...]
|
||||
+ "serverHostKey": [...]
|
||||
}
|
||||
+ }
|
||||
```
|
||||
|
||||
#### Session Configuration
|
||||
```diff
|
||||
"session": {
|
||||
- "name": "WebSSH2",
|
||||
+ "name": "webssh2",
|
||||
"secret": "secret"
|
||||
}
|
||||
```
|
||||
|
||||
### New Options
|
||||
|
||||
#### SSH Configuration
|
||||
Added under the `ssh` section:
|
||||
```json
|
||||
{
|
||||
"ssh": {
|
||||
"alwaysSendKeyboardInteractivePrompts": false,
|
||||
"disableInteractiveAuth": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Feature Options
|
||||
Renamed and expanded options:
|
||||
```diff
|
||||
"options": {
|
||||
"challengeButton": true,
|
||||
- "allowreauth": false
|
||||
+ "autoLog": false,
|
||||
+ "allowReauth": true,
|
||||
+ "allowReconnect": true,
|
||||
+ "allowReplay": true
|
||||
}
|
||||
```
|
||||
|
||||
## Detailed Changes
|
||||
|
||||
### 1. Authentication Options
|
||||
- Added support for SSH private key authentication via `user.privatekey`
|
||||
- Removed `user.overridebasic` option
|
||||
- Added keyboard-interactive authentication controls
|
||||
|
||||
### 2. Server Settings
|
||||
- Default port changed from 2224 to 2222
|
||||
- Socket.IO path is now fixed at "/ssh/socket.io"
|
||||
- Added server host key algorithm configurations
|
||||
|
||||
### 3. Terminal Configuration
|
||||
All terminal-specific configurations have been removed from server config:
|
||||
```diff
|
||||
- "terminal": {
|
||||
- "cursorBlink": true,
|
||||
- "scrollback": 10000,
|
||||
- "tabStopWidth": 8,
|
||||
- "bellStyle": "sound",
|
||||
- "fontSize": 14
|
||||
- }
|
||||
```
|
||||
These settings are now managed client-side.
|
||||
|
||||
## Migration Guide
|
||||
|
||||
1. Create a new `config.json` file based on the new format
|
||||
2. Move your existing settings to their new locations
|
||||
3. Remove any deprecated options
|
||||
4. Add new required options
|
||||
5. Test your configuration before deploying to production
|
||||
|
||||
## Default Configuration Example
|
||||
|
||||
```json
|
||||
{
|
||||
"listen": {
|
||||
"ip": "0.0.0.0",
|
||||
"port": 2222
|
||||
},
|
||||
"http": {
|
||||
"origins": ["*.*"]
|
||||
},
|
||||
"user": {
|
||||
"name": null,
|
||||
"password": null,
|
||||
"privatekey": null
|
||||
},
|
||||
"ssh": {
|
||||
"host": null,
|
||||
"port": 22,
|
||||
"term": "xterm-color",
|
||||
"readyTimeout": 20000,
|
||||
"keepaliveInterval": 120000,
|
||||
"keepaliveCountMax": 10,
|
||||
"algorithms": {
|
||||
// ... algorithm configurations ...
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"challengeButton": true,
|
||||
"autoLog": false,
|
||||
"allowReauth": true,
|
||||
"allowReconnect": true,
|
||||
"allowReplay": true
|
||||
}
|
||||
}
|
||||
```
|
|
@ -4,16 +4,7 @@ This document outlines features, configuration options, and parameters that have
|
|||
|
||||
## Removed `config.json` Options
|
||||
|
||||
The following configuration options have been **removed** from `config.json`:
|
||||
|
||||
### Terminal Configuration
|
||||
|
||||
The following options have been replaced with client-side terminal configuration handling in the browser:
|
||||
|
||||
- `terminal.cursorBlink` (boolean): Whether the cursor blinks.
|
||||
- `terminal.scrollback` (integer): Scrollback limit.
|
||||
- `terminal.tabStopWidth` (integer): Tab stop width.
|
||||
- `terminal.bellStyle` (string): Bell style.
|
||||
See [CONFIG.md](./CONFIG.md) for a list of removed or changed options.
|
||||
|
||||
### Logging Configuration
|
||||
|
||||
|
|
10
README.md
10
README.md
|
@ -11,13 +11,13 @@ WebSSH2 is an HTML5 web-based terminal emulator and SSH client. It uses SSH2 as
|
|||
## Table of Contents
|
||||
|
||||
- [Requirements](#requirements)
|
||||
- [Breaking Changes](#breaking-changes)
|
||||
- [Installation](#installation)
|
||||
- [Docker Setup](#docker-setup)
|
||||
- [Usage](#usage)
|
||||
- [Configuration](#configuration)
|
||||
- [Features](#features)
|
||||
- [Routes](#routes)
|
||||
- [Deprecation Notice](#deprecation-notice)
|
||||
- [Client-Side Module](#client-side-module)
|
||||
- [Tips](#tips)
|
||||
- [Support](#support)
|
||||
|
@ -26,6 +26,10 @@ WebSSH2 is an HTML5 web-based terminal emulator and SSH client. It uses SSH2 as
|
|||
|
||||
- Node.js 6.9.1
|
||||
|
||||
## Breaking Changes
|
||||
- See [CONFIG.md](./CONFIG.md) for a list of breaking changes to the config.json file.
|
||||
- See [DEPRECATED.md](./DEPRECATED.md) for a list of deprecated options.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Clone the repository:
|
||||
|
@ -391,10 +395,6 @@ WebSSH2 provides two main routes:
|
|||
- Quick connections to specific hosts
|
||||
- Optional `port` parameter (e.g., `?port=2222`)
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
Several configuration options and GET parameters have been deprecated. For a list of removed options and required actions, please refer to [DEPRECATED.md](./DEPRECATED.md).
|
||||
|
||||
## Client-Side Module
|
||||
WebSSH2 uses a companion module called `webssh2_client` which provides the browser-side terminal interface and WebSocket communication layer.
|
||||
|
||||
|
|
Loading…
Reference in a new issue