Documentation ¶
Overview ¶
Package controller Package generate the InboundConfig used by add inbound
Index ¶
- Variables
- func InboundBuilder(config *Config, nodeInfo *api.NodeInfo, tag string) (*core.InboundHandlerConfig, error)
- func OutboundBuilder(config *Config, nodeInfo *api.NodeInfo, tag string) (*core.OutboundHandlerConfig, error)
- type AutoSpeedLimitConfig
- type Config
- type Controller
- func (c *Controller) AddInboundLimiter(tag string, nodeSpeedLimit uint64, userList *[]api.UserInfo, ...) error
- func (c *Controller) Close() error
- func (c *Controller) DeleteInboundLimiter(tag string) error
- func (c *Controller) GetDetectResult(tag string) (*[]api.DetectResult, error)
- func (c *Controller) GetOnlineDevice(tag string) (*[]api.OnlineUser, error)
- func (c *Controller) Start() error
- func (c *Controller) UpdateInboundLimiter(tag string, updatedUserList *[]api.UserInfo) error
- func (c *Controller) UpdateRule(tag string, newRuleList []api.DetectRule) error
- type FallBackConfig
- type LimitInfo
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func InboundBuilder ¶
func InboundBuilder(config *Config, nodeInfo *api.NodeInfo, tag string) (*core.InboundHandlerConfig, error)
InboundBuilder build Inbound config for different protocol
func OutboundBuilder ¶
func OutboundBuilder(config *Config, nodeInfo *api.NodeInfo, tag string) (*core.OutboundHandlerConfig, error)
OutboundBuilder build freedom outbound config for addOutbound
Types ¶
type AutoSpeedLimitConfig ¶
type Config ¶
type Config struct { ListenIP string `mapstructure:"ListenIP"` SendIP string `mapstructure:"SendIP"` UpdatePeriodic int `mapstructure:"UpdatePeriodic"` CertConfig *mylego.CertConfig `mapstructure:"CertConfig"` EnableDNS bool `mapstructure:"EnableDNS"` DNSType string `mapstructure:"DNSType"` DisableUploadTraffic bool `mapstructure:"DisableUploadTraffic"` DisableGetRule bool `mapstructure:"DisableGetRule"` EnableProxyProtocol bool `mapstructure:"EnableProxyProtocol"` EnableFallback bool `mapstructure:"EnableFallback"` DisableIVCheck bool `mapstructure:"DisableIVCheck"` DisableSniffing bool `mapstructure:"DisableSniffing"` AutoSpeedLimitConfig *AutoSpeedLimitConfig `mapstructure:"AutoSpeedLimitConfig"` GlobalDeviceLimitConfig *limiter.GlobalDeviceLimitConfig `mapstructure:"GlobalDeviceLimitConfig"` FallBackConfigs []*FallBackConfig `mapstructure:"FallBackConfigs"` }
type Controller ¶
type Controller struct { Tag string // contains filtered or unexported fields }
func (*Controller) AddInboundLimiter ¶
func (c *Controller) AddInboundLimiter(tag string, nodeSpeedLimit uint64, userList *[]api.UserInfo, globalDeviceLimitConfig *limiter.GlobalDeviceLimitConfig) error
func (*Controller) Close ¶
func (c *Controller) Close() error
Close implement the Close() function of the service interface
func (*Controller) DeleteInboundLimiter ¶
func (c *Controller) DeleteInboundLimiter(tag string) error
func (*Controller) GetDetectResult ¶
func (c *Controller) GetDetectResult(tag string) (*[]api.DetectResult, error)
func (*Controller) GetOnlineDevice ¶
func (c *Controller) GetOnlineDevice(tag string) (*[]api.OnlineUser, error)
func (*Controller) Start ¶
func (c *Controller) Start() error
Start implement the Start() function of the service interface
func (*Controller) UpdateInboundLimiter ¶
func (c *Controller) UpdateInboundLimiter(tag string, updatedUserList *[]api.UserInfo) error
func (*Controller) UpdateRule ¶
func (c *Controller) UpdateRule(tag string, newRuleList []api.DetectRule) error
type FallBackConfig ¶
Click to show internal directories.
Click to hide internal directories.