mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-03 22:42:51 +03:00
Pull request: all: allow local non-top-level domains
Updates #2961. Squashed commit of the following: commit 207eeb85caf6caee81a669302daf4e10a5b61585 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Apr 15 18:48:50 2021 +0300 all: allow local non-top-level domains
This commit is contained in:
parent
a1450c5595
commit
d83091fc1f
11 changed files with 128 additions and 54 deletions
internal/home
|
@ -237,7 +237,7 @@ func (clients *clientsContainer) handleFindClient(w http.ResponseWriter, r *http
|
|||
var cj clientJSON
|
||||
if !ok {
|
||||
var found bool
|
||||
cj, found = clients.findTemporary(ip, idStr)
|
||||
cj, found = clients.findRuntime(ip, idStr)
|
||||
if !found {
|
||||
continue
|
||||
}
|
||||
|
@ -258,9 +258,9 @@ func (clients *clientsContainer) handleFindClient(w http.ResponseWriter, r *http
|
|||
}
|
||||
}
|
||||
|
||||
// findTemporary looks up the IP in temporary storages, like autohosts or
|
||||
// blocklists.
|
||||
func (clients *clientsContainer) findTemporary(ip net.IP, idStr string) (cj clientJSON, found bool) {
|
||||
// findRuntime looks up the IP in runtime and temporary storages, like
|
||||
// /etc/hosts tables, DHCP leases, or blocklists.
|
||||
func (clients *clientsContainer) findRuntime(ip net.IP, idStr string) (cj clientJSON, found bool) {
|
||||
if ip == nil {
|
||||
return cj, false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue