Skip to content

Commit ef9b30c

Browse files
[+] Added DeleteBotHandler for deleting bots in web dashboard.
[+] Supported to implement custom command serializer. [+] Supported to delete bots when running. [#] Updated README [+] Synchronized chinese README_CN.md with README.md
1 parent 1392c6e commit ef9b30c

25 files changed

+474
-217
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@
5252
- Easy to register custom commands starting with `!` by using CommandBuilder DolphinAPIs.
5353
- Can **hot-inject** plugins during the connection of server.
5454
- Bypassing human verification in most servers including `2b2t.xin`.
55-
- Supporting to configure the bot clusters, and start at once.
55+
- Supporting to configure bot clusters, and start at once.
5656
- Supporting colourful console logging strings expression `colorizeText("&6Hello &lWorld")`.
5757
- Automatic answer questions in `2b2t.xin` for speeding up login process.
5858
- Supporting to configure proxy settings for multiple bots.
59+
- **Web Console API** - Built-in HTTP API server for remote bot management and control.
60+
- **Real-time Log Streaming** - WebSocket-based log streaming with ANSI color support.
61+
- **Tab Completion** - Auto-completion support in web terminal, same as desktop experience.
62+
- **Multi-terminal Management** - Independent terminal instances for each bot with tab-based switching.
5963

6064
## Screenshots:
6165
### Running on Windows server 2019:
@@ -69,6 +73,7 @@
6973
- [`Terminal Interactions`](#interactions-in-terminal)
7074
- [`Packet Debugger`](#config-file-setting)
7175
- [`Proxy Settings`](#config-file-setting)
76+
- [`DolphinBot Web Dashboard`](#web-console)
7277

7378
**Implemented Event APIs:**
7479
- [`Programmable State Machine`](PluginDocs.md#3-programmable-login-state-machine)
@@ -84,8 +89,8 @@
8489
-
8590
| Terminal Commands | Description |
8691
|:--------------------------------------------:|-----------------------------------------------------|
87-
| `reload <Plugin Name> <bot name (optional)>` | Hot-reloading a specified plugin |
88-
| `load <PLugin Name> <bot name (optional)>` | Hot-loading a specified plugin |
92+
| `reload <plugin Name> [bot name]` | Hot-reloading a specified plugin |
93+
| `load <pLugin Name> [bot name]` | Hot-loading a specified plugin |
8994
| `respawn` | Respawn the bot when in game. |
9095
| `license` (`l`, `lic`) | Show the license on the terminal |
9196
| `help` (`h`, `?`) | Show the Command menu and usages for each command |
@@ -98,6 +103,7 @@ In this section, you will understand below how-tos:
98103
- **3. How to start multiple bot simultaneously with proxy settings**
99104
- **4. How to configure advanced options**
100105
- **5. How to make a custom plugin**
106+
- **6. How to use Web Console for remote management**
101107

102108
1. **Download the Client**
103109
Download the jar archive file: `DolphinBot-[version]-full.jar`.
@@ -328,6 +334,53 @@ Dolphin bot supports you to **hot-reload** and **hot-load** (**hot injection**)
328334
You can send `!reload <pluginName>` dolphin command in server chat.
329335
Alternatively, you can type `reload plugin.jar` in the terminal to hot-reload plugins.
330336
337+
## Web Console
338+
DolphinBot now includes a built-in Web Console for remote bot management and control. This allows you to manage your bots through a modern web interface without needing direct terminal access.
339+
340+
### Starting the Web Console
341+
To enable the Web Console, simply add the `--api` parameter when starting DolphinBot:
342+
343+
```bash
344+
java -jar "DolphinBot-[version]-full.jar" --api [port]
345+
```
346+
347+
The API server will start on the specified port (default: 25560), and the WebSocket log server will start on port+1 (default: 25561).
348+
349+
### Web Console Features
350+
- **Bot Management Dashboard** - View all bot instances with real-time status, game mode, and position
351+
- **Independent Terminals** - Each bot has its own terminal instance with tab-based switching
352+
- **Real-time Log Streaming** - All logs are streamed to the web terminal with full ANSI color support
353+
- **Tab Completion** - Auto-completion works exactly like the desktop terminal
354+
- **Modern UI/UX** - Beautiful modal dialogs, toast notifications, and responsive design
355+
- **Bot Statistics** - Visual circular progress showing online rate with color-coded status
356+
357+
### Accessing the Web Console
358+
Once the API server is running, you can access the Web Console at:
359+
```
360+
http://localhost:8080
361+
```
362+
363+
The Web Console is provided as a separate Spring Boot application located in the `web-console/` directory. See [Web Console Documentation](web-console/README.md) for detailed setup and usage instructions.
364+
365+
### API Endpoints
366+
The built-in HTTP API provides the following endpoints:
367+
368+
| Endpoint | Method | Description |
369+
|-----------|----------|--------------------------|
370+
| `/api/health` | GET | Health check |
371+
| `/api/bots` | GET | List all bots |
372+
| `/api/bots/start` | POST | Start a bot |
373+
| `/api/bots/stop` | POST | Stop a bot |
374+
| `/api/bots/send-command` | POST | Send command to a bot |
375+
| `/api/config` | GET/POST | Get/Update configuration |
376+
| `/api/bot/create` | POST | create new bot |
377+
| `/api/bot/delete` | POST | delete specified bot |
378+
379+
### WebSocket Endpoints
380+
| Endpoint | Description |
381+
|-----------|-------------|
382+
| `ws://localhost:25561` | Log streaming and tab completion |
383+
331384
## FAQ
332385
333386
- Can I make my plugin for dolphin bot?

0 commit comments

Comments
 (0)