AdguardTeam / AdguardTeam/AdGuardHome

DNS Rewrites, duplicates items... maybe bug

Đang mở
#6,977 4 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
36.9k
Fork
2.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.