AdguardTeam / AdguardTeam/dnsproxy

Feature Request: Exclude cache for specific upstreams

Offen
#480 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
3.3k
Forks
343
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Problem

Local domains (`*.lan`, `*.local`, `*.home`) resolved by local DNS servers are cached alongside public domains.
These local domains often have frequent IP changes (DHCP) and low latency to resolve (local network), so there's little to no benefit to be gained from caching.

This is a particularly significant issue with **negative caching**.

### Example

Consider the following upstream DNS server configuration, where we want `*.lan` domains to be resolved by the local router and everything else to be resolved by a public DNS server:
```
[/lan/]192.168.1.1
1.1.1.1
```
and this scenario:
1. A local machine (`desktop.lan`) is currently powered off.
2. A client requests `desktop.lan`. The local upstream (192.168.1.1) returns NXDOMAIN because there is no active DHCP lease.
3. dnsproxy caches this NXDOMAIN response.
4. The user turns the machine on. Even though it now has an IP and the local DNS is aware of it, dnsproxy continues to return NXDOMAIN from the cache. The device remains unreachable by hostname until the cache expires.

### Proposed Solution

Allow a `?nocache` or similar tag on specific upstream lines:

[/lan/]192.168.1.1?nocache

1.1.1.1

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.