all: sync with master
This commit is contained in:
@@ -634,8 +634,9 @@ func (d *DNSFilter) enableFiltersLocked(async bool) {
|
||||
// ApplyAdditionalFiltering enhances the provided filtering settings with
|
||||
// blocked services and client-specific configurations.
|
||||
func (d *DNSFilter) ApplyAdditionalFiltering(cliAddr netip.Addr, clientID string, setts *Settings) {
|
||||
d.ApplyBlockedServices(setts)
|
||||
setts.ClientIP = cliAddr
|
||||
|
||||
d.ApplyBlockedServices(setts)
|
||||
d.applyClientFiltering(clientID, cliAddr, setts)
|
||||
if setts.BlockedServices != nil {
|
||||
// TODO(e.burkov): Get rid of this crutch.
|
||||
|
||||
@@ -932,10 +932,9 @@ func (d *DNSFilter) matchHost(
|
||||
ufReq := &urlfilter.DNSRequest{
|
||||
Hostname: host,
|
||||
SortedClientTags: setts.ClientTags,
|
||||
// TODO(e.burkov): Wait for urlfilter update to pass net.IP.
|
||||
ClientIP: setts.ClientIP,
|
||||
ClientName: setts.ClientName,
|
||||
DNSType: rrtype,
|
||||
ClientIP: setts.ClientIP,
|
||||
ClientName: setts.ClientName,
|
||||
DNSType: rrtype,
|
||||
}
|
||||
|
||||
d.engineLock.RLock()
|
||||
|
||||
@@ -459,7 +459,6 @@ 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 != "" {
|
||||
// TODO(s.chzhen): Set [Settings.ClientName] once urlfilter supports
|
||||
|
||||
Reference in New Issue
Block a user