AdguardTeam / AdguardTeam/AdGuardHome
Additional per-upstream settings (ECS, IPv6, etc)
- Linguagem predominante
- TypeScript
- Estrelas
- 36.9k
- Forks
- 2.5k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### Prerequisites
- [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer
- [X] I have searched other issues and found no duplicates
- [X] I want to request a feature or enhancement and not ask a question
### The problem
Now the dnsproxy parses the upstream_dns as url
https://github.com/AdguardTeam/dnsproxy/blob/c060c2a788d961f9291afc93d7954022fc52b2e3/upstream/upstream.go#L180-L210
But I think different upstreams may have different purposes.
For example:
I use the upstream `8.8.8.8`, it supports `edns-client-subnet`:
```sh
# JP
dig google.com +short +subnet=142.250.206.0/24 @8.8.8.8
# EU
dig google.com +short +subnet=109.232.208.0/24 @8.8.8.8
```
My ip location is US, now I want to resolve `A.domain` as JP and resolve `B.domain` as EU.
### Proposed solution
```yaml
- server: tls://8.8.8.8
group: main
- server: tls://1.1.1.1
group: main
- server: tls://8.8.8.8
group: main-ipv4
aaaa_disabled: true
- server: tls://1.1.1.1
group: main-ipv4
aaaa_disabled: true
- server: tls://8.8.8.8
name: google-jp
edns_client_subnet:
use_custom: true
custom_ip: 142.250.206.0/24
- server: tls://8.8.8.8
name: google-eu
edns_client_subnet:
use_custom: true
custom_ip: 109.232.208.0/24
```
or
```
tls://8.8.8.8,group=main
tls://1.1.1.1,group=main
tls://8.8.8.8,group=main-ipv4,aaaa_disabled=true
tls://1.1.1.1,group=main-ipv4,aaaa_disabled=true
tls://8.8.8.8,name=google-jp,edns_client_subnet=142.250.206.0/24
tls://8.8.8.8,name=google-eu,edns_client_subnet=109.232.208.0/24
[/A.domain/]@google-jp
[/B.domain/]@google-eu
[/C.domain/]*main, all_servers
[/D.domain/]*main-ipv4, fastest_addr
```
The `group` is another feature for upstream dns rules.
We could make the [rules](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#specifying-upstreams-for-domains) more powerful.
### Alternatives considered and additional information
_No response_
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.