AdguardTeam / AdguardTeam/AdGuardHome

Use IP addresses from hosts rules in allowlists

Abierto
#8,304 8 comentarios 0 reacciones 0 asignados Ver en GitHub
feature request
Lenguaje dominante
TypeScript
Estrellas
36.9k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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, AMD64 (aka x86_64)

### Installation

GitHub releases or script from README

### Setup

On one machine

### AdGuard Home version

v0.107.73

### Action

Action (Steps to Reproduce):
Create a hosts file with local DNS entries, e.g.:

10.10.10.1 pc01.mein.lan pc01
10.10.10.2 pc02.mein.lan pc02

Navigate to DNS → Allowlists
Add the hosts file as an Allowed List
Try to resolve one of the hostnames (e.g. pc01.mein.lan)
Observe that the entries have no effect

### Expected result

The hosts file syntax should be correctly parsed and applied in the Allowed Lists, as the documentation explicitly states: "AdGuard Home understands basic ad filter rules and hosts file syntax." The listed hostnames should be recognized and allowed.

### Actual result

The hosts file syntax is completely ignored in the Allowed Lists. The entries are not recognized and have no effect on DNS resolution. However, when the exact same file is added to the Blocked Lists (DNS → Blocklists), the entries are parsed and processed correctly. This confirms that the parser works — but is apparently not applied to the Allowlist functionality.

### Additional information and/or screenshots

Workaround and its side effect: Adding the hosts file to the Blocklist instead of the Allowlist does work, but this causes all matching queries to appear as "blocked" in the statistics and query log, which leads to incorrect and misleading statistics.
Feature Request: It would also be very helpful if the DNS Rewrites section could accept a hosts file or list as input. Currently, each DNS rewrite entry must be added manually one by one. Supporting a hosts file import in DNS Rewrites would make managing local DNS for home or office networks with many devices significantly easier.
Environment:

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.