AdguardTeam / AdguardTeam/AdGuardHome

Use IP addresses from hosts rules in allowlists

Ouverte
#8,304 8 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
feature request
Langage dominant
TypeScript
Étoiles
36.9k
Forks
2.5k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### 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:

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.