+ openapi: /dns_info, /dns_config

This commit is contained in:
Simon Zolin 2019-11-14 16:36:59 +03:00 committed by Ildar Kamalov
parent 1b3122dd35
commit 3b13c031a3
1 changed files with 49 additions and 0 deletions

View File

@ -70,6 +70,35 @@ paths:
schema:
$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:
post:
tags:
@ -1054,6 +1083,26 @@ definitions:
language:
type: "string"
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:
type: "object"
description: "Upstreams configuration"