Implement blocking, fully compatible with rules from version 1

This commit is contained in:
Frank Denis 2018-01-17 02:40:47 +01:00
parent a8ec0957e8
commit 170e2e816e
20 changed files with 3275 additions and 5 deletions

View file

@ -30,6 +30,7 @@ type Proxy struct {
cacheMaxTTL uint32
queryLogFile string
queryLogFormat string
blockNameFile string
pluginsGlobals PluginsGlobals
}
@ -194,6 +195,9 @@ func (proxy *Proxy) processIncomingQuery(serverInfo *ServerInfo, clientProto str
return
}
}
if pluginsState.action == PluginsActionDrop {
return
}
}
if len(response) == 0 {
encryptedQuery, clientNonce, err := proxy.Encrypt(serverInfo, query, serverProto)