510573a904
Merge in DNS/adguard-home from 2179-ipset-subdomains to master Closes #2179. Squashed commit of the following: commit de17caac4c2ea2bc7931f162c6dfa7822a71554f Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 29 18:34:46 2021 +0300 dnsforward: imp code, docs commit e5ab957560bcfba80feac4b72f9b22535ecd4c7d Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Jan 26 20:43:31 2021 +0300 dnsforward: imp code commit 2b84d27b752832885e4896d0e75de2576e2b965b Author: David Sheets <sheets@alum.mit.edu> Date: Tue Oct 6 16:34:06 2020 +0100 dnsforward: support subdomain matching in ipset This is a squash of all commits in #2179.
27 lines
566 B
Go
27 lines
566 B
Go
// +build !linux
|
|
|
|
package dnsforward
|
|
|
|
import (
|
|
"github.com/AdguardTeam/golibs/log"
|
|
)
|
|
|
|
type ipsetCtx struct{}
|
|
|
|
// init initializes the ipset context.
|
|
func (c *ipsetCtx) init(ipsetConfig []string) (err error) {
|
|
if len(ipsetConfig) != 0 {
|
|
log.Info("ipset: only available on linux")
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// process adds the resolved IP addresses to the domain's ipsets, if any.
|
|
func (c *ipsetCtx) process(_ *dnsContext) (rc resultCode) {
|
|
return resultCodeSuccess
|
|
}
|
|
|
|
// Close closes the Linux Netfilter connections.
|
|
func (c *ipsetCtx) Close() (_ error) { return nil }
|