{ "swagger": "2.0", "info": { "description": "mgt API swagger document.", "title": "mgt API", "contact": {}, "version": "2.0" }, "basePath": "/api", "paths": { "/business/audit_log": { "get": { "produces": [ "application/json" ], "tags": [ "log/audit" ], "summary": "get audit logs", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query", "x-cli-description": "页码" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query", "x-cli-description": "每页数量" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/audit_log.ListAuditLogRes" } } } ] } } }, "x-cli-summary": "查看审计日志列表" } }, "/open/global/mode": { "get": { "description": "Get global semantics", "produces": [ "application/json" ], "tags": [ "module" ], "summary": "Get global semantics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/skynet.GetGlobalSemanticsRes" } } } ] } } }, "x-cli-summary": "获取全局语义配置" }, "put": { "description": "Update global semantics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "module" ], "summary": "Update global semantics", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/skynet.SemanticsConfigParams" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "更新全局语义配置" } }, "/open/ipgroup": { "get": { "produces": [ "application/json" ], "tags": [ "ipgroup" ], "summary": "list ip group", "parameters": [ { "type": "integer", "name": "top", "in": "query", "x-cli-description": "返回前 N 条" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetIPGroupRes" } } } ] } } }, "x-cli-summary": "获取 IP Group 列表" }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ipgroup" ], "summary": "create ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ipg.IPGroupVO" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } }, "x-cli-summary": "创建 IP Group" }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ipgroup" ], "summary": "update ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ipg.IPGroupVO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "更新 IP Group" }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ipgroup" ], "summary": "delete ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeleteIPGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "删除 IP Group" } }, "/open/ipgroup/append": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ipgroup" ], "summary": "add ip to ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostAppendIPGroupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "添加 IP 到 IP Group" } }, "/open/ipgroup/detail": { "get": { "produces": [ "application/json" ], "tags": [ "ipgroup" ], "summary": "get ip group detail", "parameters": [ { "type": "integer", "name": "id", "in": "query", "x-cli-description": "资源 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetIPGroupDetailRes" } } } ] } } }, "x-cli-summary": "获取 IP Group 详情" } }, "/open/policy": { "get": { "produces": [ "application/json" ], "tags": [ "rule" ], "summary": "list customized rule", "parameters": [ { "maximum": 3, "minimum": -1, "type": "integer", "name": "action", "in": "query", "x-cli-description": "动作类型:0-放行 1-阻断 2-挑战 3-认证防护 4-混淆 5-等待室" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query", "x-cli-description": "页码" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query", "x-cli-description": "每页数量" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/policy.ListPolicyRes" } } } ] } } }, "x-cli-summary": "获取自定义规则列表" }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rule" ], "summary": "create customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.PostPolicyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } }, "x-cli-summary": "创建自定义规则" }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rule" ], "summary": "update customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.PutPolicyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "更新自定义规则" }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rule" ], "summary": "delete customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.DeletePolicyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "删除自定义规则" } }, "/open/policy/detail": { "get": { "produces": [ "application/json" ], "tags": [ "rule" ], "summary": "get customized rule detail", "parameters": [ { "type": "integer", "name": "id", "in": "query", "x-cli-description": "资源 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/policy.GetPolicyRes" } } } ] } } }, "x-cli-summary": "获取自定义规则详情" } }, "/open/policy/switch": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "rule" ], "summary": "enable/disable customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.PutPolicySwitchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "启用/禁用自定义规则" } }, "/open/record/:id": { "get": { "produces": [ "application/json" ], "tags": [ "log/attack" ], "summary": "get attack log detail", "parameters": [ { "type": "string", "description": "log id", "name": "id", "in": "path", "required": true, "x-cli-description": "资源 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DetectLog" } } } ] } } }, "x-cli-summary": "查看攻击日志详情" } }, "/open/record/rule/:id": { "get": { "produces": [ "application/json" ], "tags": [ "log/rule" ], "summary": "get black or white rule attack log detail", "parameters": [ { "type": "string", "description": "log id", "name": "id", "in": "path", "required": true, "x-cli-description": "资源 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.RuleDetectLog" } } } ] } } }, "x-cli-summary": "查看黑白名单检测日志详情" } }, "/open/records": { "get": { "produces": [ "application/json" ], "tags": [ "log/attack" ], "summary": "get attack logs", "parameters": [ { "type": "string", "name": "action", "in": "query", "x-cli-description": "动作类型:0-放行 1-阻断 2-挑战 3-认证防护 4-混淆 5-等待室" }, { "type": "string", "name": "attack_type", "in": "query", "x-cli-description": "攻击类型" }, { "type": "integer", "name": "end", "in": "query", "x-cli-description": "结束时间戳(秒)" }, { "type": "string", "name": "event_id", "in": "query", "x-cli-description": "事件 ID" }, { "type": "string", "name": "host", "in": "query", "x-cli-description": "域名" }, { "type": "string", "name": "ip", "in": "query", "x-cli-description": "IP 地址" }, { "type": "string", "name": "ja4_fingerprint", "in": "query", "x-cli-description": "JA4 指纹" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query", "x-cli-description": "页码" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query", "x-cli-description": "每页数量" }, { "type": "string", "name": "port", "in": "query", "x-cli-description": "端口" }, { "type": "integer", "name": "start", "in": "query", "x-cli-description": "开始时间戳(秒)" }, { "type": "string", "name": "url", "in": "query", "x-cli-description": "URL 路径" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/record.GetDetectLogListRes" } } } ] } } }, "x-cli-summary": "查看攻击日志列表" } }, "/open/records/rule": { "get": { "produces": [ "application/json" ], "tags": [ "log/rule" ], "summary": "get black or white rule attack logs", "parameters": [ { "type": "string", "name": "action", "in": "query", "x-cli-description": "动作类型:0-放行 1-阻断 2-挑战 3-认证防护 4-混淆 5-等待室" }, { "type": "string", "name": "attack_type", "in": "query", "x-cli-description": "攻击类型" }, { "type": "integer", "name": "end", "in": "query", "x-cli-description": "结束时间戳(秒)" }, { "type": "string", "name": "event_id", "in": "query", "x-cli-description": "事件 ID" }, { "type": "string", "name": "host", "in": "query", "x-cli-description": "域名" }, { "type": "string", "name": "ip", "in": "query", "x-cli-description": "IP 地址" }, { "type": "string", "name": "ja4_fingerprint", "in": "query", "x-cli-description": "JA4 指纹" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query", "x-cli-description": "页码" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query", "x-cli-description": "每页数量" }, { "type": "string", "name": "port", "in": "query", "x-cli-description": "端口" }, { "type": "integer", "name": "start", "in": "query", "x-cli-description": "开始时间戳(秒)" }, { "type": "string", "name": "url", "in": "query", "x-cli-description": "URL 路径" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/record.GetRuleDetectLogListRes" } } } ] } } }, "x-cli-summary": "查看黑白名单检测日志列表" } }, "/open/site": { "get": { "produces": [ "application/json" ], "tags": [ "site" ], "summary": "list web service", "parameters": [ { "type": "integer", "name": "group_id", "in": "query", "x-cli-description": "分组 ID" }, { "type": "string", "name": "site", "in": "query", "x-cli-description": "站点域名" }, { "type": "boolean", "name": "sp_enabled", "in": "query", "x-cli-description": "是否启用语义分析" }, { "type": "boolean", "name": "stat_enabled", "in": "query", "x-cli-description": "是否启用统计" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.GetWebsiteRes" } } } ] } } }, "x-cli-summary": "获取防护站点列表" }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "site" ], "summary": "create web service", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.WebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } }, "x-cli-summary": "创建防护站点" }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "site" ], "summary": "update web service", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.WebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "更新防护站点" }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "site" ], "summary": "delete web service", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.DeleteWebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "删除防护站点" } }, "/open/skynet/rule": { "get": { "produces": [ "application/json" ], "tags": [ "skynet" ], "summary": "get enhance rule", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetSkynetRuleRes" } } } ] } } }, "x-cli-summary": "获取加强规则列表" }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "skynet" ], "summary": "update enhance rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutSkynetRuleReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "更新加强规则" } }, "/open/skynet/rule/switch": { "get": { "produces": [ "application/json" ], "tags": [ "skynet/switch" ], "summary": "get enhance rule global status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } } }, "x-cli-summary": "获取加强规则全局开关" }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "skynet/switch" ], "summary": "update enhance rule global status", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutSkynetRuleSwitchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "设置加强规则全局开关" } }, "/open/system": { "get": { "produces": [ "application/json" ], "tags": [ "cert" ], "summary": "get system info", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/system.AboutRes" } } } ] } } }, "x-cli-summary": "获取系统信息" }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "cert" ], "summary": "update management cert", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/system.UpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "更新管理证书" } }, "/open/system/authorize": { "get": { "produces": [ "application/json" ], "tags": [ "cert" ], "summary": "get license", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/system.CodeApplyInfoRes" } } } ] } } }, "x-cli-summary": "获取授权详情" }, "delete": { "produces": [ "application/json" ], "tags": [ "cert" ], "summary": "delete license", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } }, "x-cli-summary": "删除授权" } }, "/stat/advance/access": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "get advanced access", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query", "x-cli-description": "开始时间戳(秒)" }, { "type": "integer", "name": "end_time", "in": "query", "x-cli-description": "结束时间戳(秒)" }, { "type": "integer", "name": "site_id", "in": "query", "x-cli-description": "站点 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/stat.AdvanceAccessRes" } } } ] } } }, "x-cli-summary": "访问统计" } }, "/stat/advance/attack": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "get advanced intercept", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query", "x-cli-description": "开始时间戳(秒)" }, { "type": "integer", "name": "end_time", "in": "query", "x-cli-description": "结束时间戳(秒)" }, { "type": "integer", "name": "site_id", "in": "query", "x-cli-description": "站点 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/stat.AdvanceAttackRes" } } } ] } } }, "x-cli-summary": "拦截统计" } }, "/stat/advance/trend/access": { "get": { "produces": [ "application/json" ], "tags": [ "stat/trend" ], "summary": "get advanced access trend", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query", "x-cli-description": "开始时间戳(秒)" }, { "type": "integer", "name": "end_time", "in": "query", "x-cli-description": "结束时间戳(秒)" }, { "type": "integer", "name": "site_id", "in": "query", "x-cli-description": "站点 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "time": { "type": "integer" } } } } } } ] } } }, "x-cli-summary": "访问趋势" } }, "/stat/advance/trend/intercept": { "get": { "produces": [ "application/json" ], "tags": [ "stat/trend" ], "summary": "get advanced intercept trend", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query", "x-cli-description": "开始时间戳(秒)" }, { "type": "integer", "name": "end_time", "in": "query", "x-cli-description": "结束时间戳(秒)" }, { "type": "integer", "name": "site_id", "in": "query", "x-cli-description": "站点 ID" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "time": { "type": "integer" } } } } } } ] } } }, "x-cli-summary": "拦截趋势" } }, "/stat/qps": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "get qps", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QpsRes" } } } ] } } }, "x-cli-summary": "QPS 统计" } } }, "definitions": { "acl.ACLConfig": { "type": "object", "properties": { "action": { "type": "string" }, "block_min": { "type": "integer" }, "built_in": { "type": "boolean" }, "conditions": { "type": "array", "items": { "$ref": "#/definitions/model.RuleCondition" } }, "count": { "type": "integer" }, "created_at": { "type": "integer" }, "enabled": { "type": "boolean" }, "id": { "type": "integer" }, "name": { "type": "string" }, "period": { "type": "integer" }, "priority": { "type": "integer" }, "site_id": { "type": "integer" }, "type": { "type": "string" }, "updated_at": { "type": "integer" }, "use_global": { "type": "boolean" } } }, "acl.ACLRelieveRequest": { "type": "object", "properties": { "id": { "type": "array", "items": { "type": "integer" } }, "search": { "$ref": "#/definitions/acl.SearchReq" } } }, "acl.GetACLLogsRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/acl.Log" } }, "total": { "type": "integer" } } }, "acl.Log": { "type": "object", "properties": { "action": { "$ref": "#/definitions/model.ACLConfigAction" }, "block_min": { "type": "integer" }, "city": { "description": "obsolete", "type": "string" }, "count": { "type": "integer" }, "country": { "description": "obsolete", "type": "string" }, "created_at": { "type": "string" }, "denied_count": { "type": "integer" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "period": { "type": "integer" }, "province": { "description": "obsolete", "type": "string" }, "query_key": { "type": "string" }, "reason": { "$ref": "#/definitions/model.ACLConfigType" }, "result": { "type": "string" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "status": { "type": "integer" }, "updated_at": { "type": "string" }, "valid_before": { "type": "string" } } }, "acl.SearchReq": { "type": "object", "properties": { "begin": { "type": "integer" }, "end": { "type": "integer" }, "ip": { "type": "string" }, "site": { "type": "string" } } }, "acl.SetSiteACLRequest": { "type": "object", "properties": { "rules": { "type": "array", "items": { "$ref": "#/definitions/acl.ACLConfig" } }, "use_global": { "type": "boolean" } } }, "alarm.AlarmConfigResponse": { "type": "object", "properties": { "id": { "type": "integer" } } }, "alarm.PutAlarmConfigRequest": { "type": "object", "properties": { "cur_platform": { "type": "string" }, "event": { "$ref": "#/definitions/model.JsonObject-model_AlarmEvent" }, "network_proxy": { "type": "boolean" }, "platform": { "$ref": "#/definitions/model.JsonObject-model_AlarmPlatform" }, "site_ids": { "type": "array", "items": { "type": "integer" } } } }, "api.ChallengeLog": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "dur_sec": { "type": "integer" }, "ended_at": { "type": "integer" }, "event_id": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "pass_count": { "type": "integer" }, "province": { "type": "string" }, "rule_id": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "started_at": { "type": "integer" }, "trigger_count": { "type": "integer" }, "updated_at": { "type": "string" } } }, "api.DeleteIPGroupReq": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "api.GetCertListRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/api.ListCertItem" } }, "total": { "type": "integer" } } }, "api.GetChallengeLogsRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.ChallengeLog" } }, "total": { "type": "integer" } } }, "api.GetDetectorRes": { "type": "object", "properties": { "mode": { "type": "integer" } } }, "api.GetDowngradeVersionRes": { "type": "object", "properties": { "status": { "type": "boolean" } } }, "api.GetIPGroupByLinkRes": { "type": "object", "properties": { "ips": { "type": "array", "items": { "type": "string" } } } }, "api.GetIPGroupDetailRes": { "type": "object", "properties": { "data": { "$ref": "#/definitions/ipg.IPGroupVO" } } }, "api.GetIPGroupRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/ipg.IPGroupVO" } }, "total": { "type": "integer" } } }, "api.GetManagerInfoRes": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ManagerInfo" } } }, "api.GetSkynetRuleRes": { "type": "object", "properties": { "rules": { "type": "object", "additionalProperties": { "$ref": "#/definitions/detect.SkynetInfo" } } } }, "api.GetSpecialPageRes": { "type": "object", "properties": { "content": { "type": "string" } } }, "api.ListCertItem": { "type": "object", "properties": { "acme_message": { "type": "string" }, "domains": { "type": "array", "items": { "type": "string" } }, "expired": { "type": "boolean" }, "id": { "type": "integer" }, "issuer": { "type": "string" }, "related_sites": { "type": "array", "items": { "type": "string" } }, "revoked": { "type": "boolean" }, "self_signature": { "type": "boolean" }, "trusted": { "type": "boolean" }, "type": { "type": "integer" }, "valid_before": { "type": "string" } } }, "api.ListSpecialPageItem": { "type": "object", "properties": { "custom": { "type": "boolean" }, "type": { "type": "string" } } }, "api.LogMaxDayConfig": { "type": "object", "properties": { "max_day": { "type": "integer" }, "max_report_day": { "type": "integer" }, "max_stat_day": { "type": "integer" } } }, "api.PostAppendIPGroupRequest": { "type": "object", "properties": { "ip_group_ids": { "type": "array", "items": { "type": "integer" } }, "ips": { "type": "array", "items": { "type": "string" } } } }, "api.PostDetectorReq": { "type": "object", "properties": { "mode": { "type": "integer" }, "ts": { "type": "integer" } } }, "api.PutManagerInfoReq": { "type": "object", "properties": { "common_color": { "$ref": "#/definitions/model.CommonColor" }, "error_color": { "$ref": "#/definitions/model.ErrorColor" }, "manager_info": { "type": "string" }, "page_manager_info": { "type": "object", "additionalProperties": { "type": "string" } } } }, "api.PutSkynetRuleReq": { "type": "object", "properties": { "global": { "type": "boolean" }, "id": { "type": "array", "items": { "type": "string" } }, "mode": { "$ref": "#/definitions/detect.Mode" } } }, "api.PutSkynetRuleSwitchReq": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "api.PutSpecialPageRequest": { "type": "object", "properties": { "recover": { "type": "boolean" }, "response_html": { "type": "string" }, "type": { "type": "string" } } }, "api.PutThreatInfoRequest": { "type": "object", "properties": { "share_enabled": { "type": "boolean" } } }, "api.PutThreatLibRequest": { "type": "object", "properties": { "use_commercial_lib": { "description": "是否使用商业 IP 库", "type": "boolean" } } }, "api.QpsRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } }, "api.SetShareBehaviourRequest": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "api.SetShareFingerprintRequest": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "audit_log.ListAuditLogItem": { "type": "object", "properties": { "content": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "username": { "type": "string" } } }, "audit_log.ListAuditLogRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/audit_log.ListAuditLogItem" } }, "total": { "type": "integer" } } }, "auth.GetCsrfTokenRes": { "type": "object", "properties": { "csrf_token": { "type": "string" } } }, "auth.LoginReq": { "type": "object", "properties": { "callback_address": { "type": "string" }, "csrf_token": { "type": "string" }, "password": { "type": "string" }, "test": { "type": "boolean" }, "username": { "type": "string" } } }, "auth.LoginRes": { "type": "object", "properties": { "id": { "type": "integer" }, "jwt": { "type": "string" }, "redirect": { "type": "string" }, "tfa_bind_url": { "type": "string" }, "tfa_binded": { "type": "boolean" }, "tfa_enabled": { "type": "boolean" } } }, "auth.TfaReq": { "type": "object", "properties": { "code": { "type": "string" }, "csrf_token": { "type": "string" }, "timestamp": { "type": "integer" } } }, "auth.TfaRes": { "type": "object", "properties": { "jwt": { "type": "string" } } }, "auth_defense.BatchDeleteUserReq": { "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "auth_defense.CreateSourceReq": { "type": "object", "properties": { "association": { "$ref": "#/definitions/model.AuthDefenseSourceAssociation" }, "auth": { "$ref": "#/definitions/model.PolicyAuth" }, "network_proxy": { "type": "boolean" }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "auth_defense.CreateUserReq": { "type": "object", "required": [ "password", "username" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } }, "auth_defense.GetAuthDefenseLogsRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.Log" } }, "total": { "type": "integer" } } }, "auth_defense.GetAuthDefenseLogsV2Item": { "type": "object", "properties": { "auth_source_id": { "type": "integer" }, "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "policy_id": { "type": "integer" }, "province": { "type": "string" }, "result": { "type": "boolean" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "source_type": { "$ref": "#/definitions/model.AuthDefenseSourceType" }, "status": { "$ref": "#/definitions/model.AuthDefenseVerifyStatus" }, "third_id": { "type": "string" }, "updated_at": { "type": "string" }, "user_id": { "type": "integer" }, "username": { "type": "string" }, "uuid": { "type": "string" } } }, "auth_defense.GetAuthDefenseLogsV2Res": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.GetAuthDefenseLogsV2Item" } }, "total": { "type": "integer" } } }, "auth_defense.GetUserRes": { "type": "object", "properties": { "binds": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UserBind" } }, "email": { "type": "string" }, "last_login": { "type": "integer" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.GetUserSite" } } } }, "auth_defense.GetUserSite": { "type": "object", "properties": { "site_id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.AuthDefenseUserSiteStatus" } } }, "auth_defense.ListGroupItem": { "type": "object", "properties": { "id": { "type": "integer" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "auth_defense.ListGroupRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListGroupItem" } } } }, "auth_defense.ListSourceUserItem": { "type": "object", "properties": { "id": { "type": "integer" }, "last_login": { "type": "integer" }, "status": { "$ref": "#/definitions/model.AuthDefenseSourceUserStatus" }, "uname": { "type": "string" } } }, "auth_defense.ListSourceUserRes": { "type": "object", "properties": { "approved_total": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListSourceUserItem" } }, "total": { "type": "integer" }, "user_total": { "type": "integer" } } }, "auth_defense.ListUserItem": { "type": "object", "properties": { "binds": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UserBind" } }, "id": { "type": "integer" }, "last_login": { "type": "integer" }, "tfa_binded": { "type": "boolean" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "integer" } } }, "auth_defense.ListUserRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListUserItem" } }, "limit": { "type": "integer" }, "total": { "type": "integer" } } }, "auth_defense.ListUserReviewItem": { "type": "object", "properties": { "auth_user_id": { "type": "integer" }, "id": { "type": "integer" }, "request_time": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "status": { "$ref": "#/definitions/model.AuthDefenseUserReviewStatus" }, "username": { "type": "string" } } }, "auth_defense.ListUserReviewRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListUserReviewItem" } }, "total": { "type": "integer" } } }, "auth_defense.Log": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "deny_count": { "type": "integer" }, "dur_sec": { "type": "integer" }, "ended_at": { "type": "integer" }, "event_id": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "pass_count": { "type": "integer" }, "province": { "type": "string" }, "rule_id": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "started_at": { "type": "integer" }, "trigger_count": { "type": "integer" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "auth_defense.MergeUserReq": { "type": "object", "required": [ "main" ], "properties": { "dry_run": { "type": "boolean" }, "main": { "type": "integer" }, "merges": { "type": "array", "items": { "type": "integer" } } } }, "auth_defense.MergeUserRes": { "type": "object", "properties": { "binds": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UserBind" } }, "email": { "type": "string" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.GetUserSite" } } } }, "auth_defense.PutSourceUserReq": { "type": "object", "required": [ "status" ], "properties": { "status": { "enum": [ 1, 2 ], "allOf": [ { "$ref": "#/definitions/model.AuthDefenseSourceUserStatus" } ] } } }, "auth_defense.UnbindUserReq": { "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "auth_defense.UpdateSourceReq": { "type": "object", "properties": { "association": { "$ref": "#/definitions/model.AuthDefenseSourceAssociation" }, "auth": { "$ref": "#/definitions/model.PolicyAuth" }, "network_proxy": { "type": "boolean" }, "title": { "type": "string" } } }, "auth_defense.UpdateUserReq": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UpdateUserSite" } } } }, "auth_defense.UpdateUserSite": { "type": "object", "properties": { "site_id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.AuthDefenseUserSiteStatus" } } }, "auth_defense.UserBind": { "type": "object", "properties": { "source_type": { "$ref": "#/definitions/model.AuthDefenseSourceType" }, "third_id": { "type": "string" } } }, "auth_defense.UserReviewReq": { "type": "object", "required": [ "status" ], "properties": { "status": { "maximum": 2, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.AuthDefenseUserReviewStatus" } ] } } }, "business.GetFrontendStyleRes": { "type": "object", "properties": { "icon": { "type": "string" }, "title": { "type": "string" } } }, "business.PutFrontendStyleReq": { "type": "object", "properties": { "icon": { "type": "string" }, "title": { "type": "string" } } }, "cert.CertDetail": { "type": "object", "properties": { "acme": { "$ref": "#/definitions/cert.acmeVO" }, "id": { "type": "integer" }, "manual": { "$ref": "#/definitions/cert.manual" }, "type": { "type": "integer" } } }, "cert.acmeVO": { "type": "object", "properties": { "domains": { "type": "array", "items": { "type": "string" } }, "email": { "type": "string" } } }, "cert.manual": { "type": "object", "properties": { "crt": { "type": "string" }, "key": { "type": "string" } } }, "challenge.ChallengeConfig": { "type": "object", "properties": { "server": { "$ref": "#/definitions/constants.ChallengeServer" } } }, "cloud.GetCloudPoliciesItem": { "type": "object", "properties": { "added": { "type": "boolean" }, "auth_rule": { "type": "integer" }, "black_rule": { "type": "integer" }, "captcha_rule": { "type": "integer" }, "compatible": { "type": "integer" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "org_name": { "type": "string" }, "policy_name": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "updated_at": { "type": "string" }, "white_rule": { "type": "integer" } } }, "cloud.SubCloudPolicyReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "commercial.DashboardTokenReq": { "type": "object", "properties": { "expired_at": { "type": "integer" } } }, "constants.ChallengeServer": { "type": "string", "enum": [ "cloud", "local" ], "x-enum-varnames": [ "ChallengeServerCloud", "ChallengeServerLocal" ] }, "consts.UserRole": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5 ], "x-enum-varnames": [ "UserRoleUnknown", "UserRoleAdmin", "UserRoleManager", "UserRoleConfig", "UserRoleAudit", "UserRoleMax" ] }, "detect.Mode": { "type": "string", "enum": [ "strict", "default", "dry_run", "disable", "deny" ], "x-enum-varnames": [ "StrictMode", "DefaultMode", "DryRunMode", "DisableMode", "DenyMode" ] }, "detect.SkynetInfo": { "type": "object", "properties": { "attack_type": { "type": "integer" }, "attack_type_name": { "type": "string" }, "id": { "type": "string" }, "mode": { "$ref": "#/definitions/detect.Mode" }, "name": { "type": "string" }, "risk_level": { "type": "integer" } } }, "forwarding_rule.CreateRequest": { "type": "object", "required": [ "path_prefix", "upstreams" ], "properties": { "comment": { "type": "string" }, "path_prefix": { "type": "string" }, "upstreams": { "type": "array", "minItems": 1, "items": { "type": "string" } } } }, "forwarding_rule.EditRequest": { "type": "object", "required": [ "path_prefix", "upstreams" ], "properties": { "comment": { "type": "string" }, "path_prefix": { "type": "string" }, "upstreams": { "type": "array", "minItems": 1, "items": { "type": "string" } } } }, "forwarding_rule.SwitchRequest": { "type": "object", "properties": { "is_enabled": { "type": "boolean" } } }, "ipg.IPGroupVO": { "type": "object", "properties": { "builtin": { "type": "boolean" }, "comment": { "type": "string" }, "id": { "type": "integer" }, "ips": { "type": "array", "items": { "type": "string" } }, "reference": { "type": "string" }, "total": { "type": "integer" }, "updated_at": { "type": "string" } } }, "ja4.GetJa4Response": { "type": "object", "properties": { "count": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "pro": { "type": "boolean" }, "updated_at": { "type": "integer" } } }, "ja4.SetJa4Request": { "type": "object", "properties": { "pro": { "type": "boolean" } } }, "license.State": { "type": "string", "enum": [ "unknown", "none", "applying", "rejected", "approved", "revoked", "revoking", "expired", "verify_failed", "downgrade", "arch_mismatch" ], "x-enum-comments": { "StateApplying": "应用中", "StateApproved": "有效", "StateDowngrade": "license 降级", "StateExpired": "过期", "StateNone": "没有license", "StateRejected": "无效", "StateRevoked": "回收", "StateRevoking": "回收中,由于还未被回收,认为 license 状态有效", "StateVerifyFailed": "请求百川报错" }, "x-enum-descriptions": [ "", "没有license", "应用中", "无效", "有效", "回收", "回收中,由于还未被回收,认为 license 状态有效", "过期", "请求百川报错", "license 降级", "" ], "x-enum-varnames": [ "StateUnknown", "StateNone", "StateApplying", "StateRejected", "StateApproved", "StateRevoked", "StateRevoking", "StateExpired", "StateVerifyFailed", "StateDowngrade", "StateArchMismatch" ] }, "mcp.GetMcpResponse": { "type": "object", "properties": { "secret": { "description": "mcp secret", "type": "string" }, "server": { "description": "mcp server address", "type": "string" } } }, "mcp.SetMcpRequest": { "type": "object", "properties": { "secret": { "description": "mcp secret", "type": "string" }, "server": { "description": "mcp server address", "type": "string" } } }, "model.ACLConfigAction": { "type": "string", "enum": [ "ban", "challenge" ], "x-enum-varnames": [ "ACLConfigActionBan", "ACLConfigActionChallenge" ] }, "model.ACLConfigType": { "type": "string", "enum": [ "req", "attack", "error" ], "x-enum-comments": { "ACLConfigTypeAttack": "高频攻击", "ACLConfigTypeError": "高频错误", "ACLConfigTypeReq": "高频请求" }, "x-enum-descriptions": [ "高频请求", "高频攻击", "高频错误" ], "x-enum-varnames": [ "ACLConfigTypeReq", "ACLConfigTypeAttack", "ACLConfigTypeError" ] }, "model.AccountConfig": { "type": "object", "required": [ "access_whitelist" ], "properties": { "access_whitelist": { "description": "ip 或 cidr", "type": "array", "items": { "type": "string" } }, "expired_unit": { "description": "过期时间单位, day, hour, minute", "allOf": [ { "$ref": "#/definitions/model.TimeUnit" } ] }, "lock_config": { "description": "账号锁定配置", "allOf": [ { "$ref": "#/definitions/model.AccountConfigLock" } ] }, "login_expire": { "description": "过期秒数", "type": "integer" }, "password_complex": { "type": "array", "items": { "$ref": "#/definitions/model.PasswordChar" } }, "password_expire_day": { "description": "过期天数", "type": "integer" }, "password_length": { "type": "integer" } } }, "model.AccountConfigLock": { "type": "object", "properties": { "lock_interval": { "description": "锁定时间", "type": "integer" }, "lock_interval_unit": { "description": "锁定时间单位", "allOf": [ { "$ref": "#/definitions/model.TimeUnit" } ] }, "login_failed": { "description": "登录失败次数", "type": "integer" } } }, "model.Alarm": { "type": "object", "properties": { "created_at": { "type": "string" }, "cur_platform": { "description": "当前告警平台", "type": "string" }, "event": { "$ref": "#/definitions/model.JsonObject-model_AlarmEvent" }, "id": { "type": "integer" }, "network_proxy": { "description": "是否使用网络代理进行告警转发", "type": "boolean" }, "platform": { "$ref": "#/definitions/model.JsonObject-model_AlarmPlatform" }, "site_ids": { "description": "告警的站点ID,如果为空,则告警所有站点", "type": "array", "items": { "type": "integer" } }, "updated_at": { "type": "string" } } }, "model.AlarmConfig": { "type": "object", "properties": { "alarm_period": { "type": "integer" }, "enabled": { "type": "boolean" } } }, "model.AlarmEvent": { "type": "object", "properties": { "acl": { "$ref": "#/definitions/model.AlarmConfig" }, "attack": { "$ref": "#/definitions/model.AlarmConfig" }, "auth_defense": { "$ref": "#/definitions/model.AlarmConfig" }, "black_white": { "$ref": "#/definitions/model.AlarmConfig" }, "challenge": { "$ref": "#/definitions/model.AlarmConfig" }, "system": { "$ref": "#/definitions/model.AlarmConfig" }, "tamper": { "$ref": "#/definitions/model.AlarmConfig" }, "waiting_room": { "$ref": "#/definitions/model.AlarmConfig" } } }, "model.AlarmPlatform": { "type": "object", "properties": { "ding_talk": { "$ref": "#/definitions/model.DingTalkConfig" }, "discord": { "$ref": "#/definitions/model.DiscordConfig" }, "feishu": { "$ref": "#/definitions/model.FeishuConfig" }, "qiye_weixin": { "$ref": "#/definitions/model.QiyeWeixinConfig" }, "telegram": { "$ref": "#/definitions/model.TelegramConfig" } } }, "model.AuthDefenseSource": { "type": "object", "properties": { "association": { "$ref": "#/definitions/model.AuthDefenseSourceAssociation" }, "auth": { "$ref": "#/definitions/model.PolicyAuth" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "network_proxy": { "type": "boolean" }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" }, "updated_at": { "type": "string" }, "user": { "type": "array", "items": { "$ref": "#/definitions/model.PolicyUser" } } } }, "model.AuthDefenseSourceAssociation": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "AuthDefenseSourceAssociationNone", "AuthDefenseSourceAssociationEmail", "AuthDefenseSourceAssociationPhone" ] }, "model.AuthDefenseSourceType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "x-enum-varnames": [ "AuthDefenseSourceTypePass", "AuthDefenseSourceTypeWechatAccountsPlatform", "AuthDefenseSourceTypeGithub", "AuthDefenseSourceTypeCAS", "AuthDefenseSourceTypeOIDC", "AuthDefenseSourceTypeDingtalk", "AuthDefenseSourceTypeQYWeixin", "AuthDefenseSourceTypeLDAP", "AuthDefenseSourceTypeMax" ] }, "model.AuthDefenseSourceUserStatus": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "AuthDefenseSourceUserStatusReview", "AuthDefenseSourceUserStatusApproved", "AuthDefenseSourceUserStatusDenied" ] }, "model.AuthDefenseUserReviewStatus": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "AuthDefenseUserReviewStatusReview", "AuthDefenseUserReviewStatusAllow", "AuthDefenseUserReviewStatusDeny" ] }, "model.AuthDefenseUserSiteStatus": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "x-enum-varnames": [ "AuthDefenseUserSiteStatusUnknown", "AuthDefenseUserSiteStatusAllow", "AuthDefenseUserSiteStatusDeny", "AuthDefenseUserSiteStatusMax" ] }, "model.AuthDefenseVerifyStatus": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "AuthDefenseVerifyFail", "AuthDefenseVerifyStatusSuccess", "AuthDefenseVerifyStatusReject", "AuthDefenseVerifyStatusPending", "AuthDefenseVerifyStatusReview" ] }, "model.CASConfig": { "type": "object", "properties": { "mapping": { "description": "角色和 cas 服务关系映射", "type": "object", "additionalProperties": { "$ref": "#/definitions/consts.UserRole" } }, "role_key": { "description": "获取 角色 的 key", "type": "string" }, "url": { "description": "cas 服务地址", "type": "string" }, "version": { "description": "cas 版本", "type": "integer" } } }, "model.Chaos": { "type": "object", "properties": { "created_at": { "type": "string" }, "html_encryption": { "type": "boolean" }, "html_fast_decryption": { "type": "boolean" }, "id": { "type": "integer" }, "img_encryption": { "type": "boolean" }, "img_text": { "type": "string" }, "img_watermark": { "type": "string" }, "is_enabled": { "type": "boolean" }, "js_encryption": { "type": "boolean" }, "js_path": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "updated_at": { "type": "string" }, "website_id": { "type": "integer" } } }, "model.CommonColor": { "type": "object", "properties": { "font_color": { "type": "string" }, "light_font_color": { "type": "string" }, "light_primary_color": { "type": "string" }, "primary_color": { "type": "string" }, "success_color": { "type": "string" } } }, "model.CustomerService": { "type": "object", "properties": { "pages": { "type": "array", "items": { "type": "string" } }, "type": { "description": "1 全局显示 2 全局隐藏 3 部分隐藏", "type": "integer" } } }, "model.DetectLog": { "type": "object", "properties": { "action": { "description": "0: 放行, 1: 阻断", "type": "integer" }, "attack_type": { "type": "integer" }, "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "decode_path": { "type": "string" }, "dst_ip": { "type": "string" }, "dst_port": { "type": "integer" }, "eventId": { "type": "string" }, "event_id": { "description": "to eliminate ambiguous", "type": "string" }, "host": { "type": "string" }, "id": { "type": "integer" }, "ja4_fingerprint": { "type": "string" }, "lat": { "type": "string" }, "lng": { "type": "string" }, "location": { "type": "string" }, "method": { "type": "string" }, "module": { "type": "string" }, "payload": { "type": "string" }, "policy_name": { "type": "string" }, "protocol": { "type": "integer" }, "province": { "type": "string" }, "query_string": { "type": "string" }, "reason": { "type": "string" }, "req_body": { "type": "string" }, "req_header": { "type": "string" }, "risk_level": { "type": "integer" }, "rsp_body": { "type": "string" }, "rsp_header": { "type": "string" }, "rule_id": { "type": "string" }, "rule_id_list": { "type": "array", "items": { "type": "string" } }, "short_rule_id": { "type": "string" }, "site_uuid": { "type": "string" }, "socket_ip": { "type": "string" }, "src_ip": { "type": "string" }, "src_port": { "type": "integer" }, "status_code": { "type": "integer" }, "timestamp": { "type": "integer" }, "updated_at": { "type": "string" }, "url_path": { "type": "string" }, "website": { "type": "string" } } }, "model.DingTalkConfig": { "type": "object", "properties": { "sign": { "type": "string" }, "url": { "type": "string" } } }, "model.DiscordConfig": { "type": "object", "properties": { "url": { "type": "string" } } }, "model.ErrorColor": { "type": "object", "properties": { "warning_color": { "type": "string" }, "warning_font_color": { "type": "string" }, "warning_light_font_color": { "type": "string" } } }, "model.FeishuConfig": { "type": "object", "properties": { "sign": { "type": "string" }, "url": { "type": "string" } } }, "model.ForwardingRule": { "type": "object", "properties": { "comment": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "path_prefix": { "type": "string" }, "site_id": { "type": "integer" }, "updated_at": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "model.ForwardingRuleConfig": { "type": "object", "properties": { "id": { "type": "integer" }, "path_prefix": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "model.GlobalProxyConfig": { "type": "object", "properties": { "ip_source": { "$ref": "#/definitions/model.ProxyItem-string" }, "ipv6": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ssl_ciphers": { "$ref": "#/definitions/model.ProxyItem-string" }, "ssl_protocols": { "$ref": "#/definitions/model.ProxyItem-string" } } }, "model.HttpHeader": { "type": "object", "properties": { "key": { "type": "string" }, "op": { "type": "string" }, "target": { "type": "string" }, "val": { "type": "string" } } }, "model.Intelligence": { "type": "object", "properties": { "ip_group_id": { "type": "integer" }, "policy_rule_id": { "type": "integer" }, "share_enabled": { "type": "boolean" }, "updated_at": { "type": "string" }, "use_commercial_lib": { "type": "boolean" } } }, "model.JsonObject-model_AlarmEvent": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AlarmEvent" } } }, "model.JsonObject-model_AlarmPlatform": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AlarmPlatform" } } }, "model.LoadBalanceConfig": { "type": "object", "properties": { "balance_type": { "type": "integer" } } }, "model.LoginMethod": { "type": "object", "required": [ "type" ], "properties": { "cas": { "$ref": "#/definitions/model.CASConfig" }, "oauth": { "$ref": "#/definitions/model.OauthConfig" }, "type": { "type": "integer", "maximum": 3 } } }, "model.ManagerInfo": { "type": "object", "properties": { "common_color": { "$ref": "#/definitions/model.CommonColor" }, "error_color": { "$ref": "#/definitions/model.ErrorColor" }, "manager_info": { "type": "string" }, "page_manager_info": { "type": "object", "additionalProperties": { "type": "string" } } } }, "model.MatchCondition": { "type": "object", "properties": { "field": { "description": "匹配字段", "type": "string" }, "operator": { "description": "操作符", "allOf": [ { "$ref": "#/definitions/model.MatchOperator" } ] }, "value": { "description": "匹配值数组,数组中的值为或关系", "type": "array", "items": { "type": "string" } } } }, "model.MatchOperator": { "type": "string", "enum": [ "eq", "not_eq", "has", "not_has", "prefix", "re" ], "x-enum-comments": { "OperatorContains": "包含", "OperatorEqual": "等于", "OperatorNotContains": "不包含", "OperatorNotEqual": "不等于", "OperatorRegex": "正则匹配", "OperatorStartsWith": "前缀匹配" }, "x-enum-descriptions": [ "等于", "不等于", "包含", "不包含", "前缀匹配", "正则匹配" ], "x-enum-varnames": [ "OperatorEqual", "OperatorNotEqual", "OperatorContains", "OperatorNotContains", "OperatorStartsWith", "OperatorRegex" ] }, "model.NetworkProxy": { "type": "object", "properties": { "password": { "type": "string" }, "url": { "type": "string" }, "username": { "type": "string" } } }, "model.OauthConfig": { "type": "object", "properties": { "client_id": { "description": "客户端 ID", "type": "string" }, "client_secret": { "description": "客户端密钥", "type": "string" }, "mapping": { "description": "角色和 cas 服务关系映射", "type": "object", "additionalProperties": { "$ref": "#/definitions/consts.UserRole" } }, "role_key": { "description": "获取 角色 的 key", "type": "string" }, "scope": { "description": "作用域", "type": "string" }, "url": { "description": "oauth 服务地址", "type": "string" } } }, "model.PasswordChar": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "PasswordCharDigit", "PasswordCharSymbol", "PasswordCharUpper", "PasswordCharLower", "PasswordCharMax" ] }, "model.PasswordConfig": { "type": "object", "properties": { "title": { "type": "string" } } }, "model.PolicyAction": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 999, 999 ], "x-enum-varnames": [ "PolicyActionAllow", "PolicyActionDeny", "PolicyActionChallenge", "PolicyActionAuthDefense", "PolicyActionChaos", "PolicyActionWaitingRoom", "PolicyActionMix", "PolicyActionMax" ] }, "model.PolicyAuth": { "type": "object", "properties": { "cas": { "$ref": "#/definitions/model.PolicyAuthCAS" }, "ldap": { "$ref": "#/definitions/model.PolicyAuthLDAP" }, "oauth2": { "$ref": "#/definitions/model.PolicyAuthOauth2" } } }, "model.PolicyAuthCAS": { "type": "object", "properties": { "url": { "type": "string" } } }, "model.PolicyAuthLDAP": { "type": "object", "properties": { "base_dn": { "type": "string" }, "bind_dn": { "type": "string" }, "bind_pass": { "type": "string" }, "filter": { "type": "string" }, "url": { "type": "string" } } }, "model.PolicyAuthOauth2": { "type": "object", "properties": { "app_id": { "type": "string" }, "app_secret": { "type": "string" }, "extra": { "type": "object", "additionalProperties": { "type": "string" } }, "provider": { "type": "string" } } }, "model.PolicyReview": { "type": "integer", "enum": [ 0, 1 ], "x-enum-varnames": [ "PolicyReviewRequired", "PolicyReviewNone" ] }, "model.PolicyUser": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "model.PortalConfig": { "type": "object", "properties": { "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "cert_id": { "type": "integer" }, "domain": { "type": "string" }, "enable": { "type": "boolean" }, "port": { "description": "Deprecated", "type": "integer" }, "ports": { "type": "array", "items": { "type": "string" } }, "tfa_enabled": { "type": "boolean" } } }, "model.PortalStyle": { "type": "object", "properties": { "app_arrange": { "type": "string" }, "icon": { "type": "string" }, "theme": { "type": "string" }, "title": { "type": "string" } } }, "model.ProxyConfig": { "type": "object", "properties": { "br": { "$ref": "#/definitions/model.ProxyItem-bool" }, "created_at": { "type": "string" }, "default_server": { "$ref": "#/definitions/model.ProxyItem-bool" }, "force_https": { "$ref": "#/definitions/model.ProxyItem-bool" }, "global": { "$ref": "#/definitions/model.GlobalProxyConfig" }, "gzip": { "$ref": "#/definitions/model.ProxyItem-bool" }, "host": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_max_age": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts_preload": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_sub": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http2": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http3": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_1.0": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_headers": { "$ref": "#/definitions/model.ProxyItem-model_HttpHeaders" }, "id": { "type": "integer" }, "ip_source": { "$ref": "#/definitions/model.ProxyItem-string" }, "ip_value": { "$ref": "#/definitions/model.ProxyItem-string" }, "ipv6": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ntlm": { "$ref": "#/definitions/model.ProxyItem-bool" }, "reset_xff": { "$ref": "#/definitions/model.ProxyItem-bool" }, "site_id": { "type": "integer" }, "sse": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ssl_ciphers": { "$ref": "#/definitions/model.ProxyItem-string" }, "ssl_protocols": { "description": "SSLMode ProxyItem[string] `gorm:\"column:ssl_mode;type:jsonb;\" json:\"ssl_mode\"`", "allOf": [ { "$ref": "#/definitions/model.ProxyItem-string" } ] }, "updated_at": { "type": "string" }, "xfh": { "$ref": "#/definitions/model.ProxyItem-string" }, "xfp": { "$ref": "#/definitions/model.ProxyItem-string" } } }, "model.ProxyItem-bool": { "type": "object", "properties": { "global": { "type": "boolean" }, "value": { "type": "boolean" } } }, "model.ProxyItem-model_HttpHeaders": { "type": "object", "properties": { "global": { "type": "boolean" }, "value": { "type": "array", "items": { "$ref": "#/definitions/model.HttpHeader" } } } }, "model.ProxyItem-string": { "type": "object", "properties": { "global": { "type": "boolean" }, "value": { "type": "string" } } }, "model.QiyeWeixinConfig": { "type": "object", "properties": { "url": { "type": "string" } } }, "model.ReceiverConfig": { "type": "object", "properties": { "host": { "type": "string" }, "label": { "type": "string" }, "log_types": { "type": "array", "items": { "type": "string" } }, "port": { "type": "integer" }, "protocol": { "type": "string" }, "rfc": { "type": "string" }, "type": { "type": "string" } } }, "model.ReportData": { "type": "object", "properties": { "access": { "$ref": "#/definitions/model.ReportDataAccess" }, "attack": { "$ref": "#/definitions/model.ReportDataAttack" }, "count": { "$ref": "#/definitions/model.ReportDataCount" }, "geo": { "$ref": "#/definitions/model.ReportDataGeo" }, "trend": { "$ref": "#/definitions/model.ReportDataTrend" } } }, "model.ReportDataAccess": { "type": "object", "properties": { "domain": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "page": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } } } }, "model.ReportDataAttack": { "type": "object", "properties": { "domain": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "page": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "src_ip": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataAttackGeoItem" } }, "type": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "website": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } } } }, "model.ReportDataAttackGeoItem": { "type": "object", "properties": { "city": { "type": "string" }, "count": { "type": "integer" }, "country": { "type": "string" }, "key": { "type": "string" }, "province": { "type": "string" } } }, "model.ReportDataCount": { "type": "object", "properties": { "intercept": { "type": "integer" }, "ip": { "type": "integer" }, "request": { "type": "integer" }, "uv": { "type": "integer" }, "website": { "type": "integer" } } }, "model.ReportDataCountItem": { "type": "object", "properties": { "count": { "type": "integer" }, "key": { "type": "string" } } }, "model.ReportDataGeo": { "type": "object", "properties": { "intercept_country": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } }, "intercept_province": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } }, "request_country": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } }, "request_province": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } } } }, "model.ReportDataGeoItem": { "type": "object", "properties": { "count": { "type": "integer" }, "location": { "type": "string" } } }, "model.ReportDataTrend": { "type": "object", "properties": { "acl": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "attack": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "auth_defense": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "black_white": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "challenge": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "intercept": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "request": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "waiting_room": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } } } }, "model.ReportDataTrendItem": { "type": "object", "properties": { "count": { "type": "integer" }, "trend_time": { "type": "integer" } } }, "model.Resource": { "type": "object", "properties": { "content_length": { "type": "integer" }, "content_type": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "method": { "type": "string" }, "path": { "description": "resource content", "type": "string" }, "req_header": { "type": "string" }, "req_today": { "type": "integer" }, "response_time": { "type": "integer" }, "site_id": { "type": "integer" }, "status_code": { "type": "integer" }, "updated_at": { "type": "string" } } }, "model.RuleCondition": { "type": "object", "properties": { "condition": { "description": "匹配条件", "allOf": [ { "$ref": "#/definitions/model.MatchCondition" } ] }, "strategy": { "description": "策略名称", "type": "string" } } }, "model.RuleDetectLog": { "type": "object", "properties": { "action": { "description": "0: 放行, 1: 阻断", "type": "integer" }, "attack_type": { "type": "integer" }, "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "decode_path": { "type": "string" }, "dst_ip": { "type": "string" }, "dst_port": { "type": "integer" }, "eventId": { "type": "string" }, "event_id": { "description": "to eliminate ambiguous", "type": "string" }, "host": { "type": "string" }, "id": { "type": "integer" }, "ja4_fingerprint": { "type": "string" }, "lat": { "type": "string" }, "lng": { "type": "string" }, "location": { "type": "string" }, "method": { "type": "string" }, "module": { "type": "string" }, "payload": { "type": "string" }, "policy_name": { "type": "string" }, "protocol": { "type": "integer" }, "province": { "type": "string" }, "query_string": { "type": "string" }, "reason": { "type": "string" }, "req_body": { "type": "string" }, "req_header": { "type": "string" }, "risk_level": { "type": "integer" }, "rsp_body": { "type": "string" }, "rsp_header": { "type": "string" }, "rule_id": { "type": "string" }, "rule_id_list": { "type": "array", "items": { "type": "string" } }, "short_rule_id": { "type": "string" }, "site_uuid": { "type": "string" }, "socket_ip": { "type": "string" }, "src_ip": { "type": "string" }, "src_port": { "type": "integer" }, "status_code": { "type": "integer" }, "timestamp": { "type": "integer" }, "updated_at": { "type": "string" }, "url_path": { "type": "string" }, "website": { "type": "string" } } }, "model.RulePattern": { "type": "object", "properties": { "k": { "type": "string" }, "op": { "type": "string" }, "sub_k": { "type": "string" }, "v": { "type": "array", "items": { "type": "string" } } } }, "model.SemanticConfig": { "type": "object", "additionalProperties": { "type": "string" } }, "model.SiteExcludes": { "type": "object", "properties": { "content_types": { "type": "array", "items": { "type": "string" } }, "prefixes": { "type": "array", "items": { "type": "string" } } } }, "model.SkynetMoudle": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "semantics": { "$ref": "#/definitions/model.SemanticConfig" }, "site_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "model.TelegramConfig": { "type": "object", "properties": { "chat_id": { "type": "integer" }, "token": { "type": "string" } } }, "model.TimeUnit": { "type": "string", "enum": [ "day", "hour", "minute" ], "x-enum-varnames": [ "TimeUnitDay", "TimeUnitHour", "TimeUnitMinute" ] }, "model.WaitingRoom": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "max_concurrent": { "description": "当前允许最大同时在线的人数", "type": "integer" }, "max_waiting": { "description": "当前允许最大同时排队的人数", "type": "integer" }, "name": { "type": "string" }, "session_timeout": { "description": "服务队列中 session 的存活周期", "type": "integer" }, "updated_at": { "type": "string" }, "website_id": { "type": "integer" } } }, "model.WebsiteResource": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/model.Resource" } }, "total": { "type": "integer" } } }, "policy.DeletePolicyReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "policy.GetPolicyRes": { "type": "object", "properties": { "action": { "description": "0 -> allow, 1 -> deny", "allOf": [ { "$ref": "#/definitions/model.PolicyAction" } ] }, "auth_callback": { "type": "string" }, "auth_rule": { "type": "integer" }, "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "black_rule": { "type": "integer" }, "builtin": { "type": "boolean" }, "captcha_rule": { "type": "integer" }, "cloud_id": { "type": "integer" }, "cloud_total": { "type": "integer" }, "compatible": { "type": "integer" }, "created_at": { "type": "string" }, "expire": { "type": "integer" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "level": { "type": "integer" }, "log": { "type": "boolean" }, "name": { "type": "string" }, "negate": { "type": "boolean" }, "pass_count": { "type": "integer" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } }, "replay": { "type": "boolean" }, "req_count": { "type": "integer" }, "review": { "$ref": "#/definitions/model.PolicyReview" }, "tfa_enabled": { "type": "boolean" }, "updated_at": { "type": "string" }, "white_rule": { "type": "integer" } } }, "policy.ListPolicyRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/policy.GetPolicyRes" } }, "total": { "type": "integer" } } }, "policy.PostPolicyReq": { "type": "object", "properties": { "action": { "$ref": "#/definitions/model.PolicyAction" }, "expire": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "level": { "type": "integer" }, "log": { "type": "boolean" }, "name": { "type": "string" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } } } }, "policy.PutPolicyReq": { "type": "object", "properties": { "action": { "$ref": "#/definitions/model.PolicyAction" }, "expire": { "type": "integer" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "level": { "type": "integer" }, "log": { "type": "boolean" }, "name": { "type": "string" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } } } }, "policy.PutPolicySwitchReq": { "type": "object", "properties": { "id": { "type": "integer" }, "is_enabled": { "type": "boolean" } } }, "portal.GetAuthSourceItem": { "type": "object", "properties": { "id": { "type": "integer" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "portal.GetRes": { "type": "object", "properties": { "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "auth_sources": { "type": "array", "items": { "$ref": "#/definitions/portal.GetAuthSourceItem" } }, "cert_id": { "type": "integer" }, "domain": { "type": "string" }, "enable": { "type": "boolean" }, "ports": { "type": "array", "items": { "type": "string" } }, "tfa_enabled": { "type": "boolean" } } }, "portal.PutProxyConfigReq": { "type": "object", "properties": { "force_https": { "type": "boolean" } } }, "proxy.Config": { "type": "object", "properties": { "br": { "$ref": "#/definitions/model.ProxyItem-bool" }, "default_server": { "$ref": "#/definitions/model.ProxyItem-bool" }, "force_https": { "$ref": "#/definitions/model.ProxyItem-bool" }, "gzip": { "$ref": "#/definitions/model.ProxyItem-bool" }, "host": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_max_age": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts_preload": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_sub": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http2": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http3": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_1.0": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_headers": { "$ref": "#/definitions/model.ProxyItem-model_HttpHeaders" }, "ip_source": { "$ref": "#/definitions/model.ProxyItem-string" }, "ip_value": { "$ref": "#/definitions/model.ProxyItem-string" }, "ipv6": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ntlm": { "$ref": "#/definitions/model.ProxyItem-bool" }, "reset_xff": { "$ref": "#/definitions/model.ProxyItem-bool" }, "sse": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ssl_ciphers": { "$ref": "#/definitions/model.ProxyItem-string" }, "ssl_protocols": { "$ref": "#/definitions/model.ProxyItem-string" }, "xfh": { "$ref": "#/definitions/model.ProxyItem-string" }, "xfp": { "$ref": "#/definitions/model.ProxyItem-string" } } }, "record.Event": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "deny_count": { "type": "integer" }, "dst_port": { "type": "integer" }, "end_at": { "type": "integer" }, "finished": { "type": "boolean" }, "host": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "pass_count": { "type": "integer" }, "protocol": { "type": "integer" }, "province": { "type": "string" }, "start_at": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "record.EventListRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/record.Event" } }, "total": { "type": "integer" } } }, "record.GetDetectLogListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.DetectLog" } }, "total": { "type": "integer" } } }, "record.GetRuleDetectLogListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.RuleDetectLog" } }, "total": { "type": "integer" } } }, "report.CreateReq": { "type": "object", "required": [ "name" ], "properties": { "begin_time": { "type": "integer" }, "end_time": { "type": "integer" }, "name": { "type": "string" } } }, "report.GetRes": { "type": "object", "properties": { "begin_time": { "type": "integer" }, "created_at": { "type": "integer" }, "data": { "$ref": "#/definitions/model.ReportData" }, "end_time": { "type": "integer" }, "error": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "state": { "type": "string" } } }, "report.ListItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "error": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "state": { "type": "string" } } }, "report.ListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/report.ListItem" } }, "total": { "type": "integer" } } }, "resource.RemoveReq": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "resource.UpdateExcludesReq": { "type": "object", "properties": { "content_types": { "type": "array", "items": { "type": "string" } }, "prefixes": { "type": "array", "items": { "type": "string" } } } }, "response.JSONBody": { "type": "object", "properties": { "data": {}, "err": { "type": "string" }, "msg": { "type": "string" } } }, "river.Edition": { "type": "integer", "format": "int32", "enum": [ 0, 1, 2, 3 ], "x-enum-comments": { "Edition_EDITION_ENTERPRISE": "企业版", "Edition_EDITION_LITE": "Lite 版", "Edition_EDITION_PROFESSIONAL": "专业版", "Edition_EDITION_UNKOWN": "未知" }, "x-enum-descriptions": [ "未知", "专业版", "企业版", "Lite 版" ], "x-enum-varnames": [ "Edition_EDITION_UNKOWN", "Edition_EDITION_PROFESSIONAL", "Edition_EDITION_ENTERPRISE", "Edition_EDITION_LITE" ] }, "safepoint.PostConsultReq": { "type": "object", "properties": { "apps": { "type": "array", "items": { "type": "string" } }, "company": { "type": "string" }, "email": { "type": "string" }, "location": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "phone": { "type": "string" }, "purpose": { "type": "string" } } }, "securityposture.Event": { "type": "object", "properties": { "end": { "type": "integer" }, "host": { "type": "string" }, "ip": { "type": "string" }, "port": { "type": "string" }, "start": { "type": "integer" } } }, "securityposture.RealtimeEvent": { "type": "object", "properties": { "attack_type": { "type": "string" }, "event": { "$ref": "#/definitions/securityposture.Event" }, "event_type": { "type": "integer" }, "site_id": { "type": "integer" }, "site_name": { "type": "string" }, "time_stamp": { "type": "integer" } } }, "securityposture.RealtimeResponse": { "type": "object", "properties": { "event": { "type": "array", "items": { "$ref": "#/definitions/securityposture.RealtimeEvent" } } } }, "securityposture.SetSiteSecurityPostureBody": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "site_id": { "type": "integer" } } }, "securityposture.StatisticsResponse": { "type": "object", "properties": { "acl_hit": { "type": "integer" }, "anti_tamper": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "attack_allow": { "type": "integer" }, "attack_deny": { "type": "integer" }, "auth_allow": { "type": "integer" }, "auth_deny": { "type": "integer" }, "black_allow": { "type": "integer" }, "black_deny": { "type": "integer" }, "black_hit": { "type": "integer" }, "challenge_allow": { "type": "integer" }, "challenge_deny": { "type": "integer" }, "waiting_hit": { "type": "integer" }, "white_hit": { "type": "integer" } } }, "securityposture.TrendsQueryType": { "type": "string", "enum": [ "attack", "black_white", "acl", "challenge", "waiting", "auth", "attack_type", "black_white_rule", "attack_host", "attack_page" ], "x-enum-varnames": [ "TrendsQueryTypeAttack", "TrendsQueryTypeBlackWhite", "TrendsQueryTypeACL", "TrendsQueryTypeChallenge", "TrendsQueryTypeWaiting", "TrendsQueryTypeAuth", "TrendsQueryTypeAttackType", "TrendsQueryTypeBlackWhiteRule", "TrendsQueryTypeAttackHost", "TrendsQueryTypeAttackPage" ] }, "securityposture.TrendsResponse": { "type": "object", "properties": { "item": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "pass": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "top": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "site.AddStaticReq": { "type": "object", "required": [ "path" ], "properties": { "dir": { "type": "boolean" }, "page": { "type": "string" }, "path": { "type": "string" }, "zip": { "type": "boolean" } } }, "site.AntiTamperCreateReq": { "type": "object", "properties": { "resource_ids": { "type": "array", "items": { "type": "integer" } } } }, "site.AntiTamperDetailRes": { "type": "object", "properties": { "cache_sha256": { "type": "string" }, "cache_size": { "type": "integer" }, "cache_time": { "type": "integer" }, "change_sha256": { "type": "string" }, "change_size": { "type": "integer" }, "change_time": { "type": "integer" }, "changed": { "type": "boolean" }, "content_type": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "path": { "type": "string" }, "site_id": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "site.AntiTamperListData": { "type": "object", "properties": { "cache_time": { "type": "integer" }, "changed": { "type": "boolean" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "path": { "type": "string" }, "site_id": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "site.AntiTamperListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.AntiTamperListData" } }, "refresh_state": { "type": "string" }, "refresh_time": { "type": "integer" } } }, "site.CreateGroupReq": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "site.DeleteStaticReq": { "type": "object", "required": [ "path" ], "properties": { "path": { "type": "string" } } }, "site.DeleteWebsiteReq": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "site.GetWebsiteDetailRes": { "type": "object", "properties": { "access_log_limit": { "type": "integer" }, "acl_enabled": { "type": "boolean" }, "acl_response_html_path": { "type": "string" }, "acl_response_status_code": { "type": "integer" }, "auth_defense_id": { "type": "integer" }, "bad_gateway_html_path": { "type": "string" }, "bad_gateway_status_code": { "type": "integer" }, "cc_bot": { "type": "boolean" }, "cert_filename": { "description": "3.5.0 存储时废弃,tcd通信时仍使用", "type": "string" }, "cert_id": { "type": "integer" }, "cert_type": { "description": "0 -> no cert, 1 -> upload, 2 -> self-signed, 3 -> choose mgt cert\nCertType 3.5.0 存储时废弃", "type": "integer" }, "challenge_id": { "type": "integer" }, "chaos_id": { "type": "integer" }, "chaos_is_enabled": { "type": "boolean" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "custom_location": { "type": "array", "items": { "type": "string" } }, "denied_value": { "type": "integer" }, "email": { "type": "string" }, "error_log_limit": { "type": "integer" }, "exclude_content_type": { "type": "array", "items": { "type": "string" } }, "exclude_paths": { "type": "array", "items": { "type": "string" } }, "forbidden_html_path": { "type": "string" }, "forbidden_status_code": { "type": "integer" }, "forwarding_rules": { "description": "ForwardingRules 转发规则配置(非数据库字段,用于传输到 tcd)", "type": "array", "items": { "$ref": "#/definitions/model.ForwardingRuleConfig" } }, "gateway_timeout_html_path": { "type": "string" }, "gateway_timeout_status_code": { "type": "integer" }, "group_id": { "type": "integer" }, "health_check": { "type": "boolean" }, "health_state": { "type": "object", "additionalProperties": { "$ref": "#/definitions/site.HealthState" } }, "icon": { "type": "string" }, "id": { "type": "integer" }, "index": { "type": "string" }, "init": { "type": "boolean" }, "is_enabled": { "type": "boolean" }, "key_filename": { "type": "string" }, "load_balance": { "$ref": "#/definitions/model.LoadBalanceConfig" }, "mode": { "description": "0 -> defense, 1-> offline, 2 -> dry run", "type": "integer" }, "not_found_html_path": { "type": "string" }, "not_found_status_code": { "type": "integer" }, "offline_html_path": { "type": "string" }, "offline_status_code": { "type": "integer" }, "portal": { "type": "boolean" }, "portal_redirect": { "type": "string" }, "ports": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer" }, "redirect_status_code": { "type": "integer" }, "req_value": { "type": "integer" }, "semantics": { "type": "boolean" }, "server_names": { "type": "array", "items": { "type": "string" } }, "sp_enabled": { "description": "是否开启安全态势", "type": "boolean" }, "stat_enabled": { "description": "是否开启统计", "type": "boolean" }, "static": { "type": "boolean" }, "static_default": { "type": "integer" }, "tamper_refresh": { "description": "防篡改刷新时间(毫秒)", "type": "integer" }, "tamper_refresh_state": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "integer" }, "updated_at": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } }, "wr_id": { "type": "integer" } } }, "site.GetWebsiteItem": { "type": "object", "properties": { "access_log_limit": { "type": "integer" }, "acl_enabled": { "type": "boolean" }, "acl_response_html_path": { "type": "string" }, "acl_response_status_code": { "type": "integer" }, "auth_defense_id": { "type": "integer" }, "bad_gateway_html_path": { "type": "string" }, "bad_gateway_status_code": { "type": "integer" }, "cc_bot": { "type": "boolean" }, "cert_filename": { "description": "3.5.0 存储时废弃,tcd通信时仍使用", "type": "string" }, "cert_id": { "type": "integer" }, "cert_type": { "description": "0 -> no cert, 1 -> upload, 2 -> self-signed, 3 -> choose mgt cert\nCertType 3.5.0 存储时废弃", "type": "integer" }, "challenge_id": { "type": "integer" }, "chaos_id": { "type": "integer" }, "chaos_is_enabled": { "type": "boolean" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "custom_location": { "type": "array", "items": { "type": "string" } }, "denied_value": { "type": "integer" }, "email": { "type": "string" }, "error_log_limit": { "type": "integer" }, "exclude_content_type": { "type": "array", "items": { "type": "string" } }, "exclude_paths": { "type": "array", "items": { "type": "string" } }, "forbidden_html_path": { "type": "string" }, "forbidden_status_code": { "type": "integer" }, "forwarding_rules": { "description": "ForwardingRules 转发规则配置(非数据库字段,用于传输到 tcd)", "type": "array", "items": { "$ref": "#/definitions/model.ForwardingRuleConfig" } }, "gateway_timeout_html_path": { "type": "string" }, "gateway_timeout_status_code": { "type": "integer" }, "group_id": { "type": "integer" }, "health_check": { "type": "boolean" }, "health_state": { "type": "object", "additionalProperties": { "$ref": "#/definitions/site.HealthState" } }, "icon": { "type": "string" }, "id": { "type": "integer" }, "index": { "type": "string" }, "init": { "type": "boolean" }, "is_enabled": { "type": "boolean" }, "key_filename": { "type": "string" }, "load_balance": { "$ref": "#/definitions/model.LoadBalanceConfig" }, "mode": { "description": "0 -> defense, 1-> offline, 2 -> dry run", "type": "integer" }, "not_found_html_path": { "type": "string" }, "not_found_status_code": { "type": "integer" }, "offline_html_path": { "type": "string" }, "offline_status_code": { "type": "integer" }, "portal": { "type": "boolean" }, "portal_redirect": { "type": "string" }, "ports": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer" }, "redirect_status_code": { "type": "integer" }, "req_value": { "type": "integer" }, "semantics": { "type": "boolean" }, "server_names": { "type": "array", "items": { "type": "string" } }, "sp_enabled": { "description": "是否开启安全态势", "type": "boolean" }, "stat_enabled": { "description": "是否开启统计", "type": "boolean" }, "static": { "type": "boolean" }, "static_default": { "type": "integer" }, "tamper_refresh": { "description": "防篡改刷新时间(毫秒)", "type": "integer" }, "tamper_refresh_state": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "integer" }, "updated_at": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } }, "wr_id": { "type": "integer" } } }, "site.GetWebsiteRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.GetWebsiteItem" } }, "total": { "type": "integer" } } }, "site.GroupSwitchReq": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "site.HealthState": { "type": "object", "properties": { "error": { "type": "string" }, "state": { "type": "integer" } } }, "site.ListGroupItem": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "integer" }, "site_count": { "type": "integer" } } }, "site.ListGroupRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.ListGroupItem" } } } }, "site.ListLogItem": { "type": "object", "properties": { "filename": { "type": "string" }, "size": { "type": "integer" } } }, "site.NginxConfigGetRes": { "type": "object", "properties": { "config": { "type": "string" }, "custom_location": { "type": "array", "items": { "type": "string" } } } }, "site.NginxConfigUpdateReq": { "type": "object", "properties": { "custom_location": { "type": "array", "items": { "type": "string" } } } }, "site.PostWebsiteHealthcheckReq": { "type": "object", "properties": { "hosts": { "type": "array", "items": { "type": "string" } }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "site.PubWebsiteChallengeReq": { "type": "object", "properties": { "enable": { "type": "boolean" }, "expire": { "type": "integer" }, "id": { "type": "integer" }, "level": { "type": "integer" }, "negate": { "type": "boolean" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } }, "replay": { "type": "boolean" } } }, "site.PutWebsiteBasicInfoReq": { "type": "object", "properties": { "comment": { "type": "string" }, "group_id": { "type": "integer" }, "icon": { "type": "string" } } }, "site.PutWebsiteDefenseReq": { "type": "object", "properties": { "auth_callback": { "type": "string" }, "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "enable": { "type": "boolean" }, "id": { "type": "integer" }, "negate": { "type": "boolean" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } }, "portal_redirect": { "type": "string" }, "review": { "maximum": 1, "minimum": 0, "allOf": [ { "$ref": "#/definitions/model.PolicyReview" } ] }, "tfa_enabled": { "type": "boolean" } } }, "site.PutWebsiteModeRequest": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } }, "mode": { "type": "integer" } } }, "site.RenameStaticReq": { "type": "object", "required": [ "new_path", "old_path" ], "properties": { "copy": { "type": "boolean" }, "new_path": { "type": "string" }, "old_path": { "type": "string" } } }, "site.SetWebsiteWaitingRoomReq": { "type": "object", "properties": { "is_enabled": { "type": "boolean" }, "max_concurrent": { "description": "当前允许最大同时在线的人数", "type": "integer" }, "session_timeout": { "description": "服务队列中 session 的存活周期", "type": "integer" } } }, "site.SortGroupReq": { "type": "object", "required": [ "position" ], "properties": { "position": { "type": "integer", "minimum": 1 } } }, "site.SortWebsiteReq": { "type": "object", "required": [ "position" ], "properties": { "position": { "type": "integer", "minimum": 1 } } }, "site.UpdateGroupReq": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "site.UpdateSiteGroupReq": { "type": "object", "required": [ "group_id" ], "properties": { "group_id": { "type": "integer" } } }, "site.WaitingRoomLog": { "type": "object", "properties": { "avg_wait_sec": { "type": "integer" }, "bounce_rate": { "type": "number" }, "cur_waiting": { "type": "integer" }, "dur_sec": { "type": "integer" }, "ended_at": { "type": "integer" }, "max_concurrent": { "type": "integer" }, "rule_id": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "started_at": { "type": "integer" }, "top_waiting": { "type": "integer" }, "total_waiting": { "type": "integer" } } }, "site.WaitingRoomLogs": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.WaitingRoomLog" } }, "total": { "type": "integer" } } }, "site.WebsiteChaosReq": { "type": "object", "properties": { "html_encryption": { "type": "boolean" }, "html_fast_decryption": { "type": "boolean" }, "img_encryption": { "type": "boolean" }, "img_text": { "type": "string" }, "img_watermark": { "type": "string" }, "is_enabled": { "type": "boolean" }, "js_encryption": { "type": "boolean" }, "js_path": { "type": "array", "items": { "type": "string" } } } }, "site.WebsiteReq": { "type": "object", "properties": { "cert_id": { "type": "integer" }, "comment": { "type": "string" }, "email": { "type": "string" }, "group_id": { "type": "integer" }, "health_check": { "type": "boolean" }, "id": { "type": "integer" }, "index": { "type": "string" }, "load_balance": { "$ref": "#/definitions/model.LoadBalanceConfig" }, "ports": { "type": "array", "items": { "type": "string" } }, "redirect_status_code": { "type": "integer" }, "server_names": { "type": "array", "items": { "type": "string" } }, "stat_enabled": { "type": "boolean" }, "static_default": { "type": "integer" }, "type": { "type": "integer" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "skynet.GetGlobalSemanticsRes": { "type": "object", "properties": { "semantics": { "$ref": "#/definitions/model.SemanticConfig" } } }, "skynet.SemanticsConfigParams": { "type": "object", "required": [ "semantics" ], "properties": { "semantics": { "$ref": "#/definitions/model.SemanticConfig" }, "use_global": { "type": "boolean" } } }, "stat.AdvanceAccessRes": { "type": "object", "properties": { "access": { "type": "integer" }, "ip": { "type": "integer" }, "pv": { "type": "integer" }, "session": { "type": "integer" } } }, "stat.AdvanceAttackRes": { "type": "object", "properties": { "attack_ip": { "type": "integer" }, "intercept": { "type": "object", "properties": { "auth_defense": { "type": "integer" }, "blacklist": { "type": "integer" }, "block": { "type": "integer" }, "challenge": { "type": "integer" }, "offline": { "type": "integer" }, "rate_limit": { "type": "integer" } } } } }, "stat.AdvanceClientRes": { "type": "object", "properties": { "browser": { "type": "array", "items": { "type": "object", "properties": { "browser": { "type": "string" }, "count": { "type": "integer" } } } }, "os": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "os": { "type": "string" } } } } } }, "stat.AdvanceErrorStatusCodeRes": { "type": "object", "properties": { "error_4xx": { "type": "integer" }, "error_5xx": { "type": "integer" } } }, "system.AboutLicense": { "type": "object", "properties": { "valid": { "type": "boolean" } } }, "system.AboutRes": { "type": "object", "properties": { "cert_id": { "type": "integer" }, "created_at": { "type": "integer" }, "deprecated": { "type": "boolean" }, "license": { "$ref": "#/definitions/system.AboutLicense" }, "machine_id": { "type": "string" }, "outdated": { "type": "boolean" }, "oversea": { "type": "boolean" }, "password_expire_day": { "type": "integer" }, "slave": { "type": "boolean" }, "staging": { "type": "boolean" }, "time": { "type": "string" }, "version": { "type": "string" } } }, "system.CodeApplyInfoRes": { "type": "object", "properties": { "expired_at": { "type": "integer" }, "org_id": { "type": "string" }, "org_name": { "type": "string" }, "pwd_updated_at": { "type": "integer" }, "river_url": { "type": "string" }, "role": { "$ref": "#/definitions/consts.UserRole" }, "state": { "type": "string" }, "timeout": { "type": "boolean" }, "user_id": { "type": "integer" }, "version": { "$ref": "#/definitions/river.Edition" } } }, "system.CodeApplyReq": { "type": "object", "properties": { "code": { "type": "string" } } }, "system.EditionRes": { "type": "object", "properties": { "state": { "$ref": "#/definitions/license.State" }, "version": { "$ref": "#/definitions/river.Edition" } } }, "system.UpdateReq": { "type": "object", "properties": { "cert_id": { "type": "integer" } } }, "tcd.FileInfo": { "type": "object", "properties": { "content": { "type": "string" }, "content_type": { "type": "string" }, "dir": { "type": "boolean" }, "modify_time": { "type": "integer" }, "name": { "type": "string" }, "size": { "type": "integer" } } }, "user.CreateUserReq": { "type": "object", "required": [ "password", "role", "username" ], "properties": { "password": { "type": "string" }, "role": { "maximum": 4, "minimum": 1, "allOf": [ { "$ref": "#/definitions/consts.UserRole" } ] }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } }, "user.CreateUserResp": { "type": "object", "properties": { "id": { "type": "integer" } } }, "user.DeleteUserReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "user.GetUserListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/user.User" } } } }, "user.UpdateUserReq": { "type": "object", "properties": { "id": { "type": "integer" }, "password": { "type": "string" }, "role": { "$ref": "#/definitions/consts.UserRole" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } }, "user.User": { "type": "object", "properties": { "id": { "type": "integer" }, "last_login": { "type": "integer" }, "lock_until": { "type": "integer" }, "password_enabled": { "type": "boolean" }, "pwd_updated_at": { "type": "integer" }, "role": { "$ref": "#/definitions/consts.UserRole" }, "tfa_binded": { "type": "boolean" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } } }, "x-cli": { "tags": { "site": "防护站点管理", "cert": "授权与证书管理", "log": "日志查询", "stat": "数据统计", "skynet": "加强规则管理", "module": "语义分析模块配置", "rule": "自定义规则管理", "ipgroup": "IP 黑白名单管理" }, "children": { "log/attack": "攻击日志", "log/audit": "审计日志", "log/rule": "黑白名单检测日志", "stat/trend": "趋势统计" }, "params": { "server_names": "域名(多个用逗号分隔)", "ports": "端口(多个用逗号分隔)", "upstreams": "后端地址(多个用逗号分隔)", "cert_id": "证书 ID", "comment": "备注说明", "email": "管理员邮箱", "group_id": "分组 ID", "health_check": "是否启用健康检查", "id": "资源 ID", "ids": "资源 ID(多个用逗号分隔)", "site": "站点域名", "sp_enabled": "是否启用语义分析", "stat_enabled": "是否启用统计", "load_balance": "负载均衡策略", "name": "规则名称", "pattern": "匹配规则(JSON 格式)", "action": "动作类型:0-放行 1-阻断 2-挑战 3-认证防护 4-混淆 5-等待室", "level": "风险等级", "enable": "是否启用", "mode": "模式:strict/default/dry_run/disable/deny", "semantics": "语义分析配置", "use_global": "是否使用全局配置", "ips": "IP 地址(多个用逗号分隔)", "ip_group_ids": "IP Group ID(多个用逗号分隔)", "page": "页码", "page_size": "每页数量", "size": "每页数量", "start": "开始时间戳(秒)", "end": "结束时间戳(秒)", "begin_time": "开始时间戳(秒)", "end_time": "结束时间戳(秒)", "site_id": "站点 ID", "host": "域名", "ip": "IP 地址", "url": "URL 路径", "port": "端口", "attack_type": "攻击类型", "event_id": "事件 ID", "ja4_fingerprint": "JA4 指纹", "top": "返回前 N 条", "reference": "引用来源", "expire": "过期时间", "log": "是否记录日志", "is_enabled": "是否启用", "global": "是否全局" } } }