Skip to content

Commit e4659b9

Browse files
committed
replace notes with admonitions
1 parent aedd86a commit e4659b9

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

docs/general/dns-filtering-syntax.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ You can change the behavior of a rule by adding modifiers. Modifiers must be loc
129129

130130
`||example.org^` is the matching pattern. `$` is the delimiter, which signals that the rest of the rule are modifiers. `client=127.0.0.1` is the [`client`] modifier with its value, `127.0.0.1`. `,` is the delimiter between modifiers. And finally, `dnstype=A` is the [`dnstype`] modifier with its value, `A`.
131131

132-
**NOTE:** If a rule contains a modifier not listed in this document, the whole rule **must be ignored**. This way we avoid false-positives when people are trying to use unmodified browser ad blockers’ filter lists like EasyList or EasyPrivacy.
132+
:::note
133+
134+
If a rule contains a modifier not listed in this document, the whole rule **must be ignored**. This way we avoid false-positives when people are trying to use unmodified browser ad blockers’ filter lists like EasyList or EasyPrivacy.
135+
136+
:::
133137

134138
#### `client` {#client-modifier}
135139

@@ -139,7 +143,11 @@ The `client` modifier allows specifying clients this rule is applied to. There a
139143

140144
- By their name. This way only works for persistent clients (in AdGuard Home) and devices (in Private AdGuard DNS), which you have manually added.
141145

142-
**NOTE:** In AdGuard Home, ClientIDs are not currently supported, only names are. If you have added a client with the name “My Client” and ClientID `my-client` spell your modifier as `$client='My Client'` as opposed to `$client=my-client`.
146+
:::note
147+
148+
In AdGuard Home, ClientIDs are not currently supported, only names are. If you have added a client with the name “My Client” and ClientID `my-client` spell your modifier as `$client='My Client'` as opposed to `$client=my-client`.
149+
150+
:::
143151

144152
The syntax is:
145153

@@ -155,7 +163,11 @@ $client=~value1
155163

156164
Client names usually contain spaces or other special characters, which is why you should enclose the name in quotes. Both single and double ASCII quotes are supported. Use the backslash (`\`) to escape quotes (`"` and `'`), commas (`,`), and pipes (`|`).
157165

158-
**NOTE:** When excluding a client, you **must** place `~` outside the quotes.
166+
:::note
167+
168+
When excluding a client, you **must** place `~` outside the quotes.
169+
170+
:::
159171

160172
**Examples:**
161173

@@ -202,7 +214,7 @@ The problem with this approach is that this way you will also unblock tracking d
202214

203215
- `@@*$denyallow=com|net`: unblock everything except for `*.com` and `*.net`.
204216

205-
- `||example.org^$denyallow=sub.example.org`. block `example.org` and `*.example.org` but don’t block `sub.example.org`.
217+
- `||example.org^$denyallow=sub.example.org`: block `example.org` and `*.example.org` but don’t block `sub.example.org`.
206218

207219
#### `dnstype` {#dnstype-modifier}
208220

@@ -235,7 +247,11 @@ $dnstype=value2
235247

236248
- `||example.org^$dnstype=~A|~CNAME`: only allow `A` and `CNAME` DNS queries for `example.org`, block out the rest.
237249

238-
**NOTE:** Before version **v0.108.0,** AdGuard Home would use the type of the request to filter the response records, as opposed to the type of the response record itself. That caused issues, since that meant that you could not write rules that would allow certain `CNAME` records in responses in `A` and `AAAA` requests. In **v0.108.0** that behaviour was changed, so now this:
250+
:::note
251+
252+
Before version **v0.108.0,** AdGuard Home would use the type of the request to filter the response records, as opposed to the type of the response record itself. That caused issues, since that meant that you could not write rules that would allow certain `CNAME` records in responses in `A` and `AAAA` requests. In **v0.108.0** that behaviour was changed, so now this:
253+
254+
:::
239255

240256
```none
241257
||canon.example.com^$dnstype=~CNAME
@@ -320,7 +336,11 @@ Currently supported RR types with examples:
320336

321337
- `||4.3.2.1.in-addr.arpa^$dnsrewrite=NOERROR;PTR;example.net.` adds a `PTR` record for reverse DNS. Reverse DNS requests for `1.2.3.4` to the DNS server will result in `example.net`.
322338

323-
**NOTE:** the IP MUST be in reverse order. See [RFC 1035][rfc1035].
339+
:::note
340+
341+
The IP MUST be in reverse order. See [RFC 1035][rfc1035].
342+
343+
:::
324344

325345
- `||example.com^$dnsrewrite=NOERROR;A;1.2.3.4` adds an `A` record with the value `1.2.3.4`.
326346

@@ -400,7 +420,11 @@ The rules with the `badfilter` modifier disable other basic rules to which they
400420

401421
- `@@||example.org^$badfilter` disables `@@||example.org^`.
402422

403-
**NOTE:** The `badfilter` modifier currently doesn’t work with `/etc/hosts`-style rules. `127.0.0.1 example.org$badfilter` will **not** disable the original `127.0.0.1 example.org` rule.
423+
:::note
424+
425+
The `badfilter` modifier currently doesn’t work with `/etc/hosts`-style rules. `127.0.0.1 example.org$badfilter` will **not** disable the original `127.0.0.1 example.org` rule.
426+
427+
:::
404428

405429
#### `ctag` {#ctag-modifier}
406430

0 commit comments

Comments
 (0)