docs(api): add delete proxy endpoint documentation
Add documentation for the new DELETE proxy endpoint including request/response formats, headers, and important notes about the operation.
This commit is contained in:
+63
@@ -721,6 +721,69 @@ remote_port = 6000
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Delete Proxy
|
||||||
|
|
||||||
|
**Endpoint:** `/frpcAct/proxyMgr/delete`
|
||||||
|
**Method:** POST
|
||||||
|
**Content-Type:** application/json
|
||||||
|
**Auth Required:** Yes (token)
|
||||||
|
**Permission Level:** Admin
|
||||||
|
|
||||||
|
Delete an existing proxy configuration from an frpc instance. The proxy configuration will be removed from the instance's config file.
|
||||||
|
|
||||||
|
**Request Headers:**
|
||||||
|
```
|
||||||
|
X-Token: your_token
|
||||||
|
X-Timestamp: 1704067200000
|
||||||
|
```
|
||||||
|
|
||||||
|
**Request Body:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"instanceID": "1",
|
||||||
|
"proxyName": "ssh_proxy"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Header | Type | Required | Description |
|
||||||
|
|--------|------|----------|-------------|
|
||||||
|
| X-Token | string | Yes | Authentication token |
|
||||||
|
| X-Timestamp | int64 | Yes | Client timestamp in milliseconds |
|
||||||
|
|
||||||
|
| Field | Type | Required | Description |
|
||||||
|
|-------|------|----------|-------------|
|
||||||
|
| instanceID | string | Yes | Instance ID (the ID of the frpc instance) |
|
||||||
|
| proxyName | string | Yes | Name of the proxy to delete |
|
||||||
|
|
||||||
|
**Response:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"success": true,
|
||||||
|
"message": "Proxy deleted successfully",
|
||||||
|
"data": {
|
||||||
|
"instanceName": "my_frpc",
|
||||||
|
"instanceID": 1,
|
||||||
|
"configPath": "./configs/superfrpc_user_my_frpc.toml",
|
||||||
|
"proxyName": "ssh_proxy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Field | Type | Description |
|
||||||
|
|-------|------|-------------|
|
||||||
|
| instanceName | string | Name of the frpc instance |
|
||||||
|
| instanceID | int | Instance ID |
|
||||||
|
| configPath | string | Path to the configuration file |
|
||||||
|
| proxyName | string | Name of the deleted proxy |
|
||||||
|
|
||||||
|
> **Note:**
|
||||||
|
> - The proxy configuration is removed from the existing config file
|
||||||
|
> - The instance must already exist before deleting a proxy
|
||||||
|
> - This endpoint does not modify the database, only the config file
|
||||||
|
> - The frpc service needs to be restarted for changes to take effect
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## List frpc Instances
|
## List frpc Instances
|
||||||
|
|
||||||
**Endpoint:** `/frpcAct/instanceMgr/list`
|
**Endpoint:** `/frpcAct/instanceMgr/list`
|
||||||
|
|||||||
Reference in New Issue
Block a user