Pull request 1989: AG-24794-client-source
Squashed commit of the following: commit 5cf83aafc8ddfea15b4f8e9b4061af021727f68c Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Fri Sep 1 14:58:03 2023 +0300 client: imp code commit 4325c8f610d1329ad38c800e20275668f1690f51 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Fri Sep 1 14:38:33 2023 +0300 all: add client source
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/client"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/schedule"
|
||||
"github.com/AdguardTeam/AdGuardHome/internal/whois"
|
||||
@@ -88,9 +89,9 @@ func (j *clientJSON) copySettings(
|
||||
type runtimeClientJSON struct {
|
||||
WHOIS *whois.Info `json:"whois_info"`
|
||||
|
||||
IP netip.Addr `json:"ip"`
|
||||
Name string `json:"name"`
|
||||
Source clientSource `json:"source"`
|
||||
IP netip.Addr `json:"ip"`
|
||||
Name string `json:"name"`
|
||||
Source client.Source `json:"source"`
|
||||
}
|
||||
|
||||
type clientListJSON struct {
|
||||
@@ -126,7 +127,7 @@ func (clients *clientsContainer) handleGetClients(w http.ResponseWriter, r *http
|
||||
for _, l := range clients.dhcp.Leases() {
|
||||
cj := runtimeClientJSON{
|
||||
Name: l.Hostname,
|
||||
Source: ClientSourceDHCP,
|
||||
Source: client.SourceDHCP,
|
||||
IP: l.IP,
|
||||
WHOIS: &whois.Info{},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user