Documentation
¶
Index ¶
- func Register(name string, factory MatcherFactory)
- type AndMatcher
- type DefaultMatcher
- type HTTPMatcher
- type HTTPMatcherConfig
- type IPMatcher
- type IPMatcherConfig
- type LogicMatcherConfig
- type Matcher
- type MatcherFactory
- type OrMatcher
- type PortMatcher
- type PortMatcherConfig
- type RegexMatcher
- type RegexMatcherConfig
- type SSHMatcher
- type Socks5Matcher
- type Socks5MatcherConfig
- type SubstringMatcher
- type SubstringMatcherConfig
- type TLSMatcher
- type TLSMatcherConfig
- type TimeoutMatcher
- type TimeoutMatcherConfig
- type TrojanMatcher
- type TrojanMatcherConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶ added in v0.1.0
func Register(name string, factory MatcherFactory)
Types ¶
type AndMatcher ¶ added in v0.1.1
type AndMatcher struct {
// contains filtered or unexported fields
}
func (*AndMatcher) Match ¶ added in v0.1.1
func (m *AndMatcher) Match(conn *transport.ClientConnection) bool
type DefaultMatcher ¶
type DefaultMatcher struct{}
func NewDefaultMatcher ¶
func NewDefaultMatcher() *DefaultMatcher
func (*DefaultMatcher) Match ¶
func (m *DefaultMatcher) Match(conn *transport.ClientConnection) bool
type HTTPMatcher ¶ added in v0.1.1
type HTTPMatcher struct {
// contains filtered or unexported fields
}
func NewHTTPMatcher ¶ added in v0.1.1
func NewHTTPMatcher(cfg *HTTPMatcherConfig) *HTTPMatcher
func (*HTTPMatcher) Match ¶ added in v0.1.1
func (m *HTTPMatcher) Match(conn *transport.ClientConnection) bool
type HTTPMatcherConfig ¶ added in v0.1.1
type IPMatcher ¶ added in v0.1.1
type IPMatcher struct {
// contains filtered or unexported fields
}
func NewIPMatcher ¶ added in v0.1.1
func NewIPMatcher(cfg *IPMatcherConfig) (*IPMatcher, error)
type IPMatcherConfig ¶ added in v0.1.1
type LogicMatcherConfig ¶ added in v0.1.1
type Matcher ¶
type Matcher interface {
Match(conn *transport.ClientConnection) bool
}
type OrMatcher ¶ added in v0.1.1
type OrMatcher struct {
// contains filtered or unexported fields
}
type PortMatcher ¶ added in v0.1.3
type PortMatcher struct {
// contains filtered or unexported fields
}
func NewPortMatcher ¶ added in v0.1.3
func NewPortMatcher(cfg *PortMatcherConfig) (*PortMatcher, error)
func (*PortMatcher) Match ¶ added in v0.1.3
func (m *PortMatcher) Match(conn *transport.ClientConnection) bool
type PortMatcherConfig ¶ added in v0.1.3
type PortMatcherConfig struct {
Ports []string `yaml:"ports"`
}
type RegexMatcher ¶
type RegexMatcher struct {
// contains filtered or unexported fields
}
func NewRegexMatcher ¶
func NewRegexMatcher(cfg *RegexMatcherConfig) (*RegexMatcher, error)
func (*RegexMatcher) Match ¶
func (m *RegexMatcher) Match(conn *transport.ClientConnection) bool
type RegexMatcherConfig ¶
type RegexMatcherConfig struct {
Pattern string `yaml:"pattern"`
}
type SSHMatcher ¶ added in v0.1.1
type SSHMatcher struct{}
func NewSSHMatcher ¶ added in v0.1.1
func NewSSHMatcher() *SSHMatcher
func (*SSHMatcher) Match ¶ added in v0.1.1
func (m *SSHMatcher) Match(conn *transport.ClientConnection) bool
type Socks5Matcher ¶ added in v0.1.4
type Socks5Matcher struct {
// contains filtered or unexported fields
}
func NewSocks5Matcher ¶ added in v0.1.4
func NewSocks5Matcher(cfg *Socks5MatcherConfig) *Socks5Matcher
func (*Socks5Matcher) Match ¶ added in v0.1.4
func (m *Socks5Matcher) Match(conn *transport.ClientConnection) bool
type Socks5MatcherConfig ¶ added in v0.1.4
type Socks5MatcherConfig struct {
AllowedMethods []string `yaml:"allowed_methods"`
}
type SubstringMatcher ¶
type SubstringMatcher struct {
// contains filtered or unexported fields
}
func NewSubstringMatcher ¶
func NewSubstringMatcher(cfg *SubstringMatcherConfig) *SubstringMatcher
func (*SubstringMatcher) Match ¶
func (m *SubstringMatcher) Match(conn *transport.ClientConnection) bool
type SubstringMatcherConfig ¶
type TLSMatcher ¶
type TLSMatcher struct {
// contains filtered or unexported fields
}
func NewTLSMatcher ¶
func NewTLSMatcher(cfg *TLSMatcherConfig) *TLSMatcher
func (*TLSMatcher) Match ¶
func (m *TLSMatcher) Match(conn *transport.ClientConnection) bool
type TLSMatcherConfig ¶
type TimeoutMatcher ¶
type TimeoutMatcher struct {
// contains filtered or unexported fields
}
func NewTimeoutMatcher ¶
func NewTimeoutMatcher(cfg *TimeoutMatcherConfig) *TimeoutMatcher
func (*TimeoutMatcher) Match ¶
func (m *TimeoutMatcher) Match(conn *transport.ClientConnection) bool
type TimeoutMatcherConfig ¶
type TimeoutMatcherConfig struct {
Timeout int `yaml:"timeout"`
}
type TrojanMatcher ¶ added in v0.1.4
type TrojanMatcher struct {
// contains filtered or unexported fields
}
func NewTrojanMatcher ¶ added in v0.1.4
func NewTrojanMatcher(cfg *TrojanMatcherConfig) (*TrojanMatcher, error)
func (*TrojanMatcher) Match ¶ added in v0.1.4
func (m *TrojanMatcher) Match(conn *transport.ClientConnection) bool
type TrojanMatcherConfig ¶ added in v0.1.4
type TrojanMatcherConfig struct {
Passwords []string `yaml:"passwords,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.