all: imp code

This commit is contained in:
Stanislav Chzhen 2025-03-11 20:33:18 +03:00
parent f1aca5f2eb
commit d9a01c8fa6
2 changed files with 3 additions and 0 deletions
CHANGELOG.md
internal/filtering

View file

@ -24,6 +24,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
### Added
- The ability to check filtering rules for host names using an optional query type and optional ClientID or client IP address.
- Optional `client` and `qtype` URL query parameters to the `GET /control/check_host` HTTP API.
### Fixed

View file

@ -459,8 +459,10 @@ func (d *DNSFilter) handleCheckHost(w http.ResponseWriter, r *http.Request) {
addr, err := netip.ParseAddr(cli)
if err == nil {
setts.ClientIP = addr
d.ApplyAdditionalFiltering(addr, "", setts)
} else if cli != "" {
setts.ClientName = cli
d.ApplyAdditionalFiltering(netip.Addr{}, cli, setts)
}