Pull request 198: 6744 Unqualified domains

Squashed commit of the following:

commit 779b93c3d715a86aaa1c686c5028e7e418ab2b9e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Apr 26 15:27:47 2024 +0300

    Configuration: add example

commit e66761c424a80c5c09113b546a58974e55294611
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Apr 26 15:23:12 2024 +0300

    Configuration: imp doc about unqualified domains
Eugene Burkov 2024-04-26 15:50:44 +03:00
parent 7875c0b314
commit 3b27176bfc
1 changed files with 14 additions and 1 deletions

@ -130,6 +130,17 @@ the default upstreams, which should be specified as well.
An empty domain specification, `//` has the special meaning of “unqualified
names only”, i.e. names without any dots in them, like `myhost` or `router`.
Those will only be used for resolving requests for unqualified domain names, but
not their subdomains. So, a configuration like this:
```none
5.6.7.8:53
[//]4.3.2.1:53
[/com/]1.2.3.4:53
```
sends requests for `com` (and its subdomains) to `1.2.3.4:53`, requests for
other top-level domains to `4.3.2.1:53`, and all other requests to `5.6.7.8:53`.
More specific domains take precedence over less specific domains. So,
a configuration like this:
@ -164,7 +175,9 @@ specification for records' presence given in [RFC 4035, section
For example, the `DS` query for `domain.example.com` will be sent to the
upstream specified for `example.com`, `com`, or the default one, even if there
is a more specific upstream like `*.example.com`.
is a more specific upstream like `*.example.com`. Note that for two-label `DS`
requests, the upstream specified for unqualified names, or the more specific one
will be used, if any.
Since **v0.108.0-b.8** the wildcard `*` has a special meaning of "any
subdomain", so `--upstream=[/*.host.com/]1.2.3.4` will send queries for