+ openapi: /dns_info, /dns_config
This commit is contained in:
parent
1b3122dd35
commit
3b13c031a3
|
@ -70,6 +70,35 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ServerStatus"
|
$ref: "#/definitions/ServerStatus"
|
||||||
|
|
||||||
|
/dns_info:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- global
|
||||||
|
operationId: dnsInfo
|
||||||
|
summary: 'Get general DNS parameters'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/DNSConfig"
|
||||||
|
|
||||||
|
/dns_config:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- global
|
||||||
|
operationId: dnsConfig
|
||||||
|
summary: "Set general DNS parameters"
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/DNSConfig"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
|
||||||
/enable_protection:
|
/enable_protection:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
|
@ -1054,6 +1083,26 @@ definitions:
|
||||||
language:
|
language:
|
||||||
type: "string"
|
type: "string"
|
||||||
example: "en"
|
example: "en"
|
||||||
|
|
||||||
|
DNSConfig:
|
||||||
|
type: "object"
|
||||||
|
description: "Query log configuration"
|
||||||
|
properties:
|
||||||
|
protection_enabled:
|
||||||
|
type: "boolean"
|
||||||
|
ratelimit:
|
||||||
|
type: "integer"
|
||||||
|
blocking_mode:
|
||||||
|
type: "string"
|
||||||
|
enum:
|
||||||
|
- "nxdomain"
|
||||||
|
- "null_ip"
|
||||||
|
- "custom_ip"
|
||||||
|
blocking_ipv4:
|
||||||
|
type: "string"
|
||||||
|
blocking_ipv6:
|
||||||
|
type: "string"
|
||||||
|
|
||||||
UpstreamsConfig:
|
UpstreamsConfig:
|
||||||
type: "object"
|
type: "object"
|
||||||
description: "Upstreams configuration"
|
description: "Upstreams configuration"
|
||||||
|
|
Loading…
Reference in New Issue