Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChinaIPRule ¶
type ChinaIPRule struct {
Rule
}
func (*ChinaIPRule) Apply ¶
func (this *ChinaIPRule) Apply(dest v2net.Destination) bool
type DomainMatcher ¶
type FieldRule ¶
type FieldRule struct { Rule Domain []DomainMatcher IP []*net.IPNet Port v2net.PortRange Network v2net.NetworkList }
func (*FieldRule) UnmarshalJSON ¶
type PlainDomainMatcher ¶
type PlainDomainMatcher struct {
// contains filtered or unexported fields
}
func NewPlainDomainMatcher ¶
func NewPlainDomainMatcher(pattern string) *PlainDomainMatcher
func (*PlainDomainMatcher) Match ¶
func (this *PlainDomainMatcher) Match(domain string) bool
type RegexpDomainMatcher ¶
type RegexpDomainMatcher struct {
// contains filtered or unexported fields
}
func NewRegexpDomainMatcher ¶
func NewRegexpDomainMatcher(pattern string) (*RegexpDomainMatcher, error)
func (*RegexpDomainMatcher) Match ¶
func (this *RegexpDomainMatcher) Match(domain string) bool
type RouterRuleConfig ¶
type RouterRuleConfig struct {
RuleList []json.RawMessage `json:"rules"`
}
func (*RouterRuleConfig) Rules ¶
func (this *RouterRuleConfig) Rules() []rules.Rule
type StringList ¶
type StringList []string
func NewStringList ¶
func NewStringList(str ...string) *StringList
func (*StringList) Len ¶
func (this *StringList) Len() int
func (*StringList) UnmarshalJSON ¶
func (this *StringList) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.