Skip to content

Commit aac00a0

Browse files
authored
Merge pull request #339 from AdguardTeam/agm-2598-DNS-add-activation-time
AGM-2598 Add activation time for DNS subscription
2 parents 6c5c67a + 59b0ccb commit aac00a0

38 files changed

+154
-128
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ This command generates static content into the `build` directory and can be serv
5757

5858
Translations are not pushed to the repo and prepared on-the-fly (`i18n` folder is added to `.gitignore`).
5959

60-
Here's how you can debug translations locally.
60+
Heres how you can debug translations locally.
6161

6262
1. Download translations: `CROWDIN_PERSONAL_TOKEN="YOURTOKEN" pnpm run crowdin download`
6363
2. Run Docusaurus with the language of your choice: `pnpm run start -- --locale de`
6464

6565
## How to generate DNS stamps
6666

67-
If you'd like to update the list of [known DNS Providers](https://github.com/AdguardTeam/KnowledgeBaseDNS/blob/master/docs/general/dns-providers.md), you'll need to know how to create and check DNS stamps. Read the brief tutorial below to learn how to do it.
67+
If youd like to update the list of [known DNS Providers](https://github.com/AdguardTeam/KnowledgeBaseDNS/blob/master/docs/general/dns-providers.md), youll need to know how to create and check DNS stamps. Read the brief tutorial below to learn how to do it.
6868

6969
### For DNS-over-HTTPS
7070

docs/adguard-home/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ DOMAIN {
298298

299299
:::note
300300

301-
Do not use subdirectories with the Apache reverse HTTP proxy. It's a known issue ([#6604]) that Apache handles relative redirects differently than other web servers. This causes problems with the AdGuard Home web interface.
301+
Do not use subdirectories with the Apache reverse HTTP proxy. Its a known issue ([#6604]) that Apache handles relative redirects differently than other web servers. This causes problems with the AdGuard Home web interface.
302302

303303
[#6604]: https://github.com/AdguardTeam/AdGuardHome/issues/6604
304304

docs/dns-client/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Supported CPU architectures:
3939

4040
:::caution
4141

42-
On macOS, it's crucial that globally installed daemons are owned by `root` (see the [`launchd` documentation][launchd-requirements]), so the `AdGuardDNSClient` executable must be placed in the `/Applications/` directory or its subdirectory.
42+
On macOS, its crucial that globally installed daemons are owned by `root` (see the [`launchd` documentation][launchd-requirements]), so the `AdGuardDNSClient` executable must be placed in the `/Applications/` directory or its subdirectory.
4343

4444
:::
4545

docs/general/dns-filtering-syntax.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If you are creating a blocklist, we recommend using the [Adblock-style syntax].
3434

3535
- **Extensibility.** In the past decade, the Adblock-style syntax has greatly evolved, and we see no reason not to extend it even further and offer additional features for network-level blockers.
3636

37-
If you're maintaining either a `/etc/hosts`-style blocklist or multiple filtering lists (regardless of type), we provide a tool for blocklist compilation. We named it [Hostlist compiler] and we use it ourselves to create [AdGuard DNS filter].
37+
If youre maintaining either a `/etc/hosts`-style blocklist or multiple filtering lists (regardless of type), we provide a tool for blocklist compilation. We named it [Hostlist compiler] and we use it ourselves to create [AdGuard DNS filter].
3838

3939
## Basic examples {#basic-examples}
4040

@@ -80,7 +80,7 @@ modifiers = [modifier0, modifier1[, ...[, modifierN]]]
8080

8181
- `||`: matches the beginning of a hostname, including any subdomain. For instance, `||example.org` matches `example.org` and `test.example.org` but not `testexample.org`.
8282

83-
- `^`: the separator character. Unlike browser ad blocking, there's nothing to separate in a hostname, so the only purpose of this character is to mark the end of the hostname.
83+
- `^`: the separator character. Unlike browser ad blocking, theres nothing to separate in a hostname, so the only purpose of this character is to mark the end of the hostname.
8484

8585
- `|`: a pointer to the beginning or the end of the hostname. The value depends on the character placement in the mask. For example, the rule `ample.org|` corresponds to `example.org` but not to `example.org.com`. `|example` corresponds to `example.org` but not to `test.example`.
8686

@@ -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,23 +143,31 @@ 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

146154
```none
147155
$client=value1|value2|...
148156
```
149157

150-
You can also exclude clients by adding a `~` character before the value. In this case, the rule is not be applied to this client's DNS requests.
158+
You can also exclude clients by adding a `~` character before the value. In this case, the rule is not be applied to this clients DNS requests.
151159

152160
```none
153161
$client=~value1
154162
```
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

@@ -190,7 +202,7 @@ This modifier allows avoiding creating unnecessary exception rules when our bloc
190202
@@||net^
191203
```
192204

193-
The problem with this approach is that this way you will also unblock tracking domains that are located on those TLDs (i.e. `google-analytics.com`). Here's how to solve this with `denyallow`:
205+
The problem with this approach is that this way you will also unblock tracking domains that are located on those TLDs (i.e. `google-analytics.com`). Heres how to solve this with `denyallow`:
194206

195207
```none
196208
*$denyallow=com|net
@@ -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 dont 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
@@ -259,7 +275,7 @@ The `dnsrewrite` response modifier allows replacing the content of the response
259275

260276
**Rules with the `dnsrewrite` response modifier have higher priority than other rules in AdGuard Home and AdGuard DNS.**
261277

262-
Responses to all requests for a host matching a `dnsrewrite` rule will be replaced. The answer section of the replacement response will only contain RRs that match the request's query type and, possibly, CNAME RRs. Note that this means that responses to some requests may become empty (`NODATA`) if the host matches a `dnsrewrite` rule.
278+
Responses to all requests for a host matching a `dnsrewrite` rule will be replaced. The answer section of the replacement response will only contain RRs that match the requests query type and, possibly, CNAME RRs. Note that this means that responses to some requests may become empty (`NODATA`) if the host matches a `dnsrewrite` rule.
263279

264280
The shorthand syntax is:
265281

@@ -307,7 +323,7 @@ Name: example.net
307323
Address: 1.2.3.4
308324
```
309325

310-
Next, the `CNAME` rewrite. After that, all other records' values are summed as one response, so this:
326+
Next, the `CNAME` rewrite. After that, all other records values are summed as one response, so this:
311327

312328
```none
313329
||example.com^$dnsrewrite=NOERROR;A;1.2.3.4
@@ -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

@@ -414,13 +438,13 @@ The syntax is:
414438
$ctag=value1|value2|...
415439
```
416440

417-
If one of client's tags matches the `ctag` values, this rule applies to the client. The syntax for exclusion is:
441+
If one of clients tags matches the `ctag` values, this rule applies to the client. The syntax for exclusion is:
418442

419443
```none
420444
$ctag=~value1|~value2|...
421445
```
422446

423-
If one of client's tags matches the exclusion `ctag` values, this rule doesn't apply to the client.
447+
If one of clients tags matches the exclusion `ctag` values, this rule doesnt apply to the client.
424448

425449
**Examples:**
426450

@@ -503,11 +527,11 @@ consider it to be an [Adblock-style syntax] rule.
503527

504528
If you are maintaining a blocklist and use different sources in it, [Hostlist compiler] may be useful to you. It is a simple tool that makes it easier to compile a hosts blocklist compatible with AdGuard Home, Private AdGuard DNS or any other AdGuard product with DNS filtering.
505529

506-
What it's capable of:
530+
What its capable of:
507531

508532
1. Compile a single blocklist from multiple sources.
509533

510-
2. Exclude the rules you don't need.
534+
2. Exclude the rules you dont need.
511535

512536
3. Cleanup the resulting list: deduplicate, remove invalid rules, and compress the list.
513537

0 commit comments

Comments
 (0)