Path: 宝塔面板 API 参考 › Proxy 反向代理

`POST /mod/proxy/com/set_site_stop/stype`

启用（运行中）或停用（已停止）反向代理站点。

## Request body

_Required._

- `opPostModProxyComSetSiteStopStype.request_time` (string, required) — Unix 时间戳；与接口密钥一起生成 request_token。
- `opPostModProxyComSetSiteStopStype.request_token` (string, required) — 按 API 概览中的双重 MD5 签名算法生成。
- `opPostModProxyComSetSiteStopStype.site_name` (string, required) — 站点名称
- `opPostModProxyComSetSiteStopStype.site_id` (integer, required) — 站点 ID
- `opPostModProxyComSetSiteStopStype.site_status/d` (integer, required) — 0 停用，1 启用

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "site_name": "string",
  "site_id": 0,
  "site_status/d": 0
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/mod/proxy/com/set_site_stop/stype" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "site_name=<site_name>" \
  --data-urlencode "site_id=<site_id>" \
  --data-urlencode "site_status/d=<site_status/d>" \
  --data-urlencode "action=set_site_stop"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "code": 0,
  "status": true,
  "msg": "设置成功！"
}
```


## set_site_stop

启用（运行中）或停用（已停止）反向代理站点。

- **路由**：`POST /mod/proxy/com/set_site_stop/stype`
- **action**：`set_site_stop`

## 输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| site_name | 是 | string | 站点名称 |
| site_id | 是 | int | 站点 ID |
| site_status/d | 是 | int | 0 停用，1 启用 |

## 示例

### 请求（停用）
```bash
curl -X POST ".../mod/proxy/com/set_site_stop/stype" \
  -d "site_name=example.com&site_id=24&site_status=0"
```

### 请求（启用）
```bash
curl -X POST ".../mod/proxy/com/set_site_stop/stype" \
  -d "site_name=example.com&site_id=24&site_status=1"
```

### 响应
```json
{"code": 0, "status": true, "msg": "设置成功！"}
```

