AdguardTeam / AdguardTeam/AdGuardHome

AdGuardHome doesn't use `/etc/hosts` when downloading filters

Abierto
#8,460 0 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) 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

### Version

v0.107.77

### Problem

When downloading a filter from a URL, AdGuardHome resolves the hostname to its public IP instead of the local address.

Example:

```text
/etc/hosts:
192.168.x.x git.example.com
```

Filter URL:

```text
https://git.example.com/path/to/filter.txt
```

`ping git.example.com` resolves to `192.168.x.x`, and querying AdGuardHome itself also returns the local IP. However, when updating the filter, AdGuardHome connects to the public IP instead:

```text
dial tcp xxx.xxx.xxx.xxx:443: connect: connection timed out
```

### Proposed solution

### Suggested improvement

It would be helpful if filter downloads used the same hostname resolution as normal DNS queries, so local overrides (such as `/etc/hosts` or DNS rewrites) are respected.

As a workaround, adding an upstream rule such as:

```text
[/git.example.com/]127.0.0.1:53
```

makes the filter download use the local address correctly.

### Alternatives considered and additional information

_No response_

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.