Path: API › Proxy 反向代理

`POST /mod/proxy/com/{action}/stype`

获取和保存反向代理站点的 Nginx 配置（http_block / server_block）。

## Path parameters

- `action` (`action210.path.action`; string, required) — 具体操作名称，参见下方原始接口文档。

## Request body

_Required._

- `request_time` (`action210.request_time`; string, required) — Unix 时间戳。
- `request_token` (`action210.request_token`; string, required) — 按 API 概览生成的签名。
- `site_name` (`action210.site_name`; string, required) — 站点名称

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "site_name": "string"
}
```

## Code samples

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

```bash
curl --request POST \
  --url "https://your-panel.example.com:8888/mod/proxy/com/<action>/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>"
```

## Responses

### default

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

#### Example

```json
{
  "code": 0,
  "status": true,
  "msg": "保存成功！"
}
```

- `site_conf` (`action210.response.default.data.site_conf`; string, optional) — 完整 Nginx 配置文件内容
- `http_block` (`action210.response.default.data.http_block`; string, optional) — http 块自定义配置
- `server_block` (`action210.response.default.data.server_block`; string, optional) — server 块自定义配置
- `ssl_conf` (`action210.response.default.data.ssl_conf`; string, optional) — SSL 配置


## save_config / get_config

获取和保存反向代理站点的 Nginx 配置（http_block / server_block）。

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

---

## get_config — 获取配置

### 输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| site_name | 是 | string | 站点名称 |

### 输出参数
| 参数名称 | 类型 | 描述 |
|----------|------|------|
| data.site_conf | string | 完整 Nginx 配置文件内容 |
| data.http_block | string | http 块自定义配置 |
| data.server_block | string | server 块自定义配置 |
| data.ssl_conf | string | SSL 配置 |

---

## save_config — 保存配置

### 输入参数
| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| site_name | 是 | string | 站点名称 |
| conf_type | 是 | string | 配置类型：`http_block` 或 `server_block` |
| body | 是 | string | 配置内容 |

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

