diff --git a/docs/api.md b/docs/api.md index fb3c8c7..bd74727 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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 **Endpoint:** `/frpcAct/instanceMgr/list`