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)
- func OutboundRelayBuilder(nodeInfo *api.RelayNodeInfo, tag string, subscription *api.SubscriptionInfo, ...) (*core.OutboundHandlerConfig, error)
- func RouterBuilder(tag string, rtag string, subscription *api.SubscriptionInfo) (*router.Config, error)
- type Config
- type Controller
- func (c *Controller) AddInboundLimiter(tag string, nodeSpeedLimit uint64, userList *[]api.SubscriptionInfo, ...) error
- func (c *Controller) AddRouterRule(config *router.Config, shouldAppend bool) 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.OnlineIP, error)
- func (c *Controller) RemoveRouterRule(tag string) error
- func (c *Controller) RemoveRule(tag string, subscriptionInfo *[]api.SubscriptionInfo) (err error)
- func (c *Controller) Start() error
- func (c *Controller) UpdateInboundLimiter(tag string, updatedUserList *[]api.SubscriptionInfo) error
- func (c *Controller) UpdateRule(tag string, newRuleList []api.DetectRule) error
- type FallBackConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var AEADMethod = map[shadowsocks.CipherType]uint8{ shadowsocks.CipherType_AES_128_GCM: 0, shadowsocks.CipherType_AES_256_GCM: 0, shadowsocks.CipherType_CHACHA20_POLY1305: 0, shadowsocks.CipherType_XCHACHA20_POLY1305: 0, }
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
func OutboundRelayBuilder ¶
func OutboundRelayBuilder(nodeInfo *api.RelayNodeInfo, tag string, subscription *api.SubscriptionInfo, Passwd string) (*core.OutboundHandlerConfig, error)
func RouterBuilder ¶ added in v1.1.0
Types ¶
type Config ¶
type Config struct { CertConfig *mylego.CertConfig `mapstructure:"CertConfig"` EnableFallback bool `mapstructure:"EnableFallback"` FallBackConfigs []*FallBackConfig `mapstructure:"FallBackConfigs"` EnableDNS bool `mapstructure:"EnableDNS"` DNSStrategy string `mapstructure:"DNSStrategy"` IPLimit *limiter.IPLimit `mapstructure:"IPLimit"` }
type Controller ¶
type Controller struct { Tag string RelayTag string Relay bool // contains filtered or unexported fields }
func (*Controller) AddInboundLimiter ¶
func (c *Controller) AddInboundLimiter(tag string, nodeSpeedLimit uint64, userList *[]api.SubscriptionInfo, globalIPLimit *limiter.IPLimit) error
func (*Controller) AddRouterRule ¶ added in v1.1.0
func (c *Controller) AddRouterRule(config *router.Config, shouldAppend bool) 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.OnlineIP, error)
func (*Controller) RemoveRouterRule ¶ added in v1.1.0
func (c *Controller) RemoveRouterRule(tag string) error
func (*Controller) RemoveRule ¶ added in v1.1.0
func (c *Controller) RemoveRule(tag string, subscriptionInfo *[]api.SubscriptionInfo) (err 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.SubscriptionInfo) error
func (*Controller) UpdateRule ¶
func (c *Controller) UpdateRule(tag string, newRuleList []api.DetectRule) error
Click to show internal directories.
Click to hide internal directories.