AdguardTeam / AdguardTeam/AdGuardHome

detect self-reference in "Test upstreams" button

Abierto Apto para principiantes
#8,555 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

When configuring upstreams, there is a handy, blue **Test upstreams** button, but it does not detect errors such as these

```
localhost
localhost:53
127.0.0.1
127.0.0.1:53
[/local/]udp://127.0.0.1:53
```

My system had an entry like the last line with port 54, but when I accidently changed 54 to 53, it took a few minutes to troubleshoot, so it would be nice if AGH detected this in the existing feature to test upstreams.

### Proposed solution

**Test upstreams** detects a direct self-reference. Possible options

1. Active: send a specially crafted probe DNS request
2. Passive: parse the entry and compare to AGH configuration

Then, return a red error notification to the user (instead of the green OK notification).

### Alternatives considered and additional information

This issue, which is about a loop caused by direct self-reference, is distinct from https://github.com/AdguardTeam/AdGuardHome/issues/6693 which looks like an indirect circular loop. The direct reference seems easier to solve

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Find where the settings UI’s Test upstreams button sends its request, then trace that API path in the backend validation code. Inspect how upstream host/port entries are parsed and how the response maps to green OK versus red error feedback, then add a direct self-reference check for loopback endpoints and local listening ports. Run the relevant upstream-validation/endpoint tests and confirm localhost/127.0.0.1:53 now returns an error state.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
go, typescript
Área
backend, web-dev
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
72/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.