99 lines
2.2 KiB
Markdown
99 lines
2.2 KiB
Markdown
# FirewallService
|
||
> 防火墙全局服务
|
||
|
||
---
|
||
|
||
## composeFirewallGlobalBoard
|
||
> 组合看板数据
|
||
|
||
- 角色:`admin`
|
||
- HTTP:`POST https://backend.dooki.cloud/FirewallService/composeFirewallGlobalBoard`
|
||
- RPC:`rpc composeFirewallGlobalBoard (ComposeFirewallGlobalBoardRequest) returns (ComposeFirewallGlobalBoardResponse);`
|
||
|
||
**请求对象 (`ComposeFirewallGlobalBoardRequest`)**
|
||
|
||
```json
|
||
{}
|
||
```
|
||
|
||
**响应对象 (`ComposeFirewallGlobalBoardResponse`)**
|
||
|
||
```json
|
||
{
|
||
"countDailyLogs": "int64",
|
||
"countDailyBlocks": "int64",
|
||
"countDailyCaptcha": "int64",
|
||
"countWeeklyBlocks": "int64",
|
||
"httpFirewallRuleGroups": "[]HTTPFirewallRuleGroupStat",
|
||
"dailyStats": "[]DailyStat",
|
||
"hourlyStats": "[]HourlyStat",
|
||
"topNodeStats": "[]NodeStat",
|
||
"topDomainStats": "[]DomainStat",
|
||
"topCountryStats": "[]CountryStat",
|
||
"httpFirewallRuleGroup": "HTTPFirewallRuleGroup",
|
||
"count": "int64 // 数量",
|
||
"hour": "string",
|
||
"countLogs": "int64",
|
||
"countCaptcha": "int64",
|
||
"countBlocks": "int64",
|
||
"day": "string",
|
||
"nodeId": "int64 // 节点ID",
|
||
"nodeName": "string",
|
||
"countRequests": "int64",
|
||
"bytes": "int64",
|
||
"countAttackRequests": "int64",
|
||
"attackBytes": "int64",
|
||
"serverId": "int64 // 服务ID(网站ID)",
|
||
"domain": "string",
|
||
"countryName": "string",
|
||
"percent": "float // 流量占比"
|
||
}
|
||
```
|
||
|
||
**调用示例**
|
||
|
||
```bash
|
||
curl -X POST "https://backend.dooki.cloud/FirewallService/composeFirewallGlobalBoard" \
|
||
-H "Content-Type: application/json" \
|
||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||
-d '{
|
||
...
|
||
}'
|
||
```
|
||
|
||
---
|
||
|
||
## countFirewallDailyBlocks
|
||
> 读取当前Block动作次数
|
||
|
||
- 角色:`admin`
|
||
- HTTP:`POST https://backend.dooki.cloud/FirewallService/countFirewallDailyBlocks`
|
||
- RPC:`rpc countFirewallDailyBlocks(CountFirewallDailyBlocksRequest) returns (CountFirewallDailyBlocksResponse);`
|
||
|
||
**请求对象 (`CountFirewallDailyBlocksRequest`)**
|
||
|
||
```json
|
||
{}
|
||
```
|
||
|
||
**响应对象 (`CountFirewallDailyBlocksResponse`)**
|
||
|
||
```json
|
||
{
|
||
"countBlocks": "int64"
|
||
}
|
||
```
|
||
|
||
**调用示例**
|
||
|
||
```bash
|
||
curl -X POST "https://backend.dooki.cloud/FirewallService/countFirewallDailyBlocks" \
|
||
-H "Content-Type: application/json" \
|
||
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
||
-d '{
|
||
...
|
||
}'
|
||
```
|
||
|
||
---
|