Add support for EDNS-client-subnet

Fixes #1471
This commit is contained in:
Frank Denis 2020-09-18 00:11:26 +02:00
parent 4d7f253e6b
commit 272984a640
4 changed files with 26 additions and 0 deletions

View file

@ -102,6 +102,9 @@ func (proxy *Proxy) InitPluginsGlobals() error {
*queryPlugins = append(*queryPlugins, Plugin(new(PluginFirefox)))
if len(proxy.ednsClientSubnets) != 0 {
*queryPlugins = append(*queryPlugins, Plugin(new(PluginECS)))
}
if len(proxy.blockNameFile) != 0 {
*queryPlugins = append(*queryPlugins, Plugin(new(PluginBlockName)))
}
@ -284,6 +287,7 @@ func (pluginsState *PluginsState) ApplyQueryPlugins(pluginsGlobals *PluginsGloba
break
}
}
packet2, err := msg.PackBuffer(packet)
if err != nil {
return packet, err