Documentation
¶
Index ¶
- Variables
- func ParseParams(params []string) (isSrc bool, noResolve bool)
- func ParseRulePayload(ruleRaw string, needTarget bool) (tp, payload, target string, params []string)
- type ASN
- type Base
- type DSCP
- type Domain
- type DomainKeyword
- type DomainRegex
- type DomainSuffix
- type DomainWildcard
- type GEOIP
- func (g *GEOIP) Adapter() string
- func (g *GEOIP) DnsFallbackFilter() C.IpMatcher
- func (g *GEOIP) GetCountry() string
- func (g *GEOIP) GetIPMatcher() (router.IPMatcher, error)
- func (g *GEOIP) GetRecodeSize() int
- func (g *GEOIP) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)
- func (g *GEOIP) MatchIp(ip netip.Addr) bool
- func (g *GEOIP) Payload() string
- func (g *GEOIP) RuleType() C.RuleType
- type GEOSITE
- func (gs *GEOSITE) Adapter() string
- func (gs *GEOSITE) GetDomainMatcher() (router.DomainMatcher, error)
- func (gs *GEOSITE) GetRecodeSize() int
- func (gs *GEOSITE) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)
- func (gs *GEOSITE) MatchDomain(domain string) bool
- func (gs *GEOSITE) Payload() string
- func (gs *GEOSITE) RuleType() C.RuleType
- type IPCIDR
- type IPCIDROption
- type IPSuffix
- type InName
- type InType
- type InUser
- type Match
- type NetworkType
- type ParseRuleFunc
- type Port
- type Process
- type Uid
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NoResolve = "no-resolve" Src = "src" )
params
Functions ¶
func ParseParams ¶
Types ¶
type DSCP ¶
type DSCP struct {
Base
// contains filtered or unexported fields
}
type Domain ¶
type Domain struct {
Base
// contains filtered or unexported fields
}
type DomainKeyword ¶
type DomainKeyword struct {
Base
// contains filtered or unexported fields
}
func NewDomainKeyword ¶
func NewDomainKeyword(keyword string, adapter string) *DomainKeyword
func (*DomainKeyword) Adapter ¶
func (dk *DomainKeyword) Adapter() string
func (*DomainKeyword) Match ¶
func (dk *DomainKeyword) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)
func (*DomainKeyword) Payload ¶
func (dk *DomainKeyword) Payload() string
func (*DomainKeyword) RuleType ¶
func (dk *DomainKeyword) RuleType() C.RuleType
type DomainRegex ¶
type DomainRegex struct {
Base
// contains filtered or unexported fields
}
func NewDomainRegex ¶
func NewDomainRegex(regex string, adapter string) (*DomainRegex, error)
func (*DomainRegex) Adapter ¶
func (dr *DomainRegex) Adapter() string
func (*DomainRegex) Match ¶
func (dr *DomainRegex) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)
func (*DomainRegex) Payload ¶
func (dr *DomainRegex) Payload() string
func (*DomainRegex) RuleType ¶
func (dr *DomainRegex) RuleType() C.RuleType
type DomainSuffix ¶
type DomainSuffix struct {
Base
// contains filtered or unexported fields
}
func NewDomainSuffix ¶
func NewDomainSuffix(suffix string, adapter string) *DomainSuffix
func (*DomainSuffix) Adapter ¶
func (ds *DomainSuffix) Adapter() string
func (*DomainSuffix) Match ¶
func (ds *DomainSuffix) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)
func (*DomainSuffix) Payload ¶
func (ds *DomainSuffix) Payload() string
func (*DomainSuffix) RuleType ¶
func (ds *DomainSuffix) RuleType() C.RuleType
type DomainWildcard ¶
type DomainWildcard struct {
Base
// contains filtered or unexported fields
}
func NewDomainWildcard ¶
func NewDomainWildcard(pattern string, adapter string) (*DomainWildcard, error)
func (*DomainWildcard) Adapter ¶
func (dw *DomainWildcard) Adapter() string
func (*DomainWildcard) Match ¶
func (dw *DomainWildcard) Match(metadata *C.Metadata, _ C.RuleMatchHelper) (bool, string)
func (*DomainWildcard) Payload ¶
func (dw *DomainWildcard) Payload() string
func (*DomainWildcard) RuleType ¶
func (dw *DomainWildcard) RuleType() C.RuleType
type GEOIP ¶
type GEOIP struct {
Base
// contains filtered or unexported fields
}
func (*GEOIP) DnsFallbackFilter ¶
func (*GEOIP) GetCountry ¶
func (*GEOIP) GetRecodeSize ¶
type GEOSITE ¶
type GEOSITE struct {
Base
// contains filtered or unexported fields
}
func (*GEOSITE) GetDomainMatcher ¶
func (gs *GEOSITE) GetDomainMatcher() (router.DomainMatcher, error)
func (*GEOSITE) GetRecodeSize ¶
func (*GEOSITE) MatchDomain ¶
MatchDomain implements C.DomainMatcher
type IPCIDR ¶
type IPCIDR struct {
Base
// contains filtered or unexported fields
}
type IPCIDROption ¶
type IPCIDROption func(*IPCIDR)
func WithIPCIDRNoResolve ¶
func WithIPCIDRNoResolve(noResolve bool) IPCIDROption
func WithIPCIDRSourceIP ¶
func WithIPCIDRSourceIP(b bool) IPCIDROption
type IPSuffix ¶
type IPSuffix struct {
Base
// contains filtered or unexported fields
}
func NewIPSuffix ¶
type InName ¶
type InName struct {
Base
// contains filtered or unexported fields
}
type InType ¶
type InType struct {
Base
// contains filtered or unexported fields
}
type InUser ¶
type InUser struct {
Base
// contains filtered or unexported fields
}
type Match ¶
type Match struct {
Base
// contains filtered or unexported fields
}
type NetworkType ¶
type NetworkType struct {
Base
// contains filtered or unexported fields
}
func NewNetworkType ¶
func NewNetworkType(network, adapter string) (*NetworkType, error)
func (*NetworkType) Adapter ¶
func (n *NetworkType) Adapter() string
func (*NetworkType) Match ¶
func (n *NetworkType) Match(metadata *C.Metadata, helper C.RuleMatchHelper) (bool, string)
func (*NetworkType) Payload ¶
func (n *NetworkType) Payload() string
func (*NetworkType) RuleType ¶
func (n *NetworkType) RuleType() C.RuleType
type ParseRuleFunc ¶
type Port ¶
type Port struct {
Base
// contains filtered or unexported fields
}
type Process ¶
type Process struct {
Base
// contains filtered or unexported fields
}
func NewProcess ¶
Click to show internal directories.
Click to hide internal directories.