mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 07:36:37 +08:00
[优化] 更新文档
This commit is contained in:
@@ -196,6 +196,95 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/access-logs/folds/ip-summary": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"AccessLogs"
|
||||
],
|
||||
"summary": "List folded access log IP summaries",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Node ID",
|
||||
"name": "node_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Remote address",
|
||||
"name": "remote_addr",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Host",
|
||||
"name": "host",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Path",
|
||||
"name": "path",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bucket started at",
|
||||
"name": "bucket_started_at",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Fold minutes",
|
||||
"name": "fold_minutes",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page index",
|
||||
"name": "p",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page size",
|
||||
"name": "page_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Sort by",
|
||||
"name": "sort_by",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Sort order",
|
||||
"name": "sort_order",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/access-logs/ip-summary": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -352,7 +441,7 @@
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"AgentTokenAuth": []
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
@@ -398,7 +487,7 @@
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"AgentTokenAuth": []
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
@@ -423,7 +512,7 @@
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"AgentTokenAuth": []
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
@@ -469,7 +558,7 @@
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"AgentTokenAuth": []
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
@@ -511,6 +600,66 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/agent/waf/ip-groups/sync": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Agent"
|
||||
],
|
||||
"summary": "Sync WAF IP groups for agent",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "WAF IP group sync payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/service.AgentWAFIPGroupSyncInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/agent/ws": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Agent"
|
||||
],
|
||||
"summary": "Upgrade agent connection to websocket",
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/api/apply-logs/": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -996,6 +1145,130 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/flared/apply-log": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"TunnelTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Flared"
|
||||
],
|
||||
"summary": "Report OpenFlared apply result",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Apply log payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/service.ApplyLogPayload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/flared/config/active": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"TunnelTokenAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Flared"
|
||||
],
|
||||
"summary": "Get active tunnel config for OpenFlared",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/flared/heartbeat": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"TunnelTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Flared"
|
||||
],
|
||||
"summary": "Report OpenFlared heartbeat",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Flared heartbeat payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/service.FlaredHeartbeatPayload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/flared/ws": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"TunnelTokenAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Flared"
|
||||
],
|
||||
"summary": "Upgrade OpenFlared connection to websocket",
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/api/managed-domains/": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -1441,6 +1714,47 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/nodes/{id}/force-sync": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Nodes"
|
||||
],
|
||||
"summary": "Request force sync config on node",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Node ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/nodes/{id}/observability": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -2004,6 +2318,66 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/relay/heartbeat": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Relay"
|
||||
],
|
||||
"summary": "Report relay heartbeat",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Relay heartbeat payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/service.RelayHeartbeatPayload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/relay/ws": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"AccessTokenAuth": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Relay"
|
||||
],
|
||||
"summary": "Upgrade relay connection to websocket",
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/api/status": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -2528,6 +2902,11 @@
|
||||
},
|
||||
"/api/update/latest-release": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2691,6 +3070,9 @@
|
||||
"$ref": "#/definitions/service.AgentNodeAccessLog"
|
||||
}
|
||||
},
|
||||
"openresty_observation": {
|
||||
"$ref": "#/definitions/service.AgentNodeOpenrestyObservation"
|
||||
},
|
||||
"snapshot": {
|
||||
"$ref": "#/definitions/service.AgentNodeMetricSnapshot"
|
||||
},
|
||||
@@ -2772,6 +3154,20 @@
|
||||
"network_tx_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"storage_total_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"storage_used_bytes": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.AgentNodeOpenrestyObservation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"captured_at_unix": {
|
||||
"type": "integer"
|
||||
},
|
||||
"openresty_connections": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -2780,12 +3176,6 @@
|
||||
},
|
||||
"openresty_tx_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"storage_total_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"storage_used_bytes": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2798,9 +3188,6 @@
|
||||
"$ref": "#/definitions/service.AgentNodeAccessLog"
|
||||
}
|
||||
},
|
||||
"agent_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"buffered_observability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -2810,6 +3197,9 @@
|
||||
"current_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"ext_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"health_events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -2825,15 +3215,15 @@
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"nginx_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"node_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"openresty_message": {
|
||||
"type": "string"
|
||||
},
|
||||
"openresty_observation": {
|
||||
"$ref": "#/definitions/service.AgentNodeOpenrestyObservation"
|
||||
},
|
||||
"openresty_status": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2845,6 +3235,15 @@
|
||||
},
|
||||
"traffic_report": {
|
||||
"$ref": "#/definitions/service.AgentNodeTrafficReport"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
},
|
||||
"waf_ip_group_checksums": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2924,6 +3323,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.AgentWAFIPGroupSyncInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"checksums": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.ApplyLogPayload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2953,6 +3369,49 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.FlaredConnectedRelay": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"proxy_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"relay_node_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.FlaredHeartbeatPayload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"client_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"connected_relays": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/service.FlaredConnectedRelay"
|
||||
}
|
||||
},
|
||||
"current_checksum": {
|
||||
"type": "string"
|
||||
},
|
||||
"current_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"frp_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"ip": {
|
||||
"type": "string"
|
||||
},
|
||||
"tunnel_status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.ManagedDomainInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2996,6 +3455,28 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"node_type": {
|
||||
"description": "TunnelRelay fields",
|
||||
"type": "string"
|
||||
},
|
||||
"relay_agent_access_addr": {
|
||||
"type": "string"
|
||||
},
|
||||
"relay_bind_port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"relay_client_access_addr": {
|
||||
"type": "string"
|
||||
},
|
||||
"relay_client_proxy_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"relay_vhost_http_port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"relay_web_server_enabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3115,6 +3596,21 @@
|
||||
"site_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"tunnel_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tunnel_node_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"tunnel_target_addr": {
|
||||
"type": "string"
|
||||
},
|
||||
"tunnel_target_protocol": {
|
||||
"type": "string"
|
||||
},
|
||||
"upstream_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"upstreams": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -3123,6 +3619,79 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.RelayHeartbeatPayload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"frp_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"frps_client_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"frps_connections": {
|
||||
"type": "integer"
|
||||
},
|
||||
"frps_proxies": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/service.RelayProxyStat"
|
||||
}
|
||||
},
|
||||
"frps_proxy_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"health_events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/service.AgentNodeHealthEvent"
|
||||
}
|
||||
},
|
||||
"ip": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"profile": {
|
||||
"$ref": "#/definitions/service.AgentNodeSystemProfile"
|
||||
},
|
||||
"relay_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"snapshot": {
|
||||
"$ref": "#/definitions/service.AgentNodeMetricSnapshot"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.RelayProxyStat": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"client_addr": {
|
||||
"type": "string"
|
||||
},
|
||||
"client_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_close_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_start_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service.TLSApplyInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3183,7 +3752,7 @@
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"AgentTokenAuth": {
|
||||
"AccessTokenAuth": {
|
||||
"description": "Agent API 使用节点专属 Agent Token 或全局 Discovery Token",
|
||||
"type": "apiKey",
|
||||
"name": "X-Agent-Token",
|
||||
@@ -3196,4 +3765,4 @@
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user