Documentation
¶
Overview ¶
Package generate the InbounderConfig 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 TransitBuilder(config *Config, nodeInfo *api.TransitNodeInfo, tag string, UUID string, ...) (*core.OutboundHandlerConfig, error)
- type Address
- type CertConfig
- type Config
- type Controller
- func (c *Controller) AddInboundLimiter(tag string, nodeSpeedLimit uint64, userList *[]api.UserInfo) error
- func (c *Controller) AddUserRoutingRule(tag string, email []string)
- 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) RemoveUserRoutingRule(email []string)
- func (c *Controller) Start() error
- func (c *Controller) Transit(newTransitNodeInfo *api.TransitNodeInfo, userInfo *[]api.UserInfo) (err error)
- func (c *Controller) UpdateInboundLimiter(tag string, updatedUserList *[]api.UserInfo) error
- func (c *Controller) UpdateRule(tag string, newRuleList []api.DetectRule) error
- type FallBackConfig
- type OutboundDetourConfig
- type ShadowsocksClientConfig
- type ShadowsocksServer
- type ShadowsocksServerTarget
- type TrojanClientConfig
- type TrojanServer
- type TrojanServerTarget
- type VLessOutbound
- type VLessOutboundConfig
- type VLessOutboundVnext
- type VMessAccount
- type VMessOutbound
- type VMessOutboundConfig
- type VMessOutboundTarget
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 outbund config for addoutbound
func TransitBuilder ¶
Types ¶
type Address ¶
func (*Address) Build ¶
func (v *Address) Build() *net.IPOrDomain
func (*Address) UnmarshalJSON ¶
type CertConfig ¶
type CertConfig struct {
CertMode string `mapstructure:"CertMode"` // none, file, http, dns
CertDomain string `mapstructure:"CertDomain"`
CertFile string `mapstructure:"CertFile"`
KeyFile string `mapstructure:"KeyFile"`
Provider string `mapstructure:"Provider"` // alidns, cloudflare, gandi, godaddy....
Email string `mapstructure:"Email"`
DNSEnv map[string]string `mapstructure:"DNSEnv"`
}
type Config ¶
type Config struct {
SendIP string `mapstructure:"SendIP"`
CertConfig *CertConfig `mapstructure:"CertConfig"`
EnableDNS bool `mapstructure:"EnableDNS"`
DNSType string `mapstructure:"DNSType"`
DisableUploadTraffic bool `mapstructure:"DisableUploadTraffic"`
DisableGetRule bool `mapstructure:"DisableGetRule"`
EnableFallback bool `mapstructure:"EnableFallback"`
DisableIVCheck bool `mapstructure:"DisableIVCheck"`
FallBackConfigs []*FallBackConfig `mapstructure:"FallBackConfigs"`
}
type Controller ¶
type Controller struct {
Tag string
TransitTag string
Rtag bool
// contains filtered or unexported fields
}
func (*Controller) AddInboundLimiter ¶
func (*Controller) AddUserRoutingRule ¶
func (c *Controller) AddUserRoutingRule(tag string, email []string)
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) RemoveUserRoutingRule ¶
func (c *Controller) RemoveUserRoutingRule(email []string)
func (*Controller) Start ¶
func (c *Controller) Start() error
Start implement the Start() function of the service interface
func (*Controller) Transit ¶
func (c *Controller) Transit(newTransitNodeInfo *api.TransitNodeInfo, userInfo *[]api.UserInfo) (err error)
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 ¶
type OutboundDetourConfig ¶
type OutboundDetourConfig struct {
Protocol string `json:"protocol"`
SendThrough *conf.Address `json:"sendThrough"`
Tag string `json:"tag"`
Settings *json.RawMessage `json:"settings"`
StreamSetting *conf.StreamConfig `json:"streamSettings"`
ProxySettings *conf.ProxyConfig `json:"proxySettings"`
MuxSettings *conf.MuxConfig `json:"mux"`
}
func (*OutboundDetourConfig) Build ¶
func (c *OutboundDetourConfig) Build() (*core.OutboundHandlerConfig, error)
Build implements Buildable.
type ShadowsocksClientConfig ¶
type ShadowsocksClientConfig struct {
Servers []*ShadowsocksServerTarget `json:"servers"`
}
type ShadowsocksServer ¶
type ShadowsocksServerTarget ¶
type TrojanClientConfig ¶
type TrojanClientConfig struct {
Servers []*TrojanServerTarget `json:"servers"`
}
type TrojanServer ¶
type TrojanServerTarget ¶
type VLessOutbound ¶
type VLessOutbound struct {
Address string `json:"address"`
Port uint16 `json:"port"`
Users []json.RawMessage `json:"users"`
}
type VLessOutboundConfig ¶
type VLessOutboundConfig struct {
Vnext []*VLessOutboundVnext `json:"vnext"`
}
type VLessOutboundVnext ¶
type VLessOutboundVnext struct {
Address *Address `json:"address"`
Port uint16 `json:"port"`
Users []json.RawMessage `json:"users"`
}
type VMessAccount ¶
type VMessAccount struct {
ID string `json:"id"`
AlterIds uint16 `json:"alterId"`
Security string `json:"security"`
Experiments string `json:"experiments"`
}
func (*VMessAccount) Build ¶
func (a *VMessAccount) Build() *vmess.Account
type VMessOutbound ¶
type VMessOutbound struct {
Address string `json:"address"`
Port uint16 `json:"port"`
Users []json.RawMessage `json:"users"`
}
type VMessOutboundConfig ¶
type VMessOutboundConfig struct {
Receivers []*VMessOutboundTarget `json:"vnext"`
}
type VMessOutboundTarget ¶
type VMessOutboundTarget struct {
Address *Address `json:"address"`
Port uint16 `json:"port"`
Users []json.RawMessage `json:"users"`
}
Click to show internal directories.
Click to hide internal directories.