Files
pyGoEdge-UserPanel/reference/goedge 文档/HTTPFirewallRuleSetService.md
2025-11-18 03:36:49 +08:00

148 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HTTPFirewallRuleSetService
> WAF规则集服务
---
## createOrUpdateHTTPFirewallRuleSetFromConfig
> 根据配置创建或修改规则集
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleSetService/createOrUpdateHTTPFirewallRuleSetFromConfig`
- RPC`rpc createOrUpdateHTTPFirewallRuleSetFromConfig (CreateOrUpdateHTTPFirewallRuleSetFromConfigRequest) returns (CreateOrUpdateHTTPFirewallRuleSetFromConfigResponse);`
**请求对象 (`CreateOrUpdateHTTPFirewallRuleSetFromConfigRequest`)**
```json
{
"firewallRuleSetConfigJSON": "bytes"
}
```
**响应对象 (`CreateOrUpdateHTTPFirewallRuleSetFromConfigResponse`)**
```json
{
"firewallRuleSetId": "int64"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleSetService/createOrUpdateHTTPFirewallRuleSetFromConfig" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findEnabledHTTPFirewallRuleSet
> 查找规则集信息
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleSetService/findEnabledHTTPFirewallRuleSet`
- RPC`rpc findEnabledHTTPFirewallRuleSet (FindEnabledHTTPFirewallRuleSetRequest) returns (FindEnabledHTTPFirewallRuleSetResponse);`
**请求对象 (`FindEnabledHTTPFirewallRuleSetRequest`)**
```json
{
"firewallRuleSetId": "int64"
}
```
**响应对象 (`FindEnabledHTTPFirewallRuleSetResponse`)**
```json
{
"firewallRuleSet": "HTTPFirewallRuleSet"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleSetService/findEnabledHTTPFirewallRuleSet" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findEnabledHTTPFirewallRuleSetConfig
> 查找规则集配置
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleSetService/findEnabledHTTPFirewallRuleSetConfig`
- RPC`rpc findEnabledHTTPFirewallRuleSetConfig (FindEnabledHTTPFirewallRuleSetConfigRequest) returns (FindEnabledHTTPFirewallRuleSetConfigResponse);`
**请求对象 (`FindEnabledHTTPFirewallRuleSetConfigRequest`)**
```json
{
"firewallRuleSetId": "int64"
}
```
**响应对象 (`FindEnabledHTTPFirewallRuleSetConfigResponse`)**
```json
{
"firewallRuleSetJSON": "bytes"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleSetService/findEnabledHTTPFirewallRuleSetConfig" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## updateHTTPFirewallRuleSetIsOn
> 设置开启状态
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPFirewallRuleSetService/updateHTTPFirewallRuleSetIsOn`
- RPC`rpc updateHTTPFirewallRuleSetIsOn (UpdateHTTPFirewallRuleSetIsOnRequest) returns (RPCSuccess);`
**请求对象 (`UpdateHTTPFirewallRuleSetIsOnRequest`)**
```json
{
"firewallRuleSetId": "int64",
"isOn": "bool // 是否启用"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPFirewallRuleSetService/updateHTTPFirewallRuleSetIsOn" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---