feat(sys): add self-check functionality for system settings and frpc binary

This commit is contained in:
2026-05-07 21:07:16 +08:00
parent 44195c9f26
commit 9ffb4263cf
5 changed files with 115 additions and 14 deletions
+39
View File
@@ -20,6 +20,7 @@ All API responses are returned in JSON format:
```
**Important Notes:**
- All endpoints are relative to the base URL `/api`
- For all requests: Authentication token and timestamp are sent in HTTP headers (prefixed with `X-`)
- For **POST** requests: Other data is sent in the request body as JSON
- For **GET** requests: All data is sent in HTTP headers (prefixed with `X-`)
@@ -90,6 +91,44 @@ Get software version and build information.
---
## Self Check
**Endpoint:** `/system/selfCheck`
**Method:** POST
**Content-Type:** application/json
**Permission Level:** Visitor
Check the system configuration and frpc binary.
**Request Headers:**
```
X-Token: your_token
X-Timestamp: 1704067200000
```
| Header | Type | Required | Description |
|--------|------|----------|-------------|
| X-Token | string | Yes | Authentication token |
| X-Timestamp | int64 | Yes | Client timestamp in milliseconds |
**Response (Success):**
```json
{
"success": true,
"message": "Self check passed"
}
```
> If there were any errors, the response will be in error format.
**Response (Error):**
```json
{
"success": false,
"message": "error message"
}
```
---
## Register User
**Endpoint:** `/register`