Documentation
¶
Index ¶
- Constants
- func FromGeoIP(name string) (db *geoip2.Reader, err error)
- func RuleType(rt byte) string
- type Filter
- func (c *Filter) AddGeoIP(match, adapter string)
- func (c *Filter) AddHosts(addr, host string)
- func (c *Filter) FromExtensions(b []byte)
- func (c *Filter) FromFinal(adapter string)
- func (c *Filter) FromGeoIP(name string) (err error)
- func (c *Filter) FromHosts()
- func (c *Filter) FromPort(elements ...string)
- func (c *Filter) FromRules(b []byte)
- func (c *Filter) GeoIP(ip net.IP) string
- func (c *Filter) GeoIPString(ipaddr string) string
- func (c *Filter) GeoIPs(ips []net.IP) string
- func (c *Filter) MatchBypass(addr string) bool
- func (c *Filter) MatchHosts(host string) string
- func (c *Filter) MatchPort(port string) bool
- func (c *Filter) MatchRule(m Metadata) Rules
- func (c *Filter) SetGeoIP(match, adapter string)
- func (c *Filter) SetHosts(addr, host string)
- type Match
- type Metadata
- type Rule
- type RuleHost
- type RuleIPCIDR
- type Rules
Constants ¶
View Source
const ( AddrTypeIPv4 byte = 0x01 AddrTypeDomainName byte = 0x03 AddrTypeIPv6 byte = 0x04 ActionAccept = "ACCEPT" ActionProxy = "PROXY" ActionReject = "REJECT" ActionDirect = "DIRECT" RuleTypeBypass byte = 0x01 RuleTypeHosts byte = 0x02 RuleTypeDomains byte = 0x03 RuleTypeSuffixDomains byte = 0x04 RuleTypeKeywordDomains byte = 0x05 RuleTypeUserAgent byte = 0x06 RuleTypeIPCIDR byte = 0x07 RuleTypeGeoIP byte = 0x08 RuleTypePort byte = 0x09 RuleTypeFinal byte = 0x0A RuleTypeMATCH byte = 0x0B )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
func (*Filter) FromExtensions ¶
func (*Filter) GeoIPString ¶
func (*Filter) MatchBypass ¶
func (*Filter) MatchHosts ¶
type RuleIPCIDR ¶
type RuleIPCIDR struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.