AdguardTeam / AdguardTeam/AdGuardHome
syntax for specific Upstream DNS server
- Vorherrschende Sprache
- TypeScript
- Sterne
- 36.9k
- Forks
- 2.5k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Prerequisites
- [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) and found no answer
- [X] I have searched other issues and found no duplicates
- [X] I want to report a bug and not [ask a question or ask for help](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a)
- [X] I have set up AdGuard Home correctly and [configured clients to use it](https://github.com/AdguardTeam/AdGuardHome/wiki/Clients). (Use the [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) for help with installing and configuring clients.)
### Platform (OS and CPU architecture)
Linux, ARMv7
### Installation
GitHub releases or script from README
### Setup
On one machine
### AdGuard Home version
v0.107.40
### Action
To configure the specific upstream DNS server for specific domains in the current version need to use the syntax [here](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains):
```
[/domain1/domain2/domainN/]upstreamString
```
Where upstreamString is one or many upstreams separated by space (e.g. `1.1.1.1 2.2.2.2`).
it can also be like:
```
[/domain1/domain2/.../domainN/]upstream_server1 upstream_server2 ... upstream_serverN
```
Now its my settings for upstream DNS like:
```
###test group 1
1a.[/netcut.cn/]1.12.12.12
1b.[/netcut.cn/]1.12.12.12:53
1c.[/netcut.cn/]1.12.12.12 223.5.5.5
1d.[/netcut.cn/]1.12.12.12:53 223.5.5.5
1e.[/netcut.cn/]1.12.12.12 223.5.5.5:53
1f.[/netcut.cn/]1.12.12.12:53 223.5.5.5:53
###test group 2
2a.[/netcut.cn/]tls://1.12.12.12
2b.[/netcut.cn/]tls://1.12.12.12/
2c.[/netcut.cn/]https://1.12.12.12/dns-query
2d.[/netcut.cn/]tls://1.12.12.12 tls://223.5.5.5
2e.[/netcut.cn/]tls://1.12.12.12/ tls://223.5.5.5
2f.[/netcut.cn/]https://1.12.12.12/dns-query https://223.5.5.5/dns-query
2g.[/netcut.cn/]tls://1.12.12.12 https://223.5.5.5/dns-query
2h.[/netcut.cn/]tls://1.12.12.12/ https://223.5.5.5/dns-query
2i.[/netcut.cn/]https://223.5.5.5/dns-query tls://1.12.12.12
###test group 3
3a.[/netcut.cn/]1.12.12.12 tls://223.5.5.5
3b.[/netcut.cn/]tls://223.5.5.5 1.12.12.12
3c.[/netcut.cn/]tls://223.5.5.5/ 1.12.12.12
3d.[/netcut.cn/]1.12.12.12:53 tls://223.5.5.5
3e.[/netcut.cn/]tls://223.5.5.5 1.12.12.12:53
3f.[/netcut.cn/]tls://223.5.5.5/ 1.12.12.12:53
3g.[/netcut.cn/]1.12.12.12 https://223.5.5.5/dns-query
3h.[/netcut.cn/]https://223.5.5.5/dns-query 1.12.12.12
3i.[/netcut.cn/]1.12.12.12:53 https://223.5.5.5/dns-query
3j.[/netcut.cn/]https://223.5.5.5/dns-query 1.12.12.12:53
```
They are numbered from `1a` to `3j` for ease of explanation. Here, I want `netcut.cn` to use a set of (**MORE THAN ONE**) upstream DNS servers to prevent special cases from causing resolution breaks, and also want these upstream servers to use some encryption (DoT and DoH).
The current examples (also [here](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains)) do not show the use of encrypted upstream servers, so I did some experiments (see the result comparing settings `group1` and `group2, group3` above) and found that its OKAY setting encrypted upstream DNS server, it passed syntax checking and connected correctly (no errors reported, and `netcut.cn` used the configured server and encryption method).
-----------------------------------------------------------------------------------------
Another bug is, for a rule `[/bilicdn*.com/]tls://223.6.6.6` or `[/*.bilicdn*.com/]tls://223.6.6.6`, cant match domain `a.w.bilicdn1.com`, `m.w.bilicdn1.com`, `m.w.bilicdn4.com`, `a.w.bilicdn2.com`, `a.n.bilicdn1.com` etc, which can be expressed as:
```
*.bilicdn*.com
```
### Expected result
For the first bug, it should be all correct, `tls://x.x.x.x` should also pass the syntax check, and all servers need to be used;
For the second bug, it should match `*.bilicdn*.com` and use `tls://223.6.6.6`.
### Actual result
For bug 1, when click Apply, there is the following error output for the other:
```
1a~1b.its completely OK.
1c.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12 223.5.5.5": not an ip:port | 400
1d.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12:53 223.5.5.5": invalid port "53 223.5.5.5" parsing "1.12.12.12:53 223.5.5.5" | 400
1e.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12 223.5.5.5:53": ParseAddr("1.12.12.12 223.5.5.5"): unexpected character (at " 223.5.5.5") | 400
1f.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12:53 223.5.5.5:53": ParseAddr("1.12.12.12:53 223.5.5.5"): unexpected character (at ":53 223.5.5.5") | 400
2a~2c.its completely OK.
2d.Error: control/dns_config | validating upstream servers: cannot prepare the upstream [/netcut.cn/]tls://1.12.12.12 tls://223.5.5.5 ([]): failed to parse tls://1.12.12.12 tls://223.5.5.5: parse "tls://1.12.12.12 tls://223.5.5.5": invalid character " " in host name | 400
2e~2f.its completely OK.
2g.Error: control/dns_config | validating upstream servers: cannot prepare the upstream [/netcut.cn/]tls://1.12.12.12 https://223.5.5.5/dns-query ([]): failed to parse tls://1.12.12.12 https://223.5.5.5/dns-query: parse "tls://1.12.12.12 https://223.5.5.5/dns-query": invalid character " " in host name | 400
2h~2i.its completely OK.
3a.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12 tls://223.5.5.5": bad protocol "1.12.12.12 tls" | 400
3b.Error: control/dns_config | validating upstream servers: cannot prepare the upstream [/netcut.cn/]tls://223.5.5.5 1.12.12.12 ([]): failed to parse tls://223.5.5.5 1.12.12.12: parse "tls://223.5.5.5 1.12.12.12": invalid character " " in host name | 400
3c.its completely OK.
3d.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12:53 tls://223.5.5.5": bad protocol "1.12.12.12:53 tls" | 400
3e.Error: control/dns_config | validating upstream servers: cannot prepare the upstream [/netcut.cn/]tls://223.5.5.5 1.12.12.12:53 ([]): failed to parse tls://223.5.5.5 1.12.12.12:53: parse "tls://223.5.5.5 1.12.12.12:53": invalid character " " in host name | 400
3f.its completely OK.
3g.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12 https://223.5.5.5/dns-query": bad protocol "1.12.12.12 https" | 400
3h.its completely OK.
3i.Error: control/dns_config | validating upstream servers: validating upstream "[/netcut.cn/]1.12.12.12:53 https://223.5.5.5/dns-query": bad protocol "1.12.12.12:53 https" | 400
3j.its completely OK.
```
Regardless of whether the rest of the settings are reasonable or not, there is one setting `1f` that is **CORRECT in SYNTAX** but **WRONG in SYNTAX CHECKING** because its sample appears in the existing help documentation above.
For entries that have multiple upstream server settings and are correct (passes syntax checking, such as `2f`, `2h`, `2i`.), the DNS request status is `SERVERROR` (using Adguard Windows dialog), indicating that AdguardHome does not automatically select an upstream DNS server for querying. That is, it looks correct (passes grammar checking), but it doesn't actually work.
-------------------------------------------------------------------------------------------------
For bug 2, cant match `*.bilicdn*.com` and do not use `tls://223.6.6.6`.
### Additional information and/or screenshots
_No response_
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.