Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$dnstype modifier #2337

Closed
ameshkov opened this issue Nov 19, 2020 · 0 comments
Closed

$dnstype modifier #2337

ameshkov opened this issue Nov 19, 2020 · 0 comments
Assignees
Milestone

Comments

@ameshkov
Copy link
Member

ameshkov commented Nov 19, 2020

See the spec below.

Please mind that some of the examples use the $dnsrewrite modifier that is not yet implemented (see #2102).

dnstype

The $dnstype modifier allows specifying one or several DNS query types the rule will be working for.

The syntax is:

$dnstype=A|TXT|...

You can also specify "excluded" DNS query types by adding a ~ character before the record type. In this case, the rule will not be applied to DNS queries with this type.

$dnstype=~AAAA

Please note, that $dnstype is case-insensitive, i.e. $dnstype=a is the same as $dnstype=A.

Examples

  • ||*^$dnstype=HTTPS — block all queries with the type HTTPS.
  • ||*^$dnstype=HTTPS,dnsrewrite=REFUSED — block all queries with the type HTTPS, return empty response with REFUSED instead.
  • ||*^$dnstype=AAAA — block all AAAA queries.
  • ||*^$dnstype=AAAA,dnsrewrite=NOERROR — block all AAAA queries, return empty response with NOERROR status instead.
  • @@||example.org^$dnstype=TXT — unblock all TXT queries for example.org and it's subdomains.
@ameshkov ameshkov added this to the v0.105 milestone Nov 19, 2020
adguard pushed a commit that referenced this issue Nov 24, 2020
Merge in DNS/adguard-home from 2337-dnstype to master

Updates #2102.
Updates #2337.

Squashed commit of the following:

commit ac4b752
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Nov 24 17:50:33 2020 +0300

    dnsfilter: add $dnstype handling
@ainar-g ainar-g closed this as completed Nov 25, 2020
adguard pushed a commit that referenced this issue Dec 10, 2020
Merge in DNS/adguard-home from 2337-dnstype to master

Updates #2102.
Updates #2337.

Squashed commit of the following:

commit ac4b752
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Nov 24 17:50:33 2020 +0300

    dnsfilter: add $dnstype handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants