🎬 Cloak_shoplazza
title: 默认模块
language_tabs:
- shell: Shell
- http: HTTP
- javascript: JavaScript
- ruby: Ruby
- python: Python
- php: PHP
- java: Java
- go: Go
toc_footers: []
includes: []
search: true
code_clipboard: true
highlight_theme: darkula
headingLevel: 2
generator: "@tarslib/widdershins v4.0.30"
默认模块
Base URLs:
Authentication
-
API Key (sessionAuth)
- Parameter Name: JSESSIONID, in: cookie. Session认证,通过Cookie中的JSESSIONID进行身份验证
-
HTTP Authentication, scheme: bearer
认证管理
POST 用户注册
POST /api/auth/register
新用户注册,创建账户
Body 请求参数
{
"username": "testuser",
"email": "test@example.com",
"password": "password123",
"confirmPassword": "password123"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | RegisterRequest | 是 | none |
返回示例
200 Response
{
"success": true,
"message": "string",
"data": {
"token": "string",
"user": {
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 注册成功 | AuthResponse |
| 400 | Bad Request | 注册失败 | ErrorResponse |
POST 用户登录
POST /api/auth/login
用户登录认证,获取访问令牌
Body 请求参数
{
"username": "testuser",
"password": "password123"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | LoginRequest | 是 | none |
返回示例
200 Response
{
"success": true,
"message": "string",
"data": {
"token": "string",
"user": {
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 登录成功 | AuthResponse |
| 401 | Unauthorized | 登录失败 | ErrorResponse |
POST 用户登出
POST /api/auth/logout
用户登出,清除会话
返回示例
200 Response
{
"success": true,
"message": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 登出成功 | SuccessResponse |
用户管理
GET 获取用户列表
GET /api/users
管理员获取所有用户列表,支持分页和筛选
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| page | query | integer | 否 | 页码,从0开始 |
| size | query | integer | 否 | 每页大小 |
| role | query | string | 否 | 用户角色筛选 |
枚举值
| 属性 | 值 |
|---|---|
| role | USER |
| role | ADMIN |
返回示例
200 Response
{
"content": [
{
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
],
"totalElements": 0,
"totalPages": 0,
"size": 0,
"number": 0
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | UserPageResponse |
GET 获取用户详情
GET /api/users/{userId}
获取指定用户的详细信息
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| userId | path | integer(int64) | 是 | 用户ID |
返回示例
200 Response
{
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | UserInfo |
| 404 | Not Found | 用户不存在 | ErrorResponse |
PUT 更新用户信息
PUT /api/users/{userId}
更新指定用户的信息
Body 请求参数
{
"username": "string",
"email": "user@example.com",
"role": "USER"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| userId | path | integer(int64) | 是 | 用户ID |
| body | body | UserUpdateRequest | 是 | none |
返回示例
200 Response
{
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 更新成功 | UserInfo |
DELETE 删除用户
DELETE /api/users/{userId}
删除指定用户
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| userId | path | integer(int64) | 是 | 用户ID |
返回示例
200 Response
{
"success": true,
"message": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 删除成功 | SuccessResponse |
GET 获取当前用户信息
GET /api/auth/current-user
获取当前登录用户的详细信息
返回示例
200 Response
{
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | UserInfo |
| 401 | Unauthorized | 未认证 | ErrorResponse |
Cloak控制
POST as过滤
POST /api/global-config/as-filter
Body 请求参数
{
"blocked": [
"12345",
"67890",
"11111"
],
"allowed": []
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
POST 移除禁止as
POST /api/global-config/as-filter/blocked/remove
Body 请求参数
[
"3356"
]
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
POST 添加禁止as
POST /api/global-config/as-filter/blocked/add
Body 请求参数
[
"22222",
"313333"
]
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | object | 否 | none |
返回示例
200 Response
{}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
GET 获取as
GET /api/global-config/as-filter/stats
返回示例
200 Response
{
"totalBlocked": 0,
"totalAllowed": 0,
"blockedAs": [
"string"
],
"allowedAs": [
null
],
"message": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » totalBlocked | integer | true | none | none | |
| » totalAllowed | integer | true | none | none | |
| » blockedAs | [string] | true | none | none | |
| » allowedAs | [any] | true | none | none | |
| » message | string | true | none | none |
POST 验证访问权限
POST /api/cloak/validate-client-ip
验证访问者的访问权限,根据配置的规则进行控制
Body 请求参数
{
"userId": 79108,
"apiKey": "key_1755685656335_603",
"clientIP": "4.82.193.181",
"userAgent": "123",
"language": "en",
"utmSource": "fb",
"utmMedium": "cpc",
"utmCampaign": "test_campaign"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | ValidateRequest | 否 | none |
返回示例
200 Response
{
"allowed": true,
"message": "string",
"geoLocation": {
"ip": "string",
"country": "string",
"countryCode": "string",
"region": "string",
"regionName": "string",
"city": "string",
"zip": "string",
"lat": 0.1,
"lon": 0.1,
"timezone": "string",
"isp": "string",
"org": "string",
"as": "string",
"proxy": true,
"hosting": true
},
"validationDetails": {
"countryCheck": true,
"deviceCheck": true,
"languageCheck": true,
"utmCheck": true,
"proxyCheck": true
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 验证完成 | CloakResult |
| 400 | Bad Request | 请求参数错误 | ErrorResponse |
GET 获取用户Cloak配置
GET /api/cloak/config/79108
获取指定用户的Cloak配置信息
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| apiKey | query | string | 否 | none |
返回示例
200 Response
{
"id": 0,
"userId": 0,
"language": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string",
"allowedCountries": "string",
"blockedCountries": "string",
"allowMobile": true,
"allowDesktop": true,
"forceValidation": true,
"normalValidation": true,
"validationRules": "string",
"customHeaders": "string",
"enableProxy": true,
"proxyRules": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | CloakConfig |
| 404 | Not Found | 配置不存在 | ErrorResponse |
POST 更新用户Cloak配置
POST /api/cloak/config/79108
更新指定用户的Cloak配置信息
Body 请求参数
{
"language": "en,zh",
"utmSource": "google,fb",
"utmMedium": "213,cpc",
"utmCampaign": "12312312,test_campaign",
"allowedCountries": [
"US",
"CA",
"GB"
],
"blockedCountries": [
"CN",
"RU"
],
"allowMobile": true,
"allowDesktop": false,
"forceValidation": false,
"normalValidation": true,
"enableProxy": true
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| apiKey | query | string | 否 | none |
| body | body | CloakConfigRequest | 否 | none |
返回示例
200 Response
{
"id": 0,
"userId": 0,
"language": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string",
"allowedCountries": "string",
"blockedCountries": "string",
"allowMobile": true,
"allowDesktop": true,
"forceValidation": true,
"normalValidation": true,
"validationRules": "string",
"customHeaders": "string",
"enableProxy": true,
"proxyRules": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 更新成功 | CloakConfig |
| 400 | Bad Request | 请求参数错误 | ErrorResponse |
GET 测试IP-API连接
GET /api/cloak/test-connection
测试与IP-API服务的连接状态
返回示例
200 Response
{
"success": true,
"message": "string",
"responseTime": 0,
"apiStatus": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 测试完成 | ConnectionTestResponse |
日志统计
GET 获取访问日志
GET /api/cloak/logs/79108
获取用户的访问日志列表,支持分页和筛选
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| userId | query | integer(int64) | 是 | 用户ID |
| page | query | integer | 否 | 页码,从0开始 |
| size | query | integer | 否 | 每页大小 |
| startDate | query | string(date) | 否 | 开始日期 (yyyy-MM-dd) |
| endDate | query | string(date) | 否 | 结束日期 (yyyy-MM-dd) |
| status | query | string | 否 | 访问状态筛选 (ALLOWED/DENIED) |
| apiKey | query | string | 否 | none |
枚举值
| 属性 | 值 |
|---|---|
| status | ALLOWED |
| status | DENIED |
返回示例
200 Response
{
"content": [
{
"id": 0,
"userId": 0,
"username": "string",
"clientIP": "string",
"userAgent": "string",
"country": "string",
"countryCode": "string",
"city": "string",
"isp": "string",
"status": "ALLOWED",
"reason": "string",
"accessTime": "2019-08-24T14:15:22Z"
}
],
"totalElements": 0,
"totalPages": 0,
"size": 0,
"number": 0
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | LogPageResponse |
GET 获取访问统计信息
GET /api/cloak/stats/79108
获取用户的访问统计信息,包括访问量、拒绝率等
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| apiKey | query | string | 否 | none |
返回示例
200 Response
{
"totalRequests": 0,
"allowedRequests": 0,
"deniedRequests": 0,
"allowRate": 0.1,
"denyRate": 0.1,
"topCountries": [
{
"country": "string",
"count": 0
}
],
"topCities": [
{
"city": "string",
"count": 0
}
],
"dailyStats": [
{
"date": "2019-08-24",
"total": 0,
"allowed": 0,
"denied": 0
}
]
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 获取成功 | StatsResponse |
DELETE 清理旧日志
DELETE /api/cloak/logs/clean
清理指定日期之前的旧访问日志
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| beforeDate | query | string(date) | 是 | 清理此日期之前的日志 (yyyy-MM-dd) |
返回示例
200 Response
{
"success": true,
"message": "string"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | 清理成功 | SuccessResponse |
数据模型
User
{
"id": 0,
"username": "string",
"email": "user@example.com",
"fullName": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| id | integer | false | none | 用户ID | |
| username | string | false | none | 用户名 | |
| string(email) | false | none | 用户邮箱 | ||
| fullName | string | false | none | 用户姓名 | |
| role | string | false | none | 用户角色 | |
| apiKey | string | false | none | API密钥 | |
| createdAt | string(date-time) | false | none | 创建时间 | |
| updatedAt | string(date-time) | false | none | 更新时间 |
枚举值
| 属性 | 值 |
|---|---|
| role | USER |
| role | ADMIN |
LoginRequest
{
"username": "string",
"password": "string"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| username | string | true | none | 用户名或邮箱 | |
| password | string | true | none | 密码 |
RegisterRequest
{
"username": "string",
"email": "user@example.com",
"password": "string",
"confirmPassword": "string"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| username | string | true | none | 用户名 | |
| string(email) | true | none | 邮箱地址 | ||
| password | string | true | none | 密码 | |
| confirmPassword | string | true | none | 确认密码 |
AuthResponse
{
"success": true,
"message": "string",
"data": {
"token": "string",
"user": {
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
}
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| success | boolean | false | none | 操作是否成功 | |
| message | string | false | none | 响应消息 | |
| data | object | false | none | none | |
| » token | string | false | none | JWT访问令牌 | |
| » user | UserInfo | false | none | none |
UserInfo
{
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| id | integer(int64) | false | none | 用户ID | |
| username | string | false | none | 用户名 | |
| string | false | none | 邮箱地址 | ||
| role | string | false | none | 用户角色 | |
| apiKey | string | false | none | API密钥 | |
| createdAt | string(date-time) | false | none | 创建时间 | |
| lastLoginAt | string(date-time) | false | none | 最后登录时间 |
枚举值
| 属性 | 值 |
|---|---|
| role | USER |
| role | ADMIN |
UserUpdateRequest
{
"username": "string",
"email": "user@example.com",
"role": "USER"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| username | string | false | none | 用户名 | |
| string(email) | false | none | 邮箱地址 | ||
| role | string | false | none | 用户角色 |
枚举值
| 属性 | 值 |
|---|---|
| role | USER |
| role | ADMIN |
ValidateRequest
{
"userId": 0,
"clientIP": "string",
"userAgent": "string",
"language": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| userId | integer(int64) | true | none | 用户ID | |
| clientIP | string | false | none | 客户端IP地址 | |
| userAgent | string | false | none | 用户代理字符串 | |
| language | string | false | none | 语言设置 | |
| utmSource | string | false | none | UTM来源参数 | |
| utmMedium | string | false | none | UTM媒介参数 | |
| utmCampaign | string | false | none | UTM活动参数 |
CloakResult
{
"allowed": true,
"message": "string",
"geoLocation": {
"ip": "string",
"country": "string",
"countryCode": "string",
"region": "string",
"regionName": "string",
"city": "string",
"zip": "string",
"lat": 0.1,
"lon": 0.1,
"timezone": "string",
"isp": "string",
"org": "string",
"as": "string",
"proxy": true,
"hosting": true
},
"validationDetails": {
"countryCheck": true,
"deviceCheck": true,
"languageCheck": true,
"utmCheck": true,
"proxyCheck": true
}
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| allowed | boolean | false | none | 是否允许访问 | |
| message | string | false | none | 结果消息 | |
| geoLocation | GeoLocation | false | none | none | |
| validationDetails | object | false | none | none | |
| » countryCheck | boolean | false | none | 国家检查结果 | |
| » deviceCheck | boolean | false | none | 设备检查结果 | |
| » languageCheck | boolean | false | none | 语言检查结果 | |
| » utmCheck | boolean | false | none | UTM参数检查结果 | |
| » proxyCheck | boolean | false | none | 代理检查结果 |
GeoLocation
{
"ip": "string",
"country": "string",
"countryCode": "string",
"region": "string",
"regionName": "string",
"city": "string",
"zip": "string",
"lat": 0.1,
"lon": 0.1,
"timezone": "string",
"isp": "string",
"org": "string",
"as": "string",
"proxy": true,
"hosting": true
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| ip | string | false | none | IP地址 | |
| country | string | false | none | 国家名称 | |
| countryCode | string | false | none | 国家代码 | |
| region | string | false | none | 地区名称 | |
| regionName | string | false | none | 地区名称 | |
| city | string | false | none | 城市名称 | |
| zip | string | false | none | 邮政编码 | |
| lat | number(double) | false | none | 纬度 | |
| lon | number(double) | false | none | 经度 | |
| timezone | string | false | none | 时区 | |
| isp | string | false | none | 网络服务提供商 | |
| org | string | false | none | 组织名称 | |
| as | string | false | none | 自治系统 | |
| proxy | boolean | false | none | 是否为代理 | |
| hosting | boolean | false | none | 是否为数据中心 |
CloakConfigRequest
{
"language": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string",
"allowedCountries": [
"string"
],
"blockedCountries": [
"string"
],
"allowMobile": true,
"allowDesktop": true,
"forceValidation": true,
"normalValidation": true,
"validationRules": "string",
"customHeaders": "string",
"enableProxy": true,
"proxyRules": "string"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| language | string | false | none | 允许的语言 | |
| utmSource | string | false | none | UTM来源参数 | |
| utmMedium | string | false | none | UTM媒介参数 | |
| utmCampaign | string | false | none | UTM活动参数 | |
| allowedCountries | [string] | false | none | 允许访问的国家列表 | |
| blockedCountries | [string] | false | none | 禁止访问的国家列表 | |
| allowMobile | boolean | true | none | 是否允许移动端访问 | |
| allowDesktop | boolean | true | none | 是否允许桌面端访问 | |
| forceValidation | boolean | true | none | 是否启用强制校验 | |
| normalValidation | boolean | true | none | 是否启用普通校验 | |
| validationRules | string | false | none | 自定义校验规则(JSON格式) | |
| customHeaders | string | false | none | 自定义请求头规则(JSON格式) | |
| enableProxy | boolean | true | none | 是否启用代理检测 | |
| proxyRules | string | false | none | 代理检测规则(JSON格式) |
CloakConfig
{
"id": 0,
"userId": 0,
"language": "string",
"utmSource": "string",
"utmMedium": "string",
"utmCampaign": "string",
"allowedCountries": "string",
"blockedCountries": "string",
"allowMobile": true,
"allowDesktop": true,
"forceValidation": true,
"normalValidation": true,
"validationRules": "string",
"customHeaders": "string",
"enableProxy": true,
"proxyRules": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| id | integer(int64) | false | none | 配置ID | |
| userId | integer(int64) | false | none | 用户ID | |
| language | string | false | none | 允许的语言 | |
| utmSource | string | false | none | UTM来源参数 | |
| utmMedium | string | false | none | UTM媒介参数 | |
| utmCampaign | string | false | none | UTM活动参数 | |
| allowedCountries | string | false | none | 允许访问的国家列表(JSON格式) | |
| blockedCountries | string | false | none | 禁止访问的国家列表(JSON格式) | |
| allowMobile | boolean | false | none | 是否允许移动端访问 | |
| allowDesktop | boolean | false | none | 是否允许桌面端访问 | |
| forceValidation | boolean | false | none | 是否启用强制校验 | |
| normalValidation | boolean | false | none | 是否启用普通校验 | |
| validationRules | string | false | none | 自定义校验规则(JSON格式) | |
| customHeaders | string | false | none | 自定义请求头规则(JSON格式) | |
| enableProxy | boolean | false | none | 是否启用代理检测 | |
| proxyRules | string | false | none | 代理检测规则(JSON格式) | |
| createdAt | string(date-time) | false | none | 创建时间 | |
| updatedAt | string(date-time) | false | none | 更新时间 |
LogPageResponse
{
"content": [
{
"id": 0,
"userId": 0,
"username": "string",
"clientIP": "string",
"userAgent": "string",
"country": "string",
"countryCode": "string",
"city": "string",
"isp": "string",
"status": "ALLOWED",
"reason": "string",
"accessTime": "2019-08-24T14:15:22Z"
}
],
"totalElements": 0,
"totalPages": 0,
"size": 0,
"number": 0
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| content | [CloakAccessLog] | false | none | none | |
| totalElements | integer | false | none | 总记录数 | |
| totalPages | integer | false | none | 总页数 | |
| size | integer | false | none | 每页大小 | |
| number | integer | false | none | 当前页码 |
CloakAccessLog
{
"id": 0,
"userId": 0,
"username": "string",
"clientIP": "string",
"userAgent": "string",
"country": "string",
"countryCode": "string",
"city": "string",
"isp": "string",
"status": "ALLOWED",
"reason": "string",
"accessTime": "2019-08-24T14:15:22Z"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| id | integer(int64) | false | none | 日志ID | |
| userId | integer(int64) | false | none | 用户ID | |
| username | string | false | none | 用户名 | |
| clientIP | string | false | none | 客户端IP地址 | |
| userAgent | string | false | none | 用户代理字符串 | |
| country | string | false | none | 国家名称 | |
| countryCode | string | false | none | 国家代码 | |
| city | string | false | none | 城市名称 | |
| isp | string | false | none | 网络服务提供商 | |
| status | string | false | none | 访问状态 | |
| reason | string | false | none | 拒绝原因(如果被拒绝) | |
| accessTime | string(date-time) | false | none | 访问时间 |
枚举值
| 属性 | 值 |
|---|---|
| status | ALLOWED |
| status | DENIED |
StatsResponse
{
"totalRequests": 0,
"allowedRequests": 0,
"deniedRequests": 0,
"allowRate": 0.1,
"denyRate": 0.1,
"topCountries": [
{
"country": "string",
"count": 0
}
],
"topCities": [
{
"city": "string",
"count": 0
}
],
"dailyStats": [
{
"date": "2019-08-24",
"total": 0,
"allowed": 0,
"denied": 0
}
]
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| totalRequests | integer | false | none | 总请求数 | |
| allowedRequests | integer | false | none | 允许的请求数 | |
| deniedRequests | integer | false | none | 拒绝的请求数 | |
| allowRate | number(double) | false | none | 允许率 | |
| denyRate | number(double) | false | none | 拒绝率 | |
| topCountries | [object] | false | none | none | |
| » country | string | false | none | 国家名称 | |
| » count | integer | false | none | 访问次数 | |
| topCities | [object] | false | none | none | |
| » city | string | false | none | 城市名称 | |
| » count | integer | false | none | 访问次数 | |
| dailyStats | [object] | false | none | none | |
| » date | string(date) | false | none | 日期 | |
| » total | integer | false | none | 当日总访问数 | |
| » allowed | integer | false | none | 当日允许数 | |
| » denied | integer | false | none | 当日拒绝数 |
ConnectionTestResponse
{
"success": true,
"message": "string",
"responseTime": 0,
"apiStatus": "string"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| success | boolean | false | none | 连接是否成功 | |
| message | string | false | none | 响应消息 | |
| responseTime | integer | false | none | 响应时间(毫秒) | |
| apiStatus | string | false | none | API服务状态 |
UserPageResponse
{
"content": [
{
"id": 0,
"username": "string",
"email": "string",
"role": "USER",
"apiKey": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastLoginAt": "2019-08-24T14:15:22Z"
}
],
"totalElements": 0,
"totalPages": 0,
"size": 0,
"number": 0
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| content | [UserInfo] | false | none | none | |
| totalElements | integer | false | none | 总记录数 | |
| totalPages | integer | false | none | 总页数 | |
| size | integer | false | none | 每页大小 | |
| number | integer | false | none | 当前页码 |
SuccessResponse
{
"success": true,
"message": "string"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| success | boolean | false | none | 操作是否成功 | |
| message | string | false | none | 响应消息 |
ErrorResponse
{
"success": true,
"message": "string",
"errorCode": "string",
"timestamp": "2019-08-24T14:15:22Z"
}
属性
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| success | boolean | false | none | 操作是否成功 | |
| message | string | false | none | 错误消息 | |
| errorCode | string | false | none | 错误代码 | |
| timestamp | string(date-time) | false | none | 错误发生时间 |
运行
$env:JAVA_HOME = "C:\Program Files\Java\jdk-17"; $env:PATH = "C:\Program Files\Java\jdk-17\bin;" + $env:PATH; .\mvnw.cmd spring-boot:run