AdguardTeam / AdguardTeam/AdGuardHome

DNS Rewrites, duplicates items... maybe bug

Abierto
#6,977 4 comentarios 1 reacción 0 asignados Ver en GitHub
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

master

### Action

![image](https://github.com/AdguardTeam/AdGuardHome/assets/2648844/0b6a0f2d-742e-4807-beab-f83afe93e2f3)

### DNS rewrites
Allows to easily configure custom DNS response for a specific domain name.

in this web ,, background code

```go
// handleRewriteAdd is the handler for the POST /control/rewrite/add HTTP API.
func (d *DNSFilter) handleRewriteAdd(w http.ResponseWriter, r *http.Request) {
```

![image](https://github.com/AdguardTeam/AdGuardHome/assets/2648844/a9c47a97-19a1-44f5-819c-e8b146272ca5)

Why not use map to remove duplicates dns rewrites items.
or
before append ,,check if exist...

why not

???

### Expected result

before append ,,check if exist...

### Actual result

so many duplicates item.

### Additional information and/or screenshots

_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.