Pull request #886: all: allow multiple rules in dns filter results

Merge in DNS/adguard-home from 2102-rules-result to master

Updates #2102.

Squashed commit of the following:

commit 47b2aa94c56b37be492c3c01e8111054612d9722
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Dec 17 13:12:27 2020 +0300

    querylog: remove pre-v0.99.3 compatibility code

commit 2af0ee43c2444a7d842fcff057f2ba02f300244b
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Dec 17 13:00:27 2020 +0300

    all: improve documentation

commit 3add300a42f0aa67bb315a448e294636c85d0b3b
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 16 18:30:01 2020 +0300

    all: improve changelog

commit e04ef701fc2de7f4453729e617641c47e0883679
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 16 17:56:53 2020 +0300

    all: improve code and documentation

commit 4f04845ae275ae4291869e00c62e4ff81b01eaa3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 16 17:01:08 2020 +0300

    all: document changes, improve api

commit bc59b7656a402d0c65f13bd74a71d8dda6a8a65d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Dec 15 18:22:01 2020 +0300

    all: allow multiple rules in dns filter results
This commit is contained in:
Ainar Garipov
2020-12-17 13:32:46 +03:00
parent 2c56a68597
commit 2e8352d31c
28 changed files with 610 additions and 356 deletions

View File

@@ -2,9 +2,9 @@
'info':
'title': 'AdGuard Home'
'description': >
AdGuard Home REST API. Our admin web interface is built on top of this REST
API.
'version': '0.104'
AdGuard Home REST-ish API. Our admin web interface is built on top of this
REST-ish API.
'version': '0.105'
'contact':
'name': 'AdGuard Home'
'url': 'https://github.com/AdguardTeam/AdGuardHome'
@@ -1259,11 +1259,26 @@
- 'FilteredBlockedService'
- 'ReasonRewrite'
'filter_id':
'deprecated': true
'description': >
In case if there's a rule applied to this DNS request, this is ID of
the filter list that the rule belongs to.
Deprecated: use `rules[*].filter_list_id` instead.
'type': 'integer'
'rule':
'deprecated': true
'type': 'string'
'example': '||example.org^'
'description': 'Filtering rule applied to the request (if any)'
'description': >
Filtering rule applied to the request (if any).
Deprecated: use `rules[*].text` instead.
'rules':
'description': 'Applied rules.'
'type': 'array'
'items':
'$ref': '#/components/schemas/ResultRule'
'service_name':
'type': 'string'
'description': 'Set if reason=FilteredBlockedService'
@@ -1610,15 +1625,27 @@
'question':
'$ref': '#/components/schemas/DnsQuestion'
'filterId':
'deprecated': true
'type': 'integer'
'example': 123123
'description': >
In case if there's a rule applied to this DNS request, this is ID of
the filter that rule belongs to.
the filter list that the rule belongs to.
Deprecated: use `rules[*].filter_list_id` instead.
'rule':
'deprecated': true
'type': 'string'
'example': '||example.org^'
'description': 'Filtering rule applied to the request (if any)'
'description': >
Filtering rule applied to the request (if any).
Deprecated: use `rules[*].text` instead.
'rules':
'description': 'Applied rules.'
'type': 'array'
'items':
'$ref': '#/components/schemas/ResultRule'
'reason':
'type': 'string'
'description': 'DNS filter status'
@@ -1668,6 +1695,22 @@
'anonymize_client_ip':
'type': 'boolean'
'description': "Anonymize clients' IP addresses"
'ResultRule':
'description': 'Applied rule.'
'properties':
'filter_list_id':
'description': >
In case if there's a rule applied to this DNS request, this is ID of
the filter list that the rule belongs to.
'example': 123123
'format': 'int64'
'type': 'integer'
'text':
'description': >
The text of the filtering rule applied to the request (if any).
'example': '||example.org^'
'type': 'string'
'type': 'object'
'TlsConfig':
'type': 'object'
'description': 'TLS configuration settings and status'