From 3b13c031a3948952f546e20c069db6e3f375a3d2 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 14 Nov 2019 16:36:59 +0300 Subject: [PATCH] + openapi: /dns_info, /dns_config --- openapi/openapi.yaml | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index ea6281d5..f8b9bdb8 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -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"