diff --git a/dnscrypt-proxy/plugin_block_name.go b/dnscrypt-proxy/plugin_block_name.go index 74dadc51..474feb82 100644 --- a/dnscrypt-proxy/plugin_block_name.go +++ b/dnscrypt-proxy/plugin_block_name.go @@ -181,10 +181,20 @@ func (plugin *PluginBlockNameResponse) Eval(pluginsState *PluginsState, msg *dns answers := msg.Answer for _, answer := range answers { header := answer.Header() - if header.Class != dns.ClassINET || header.Rrtype != dns.TypeCNAME { + var target string + var err error + if header.Class != dns.ClassINET { + continue + } + if header.Rrtype == dns.TypeCNAME { + target, err = NormalizeQName(answer.(*dns.CNAME).Target) + } else if header.Rrtype == dns.TypeSVCB && answer.(*dns.SVCB).Priority == 0 { + target, err = NormalizeQName(answer.(*dns.SVCB).Target) + } else if header.Rrtype == dns.TypeSVCB && answer.(*dns.HTTPS).Priority == 0 { + target, err = NormalizeQName(answer.(*dns.HTTPS).Target) + } else { continue } - target, err := NormalizeQName(answer.(*dns.CNAME).Target) if err != nil { return err }