Documentation
¶
Index ¶
- Variables
- type CustomRuleInitializer
- type Router
- func (r *Router) FindListsByTag(tags []string) ([]set.StringSet, error)
- func (r *Router) FindOutboundByName(name string) (adapter.Outbound, error)
- func (r *Router) HandleConnection(conn net.Conn, metadata *adapter.Metadata)
- func (r *Router) Initialize(ctx context.Context, logger *log.Logger, options RouterOptions) error
- func (r *Router) RegisterCustomRule(name string, initializer CustomRuleInitializer) error
- func (r *Router) UpdateConfig(newOptions RouterOptions) error
- type RouterOptions
- type Rule
- func NewLogicalAndRule(logger *log.Logger, newConfig *config.Rule, listMap map[string]set.StringSet, ...) (Rule, error)
- func NewLogicalOrRule(logger *log.Logger, newConfig *config.Rule, listMap map[string]set.StringSet, ...) (Rule, error)
- func NewMinecraftHostnameRule(newConfig *config.Rule, listMap map[string]set.StringSet) (Rule, error)
- func NewMinecraftPlayerNameRule(newConfig *config.Rule, listMap map[string]set.StringSet) (Rule, error)
- func NewMinecraftStatusRule(newConfig *config.Rule) (Rule, error)
- func NewRule(logger *log.Logger, config *config.Rule, listMap map[string]set.StringSet, ...) (Rule, error)
- func NewServiceNameRule(newConfig *config.Rule, listMap map[string]set.StringSet) (Rule, error)
- type RuleAlways
- type RuleLogicalAnd
- type RuleLogicalOr
- type RuleMinecraftHostname
- type RuleMinecraftPlayerName
- type RuleMinecraftStatus
- type RuleServiceName
- type RuleSourceIP
- type RuleSourceIPVersion
- type RuleSourcePort
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRuleTypeNotFound = errors.New("rule type is not found")
Functions ¶
This section is empty.
Types ¶
type CustomRuleInitializer ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) FindListsByTag ¶
func (*Router) FindOutboundByName ¶
func (*Router) HandleConnection ¶
func (*Router) Initialize ¶
func (*Router) RegisterCustomRule ¶
func (r *Router) RegisterCustomRule(name string, initializer CustomRuleInitializer) error
func (*Router) UpdateConfig ¶
func (r *Router) UpdateConfig(newOptions RouterOptions) error
type RouterOptions ¶
type Rule ¶
func NewLogicalAndRule ¶
func NewLogicalOrRule ¶
type RuleAlways ¶
type RuleAlways struct {
// contains filtered or unexported fields
}
func (*RuleAlways) Config ¶
func (r *RuleAlways) Config() *config.Rule
type RuleLogicalAnd ¶
type RuleLogicalAnd struct {
// contains filtered or unexported fields
}
type RuleLogicalOr ¶
type RuleLogicalOr struct {
// contains filtered or unexported fields
}
type RuleMinecraftHostname ¶
type RuleMinecraftHostname struct {
// contains filtered or unexported fields
}
type RuleMinecraftPlayerName ¶
type RuleMinecraftPlayerName struct {
// contains filtered or unexported fields
}
func (*RuleMinecraftPlayerName) Config ¶
func (r *RuleMinecraftPlayerName) Config() *config.Rule
type RuleMinecraftStatus ¶
type RuleMinecraftStatus struct {
// contains filtered or unexported fields
}
func (*RuleMinecraftStatus) Config ¶
func (r *RuleMinecraftStatus) Config() *config.Rule
type RuleServiceName ¶
type RuleServiceName struct {
// contains filtered or unexported fields
}
func (RuleServiceName) Config ¶
func (r RuleServiceName) Config() *config.Rule
type RuleSourceIP ¶
type RuleSourceIP struct {
// contains filtered or unexported fields
}
func NewSourceIPRule ¶
func (*RuleSourceIP) Config ¶
func (r *RuleSourceIP) Config() *config.Rule
type RuleSourceIPVersion ¶
type RuleSourceIPVersion struct {
// contains filtered or unexported fields
}
func NewSourceIPVersionRule ¶
func NewSourceIPVersionRule(config *config.Rule) (*RuleSourceIPVersion, error)
func (*RuleSourceIPVersion) Config ¶
func (r *RuleSourceIPVersion) Config() *config.Rule
type RuleSourcePort ¶
type RuleSourcePort struct {
// contains filtered or unexported fields
}
func NewSourcePortRule ¶
func NewSourcePortRule(config *config.Rule) (*RuleSourcePort, error)
func (*RuleSourcePort) Config ¶
func (r *RuleSourcePort) Config() *config.Rule
Click to show internal directories.
Click to hide internal directories.