WebPanel
一个适用于 Minecraft 1.21.4 PaperMC/Spigot 的插件,用于创建 WebPanel。
此插件允许你通过网页修改服务器,包括添加、删除和下载文件,以及管理控制台。
抢先体验
此插件仍处于抢先体验阶段,可能包含漏洞或不安全因素。
功能也可能随时更改。
功能
以下是该 WebPanel 插件的当前功能。
WebPanel
- 管理服务器控制台
- 停止服务器
- 上传文件到服务器
- 从服务器下载文件
- 删除文件或目录
- 创建新文件夹
命令
目前尚无命令。
事件
目前尚无事件。
计划中
若要查看当前计划的功能,请访问 WebPanel GitHub 项目看板
安装
- 下载插件 jar 文件。
- 将 jar 文件放入 PaperMC/Spigot 服务器的
plugins 文件夹中。
- 重启服务器以加载插件。
使用方法
- 在插件的
config.yml 文件中,将你的 IP 地址添加到 allowedIPs 列表。
- 重启服务器以应用更改。(稍后将提供命令)
- 在浏览器中通过
http://<server-ip>:<server-port>/ 访问面板。
端点
这些端点目前由面板使用。它们可能尚未最终确定,且可能会发生更改。
| 端点 |
URL |
方法 |
请求头 |
参数 |
响应 |
| 获取文件 |
/getFiles |
GET |
Content-Type: application/x-www-form-urlencoded |
path |
200 OK: 成功获取文件列表
400 Bad Request: 缺少路径
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
500 Internal Server Error: 获取文件列表失败 |
| 上传文件 |
/uploadFile |
POST |
Authorization: Bearer <API_KEY>, Content-Type: multipart/form-data |
path, folderName |
200 OK: 文件上传成功
400 Bad Request: 请求体中未找到文件
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
500 Internal Server Error: 保存文件失败 |
| 删除文件 |
/deleteFile |
POST |
Authorization: Bearer <API_KEY>, Content-Type: application/x-www-form-urlencoded |
path |
200 OK: 文件或目录删除成功
400 Bad Request: 缺少文件路径
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
404 Not Found: 未找到文件
500 Internal Server Error: 删除文件或目录失败 |
| 创建文件夹 |
/createFolder |
POST |
Authorization: Bearer <API_KEY>, Content-Type: application/x-www-form-urlencoded |
path, folderName |
200 OK: 文件夹创建成功
400 Bad Request: 缺少路径或文件夹名称
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
500 Internal Server Error: 创建文件夹失败 |
| 下载文件 |
/downloadFile |
GET |
"Authorization": Bearer <API_KEY> |
path |
200 OK: 文件下载成功
400 Bad Request: 缺少文件路径
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
404 Not Found: 未找到文件
500 Internal Server Error: 下载文件失败 |
| 发送至控制台 |
/sendToConsole |
POST |
Authorization: Bearer <API_KEY>, Content-Type: application/x-www-form-urlencoded |
command |
200 OK: 命令发送成功
400 Bad Request: 缺少命令
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
500 Internal Server Error: 发送命令失败 |
| 获取控制台输出 |
/getConsoleOutput |
GET |
|
|
200 OK: 成功获取控制台输出
500 Internal Server Error: 获取控制台输出失败 |
| 获取玩家列表 |
/getPlayers |
GET |
|
|
200 OK: 成功获取玩家列表
500 Internal Server Error: 获取玩家列表失败 |
| 停止服务器 |
/stopServer |
POST |
Authorization: Bearer <API_KEY> |
|
200 OK: 服务器停止成功
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
500 Internal Server Error: 停止服务器失败 |
| 获取 API Key |
/getApiKey |
GET |
Authorization: IP Based (Config) |
|
200 OK: 成功获取 API Key
401 Unauthorized: 缺少或无效的 API Key
403 Forbidden: 禁止访问
500 Internal Server Error: 获取 API Key 失败 |
安全性
安全性可能会发生变化。这是出于用户在使用基于 IP 的安全性时的不便考虑。
- 使用 API Key 认证来保护端点。目前,只有插件配置文件
config.yml 中允许的 IP 才能访问 /getApiKey 端点。
- 执行 IP 地址验证以确保请求来自授权来源。
许可证
本项目目前尚无许可证。
目前保留所有权利。
不过,您可以通过 PR 提出修改建议
WebPanel
A Minecraft 1.21.4 PaperMC/Spigot Plugin that creates a WebPanel.
This plugin allows you to modify your server via the web, including adding, removing, and downloading files, as well as managing the console.
Early Access
This plugin is still in early access and may contain bugs or insecurities.
Features may also be subject to change.
Features
These are the current features of this WebPanel plugin.
WebPanel
- Manage the server console
- Stop the server
- Upload files to the server
- Download files from the server
- Delete files or directories
- Create new folders
Commands
There are no commands yet.
Events
There are no events yet.
Planned
To see what features are currently planned please check out the WebPanel GitHub project board
Installation
- Download the plugin jar file.
- Place the jar file in the
plugins folder of your PaperMC/Spigot server.
- Restart the server to load the plugin.
Usage
- Add your IP address to the
allowedIPs list in the plugins config.yml file.
- Restart the server to apply the changes. (Later there will be a command)
- Access the panel via
http://<server-ip>:<server-port>/ in your browser.
Endpoints
These endpoints are currently used by the panel. They may not yet be final and may be subject to change.
| Endpoint |
URL |
Method |
Headers |
Parameters |
Response |
| Get Files |
/getFiles |
GET |
Content-Type: application/x-www-form-urlencoded |
path |
200 OK: File list retrieved successfully
400 Bad Request: Missing path
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
500 Internal Server Error: Failed to retrieve file list |
| Upload File |
/uploadFile |
POST |
Authorization: Bearer <API_KEY>, Content-Type: multipart/form-data |
path, folderName |
200 OK: File uploaded successfully
400 Bad Request: File not found in request body
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
500 Internal Server Error: Failed to save file |
| Delete File |
/deleteFile |
POST |
Authorization: Bearer <API_KEY>, Content-Type: application/x-www-form-urlencoded |
path |
200 OK: File or directory deleted successfully
400 Bad Request: Missing file path
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
404 Not Found: File not found
500 Internal Server Error: Failed to delete file or directory |
| Create Folder |
/createFolder |
POST |
Authorization: Bearer <API_KEY>, Content-Type: application/x-www-form-urlencoded |
path, folderName |
200 OK: Folder created successfully
400 Bad Request: Missing path or folder name
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
500 Internal Server Error: Failed to create folder |
| Download File |
/downloadFile |
GET |
"Authorization": Bearer <API_KEY> |
path |
200 OK: File downloaded successfully
400 Bad Request: Missing file path
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
404 Not Found: File not found
500 Internal Server Error: Failed to download file |
| Send to Console |
/sendToConsole |
POST |
Authorization: Bearer <API_KEY>, Content-Type: application/x-www-form-urlencoded |
command |
200 OK: Command sent successfully
400 Bad Request: Missing command
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
500 Internal Server Error: Failed to send command |
| Get Console Output |
/getConsoleOutput |
GET |
|
|
200 OK: Console output retrieved successfully
500 Internal Server Error: Failed to retrieve console output |
| Get Players |
/getPlayers |
GET |
|
|
200 OK: Player list retrieved successfully
500 Internal Server Error: Failed to retrieve player list |
| Stop Server |
/stopServer |
POST |
Authorization: Bearer <API_KEY> |
|
200 OK: Server stopped successfully
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
500 Internal Server Error: Failed to stop server |
| Get API Key |
/getApiKey |
GET |
Authorization: IP Based (Config) |
|
200 OK: API Key retrieved successfully
401 Unauthorized: Missing or invalid API Key
403 Forbidden: Forbidden
500 Internal Server Error: Failed to retrieve API Key |
Security
Security may be subject to change. This is due the user inconvenience of IP based security.
- API Key authentication is used to secure the endpoints. For now only permitted IPs in the plugins config.yml can access the
/getApiKey endpoint.
- IP address validation is performed to ensure requests are from authorized sources.
License
This project currently has no license yet.
For now all rights are reserved.
You may however suggest changes via PRs
评论 0
登录后参与评分
还没有评论,来抢沙发吧