Documentation ¶
Index ¶
- Constants
- func CreateHINFO(q dns.Question, r *dns.Msg) *dns.Msg
- func CreateNOANS(_ dns.Question, r *dns.Msg) *dns.Msg
- func CreateNXDOMAIN(_ dns.Question, r *dns.Msg) *dns.Msg
- func CreateREFUSED(_ dns.Question, r *dns.Msg) *dns.Msg
- func CreateSOA(q dns.Question, r *dns.Msg) *dns.Msg
- func CreateZERO(q dns.Question, r *dns.Msg) *dns.Msg
- func FileToLines(path string) ([]string, error)
- func GetWild(h string) []string
- func IsBlocked(cfg *Configs, host string) bool
- func IsHostname(s string) bool
- func LinesFromReader(r io.Reader) ([]string, error)
- func LocalCacheLoader(path string) (*bloom.Filter, error)
- func LocalRuleLoader(path string, filter *bloom.Filter, strictMode bool) error
- func PureDomain(s string) string
- func RemoteCacheLoader(uri string) (*bloom.Filter, error)
- func RemoteRuleLoader(uri string, filter *bloom.Filter) error
- func UrlToLines(url string) ([]string, error)
- type Blocked
- type Configs
- type RespFunc
- type RespType
Constants ¶
View Source
const ( MINUTE = 60 HOUR = 60 * MINUTE DAY = 24 * HOUR )
View Source
const (
NXDOMAIN = NX
)
Variables ¶
This section is empty.
Functions ¶
func FileToLines ¶
func IsHostname ¶ added in v1.1.0
func LocalRuleLoader ¶ added in v1.1.4
func PureDomain ¶ added in v1.1.0
func RemoteRuleLoader ¶ added in v1.1.4
func UrlToLines ¶
Types ¶
type Blocked ¶
type Configs ¶
type Configs struct { sync.RWMutex Size int Rate float64 // contains filtered or unexported fields }
func NewConfigs ¶ added in v1.1.0
func NewConfigs() *Configs
type RespFunc ¶ added in v1.1.0
func RespType2RespFunc ¶ added in v1.1.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.