AdguardTeam / AdguardTeam/AdGuardDNSCLI

[Feature Request] Ability to read and respect local system hosts file

Aperta
#12 0 commenti 0 reazioni 1 assegnatario Rivendicata da @Chinaski1 Vedi su GitHub
feature request Priority: P4
Lingua principale
Go
Stelle
108
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Prerequisites

- [x] I have checked the [Knowledge Base](https://adguard-dns.io/kb/) and the [Discussions](https://github.com/AdguardTeam/AdGuardDNSClient/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

### Problem Description
The AdGuard DNS Forwarder currently acts as a standalone DNS resolver/proxy that communicates directly with upstream servers. On Windows, this setup bypasses the local system `hosts` file (`C:\Windows\System32\drivers\etc\hosts`).

Many users and developers rely on the `hosts` file for local environment mapping, internal network routing, or quick local overrides. Currently, these entries are ignored unless they are manually duplicated into the AdGuard configuration, which is inefficient and prone to sync issues.

### Proposed solution

### Proposed Feature
I would like to request a feature that allows AdGuard DNS to read and serve entries from the local system `hosts` file. Ideally, the forwarder should look up the requested domain in the local `hosts` file before querying any external upstreams.

### Suggested Configuration
A simple implementation in the `dns` section of the YAML configuration would be ideal:

```yaml
dns:
hosts:
enabled: true
path: "C:\\Windows\\System32\\drivers\\etc\\hosts"
refresh_period: 5m

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.