API backend -- implement ability to turn toggle all protection in one go, helpful to temporarily disable all kinds of filtering

This commit is contained in:
Eugene Bujak
2018-10-10 20:13:03 +03:00
parent c3df81bb8d
commit 413228e6ec
3 changed files with 91 additions and 215 deletions

View File

@@ -65,12 +65,31 @@ paths:
application/json:
dns_address: 127.0.0.1
dns_port: 53
protection_enabled: true
querylog_enabled: true
running: true
upstream_dns:
- 1.1.1.1
- 1.0.0.1
version: "v0.1"
/enable_protection:
post:
tags:
-global
operationId: enableProtection
summary: "Enable protection (turns on dnsfilter module in coredns)"
responses:
200:
description: OK
/disable_protection:
post:
tags:
-global
operationId: disableProtection
summary: "Disable protection (turns off filtering, sb, parental, safesearch temporarily by disabling dnsfilter module in coredns)"
responses:
200:
description: OK
/querylog:
get:
tags:
@@ -316,6 +335,15 @@ paths:
- 123
- 123
- 123
/stats_reset:
post:
tags:
-global
operationId: statsReset
summary: "Reset all statistics to zeroes"
responses:
200:
description: OK
/filtering/enable:
post:
tags: