AdguardTeam / AdguardTeam/AdGuardHome

DNS Rewrites, duplicates items... maybe bug

Ouverte
#6,977 4 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
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

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_

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.