Documentation ¶
Index ¶
- Variables
- func CustomizeGetVmessList(f func(url string) ([]string, error))
- func DefalutGetVmessList(url string) ([]string, error)
- func VmessPingAll(vmesslist []string, pingconfig *PingConfig, ctx context.Context) map[string]*vmessping.PingStat
- func VmessPingOne(vmessstr string, pingconfig *PingConfig, stopCh <-chan os.Signal) (*vmessping.PingStat, error)
- func VmessPingOneWithContext(vmessstr string, pingconfig *PingConfig, ctx context.Context) (*vmessping.PingStat, error)
- func WgetGetVmessList(url string) ([]string, error)
- type BalancerConfig
- type BaseConfig
- type Config
- type OutboundDetourConfig
- type PingConfig
- type SingleNodeConfig
- type V2Config
- func VmessBalancerConfigMerge(outboundDetourConfigs []*conf.OutboundDetourConfig, template V2Config, ...) V2Config
- func VmessConfig(urls []string, template V2Config, config Config, ctx context.Context) (V2Config, error)
- func VmessConfigBalancer(urls []string, template V2Config, config *BalancerConfig, ctx context.Context) (V2Config, error)
- func VmessConfigSingleNode(urls []string, template V2Config, config *SingleNodeConfig, ...) (V2Config, error)
- func VmessSingleNodeConfigMerge(outboundDetourConfig *conf.OutboundDetourConfig, template V2Config, ...) V2Config
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBalancerTemplate = `` /* 1490-byte string literal not displayed */
View Source
var DefaultSingleNodeTemplate = `` /* 633-byte string literal not displayed */
Functions ¶
func CustomizeGetVmessList ¶
func DefalutGetVmessList ¶
DefalutGetVmessList 默认的GetVmessList
func VmessPingAll ¶
func VmessPingOne ¶
func VmessPingOneWithContext ¶
func WgetGetVmessList ¶
WgetGetVmessList 通过wget读取Vmess列表的GetVmessList http.Get 没法直接读取 octet-stream 遂出此下策
Types ¶
type BalancerConfig ¶
type BalancerConfig struct { BaseConfig OutboundInsertBeforeTag string `json:"outboundInsertBeforeTag" desc:"Insert outbound before the exists outbound whose tag is this"` BalancerInsertToTag string `json:"balancerInsertToTag" desc:"Insert the selector into the balancer whose tag is this"` MaxSelect uint `json:"maxSelect" desc:"How many outbounds do you want to put into"` }
func DefaultBalancerConfig ¶
func DefaultBalancerConfig() *BalancerConfig
type BaseConfig ¶
type BaseConfig struct { PingConfig *PingConfig `json:"pingConfig"` TagFormat string `json:"tagFormat" desc:"Format of the auto-generated outbounds' tag. If it is 'fixed', tagKeyFieldName will be the tag"` TagKeyField string `` /* 175-byte string literal not displayed */ }
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
type OutboundDetourConfig ¶
type OutboundDetourConfig json.RawMessage
type PingConfig ¶
type PingConfig struct { Dest string `json:"destination" desc:"the test destination url, need 204 for success return"` Count uint `json:"count" desc:"Count. Stop after sending COUNT requests"` Timeoutsec uint `json:"timeout" desc:"timeout seconds for each request"` Inteval uint `json:"interval" desc:"inteval seconds between pings"` Quit uint `json:"quit" desc:"fast quit on error counts"` ShowNode bool `json:"showNode" desc:"show node location/outbound ip"` Verbose bool `json:"verbose" desc:"verbose (debug log)"` UseMux bool `json:"useMux" desc:"use mux outbound"` AllowInsecure bool `json:"allowInsecure" desc:"allow insecure TLS connections"` Threads uint `json:"threads" desc:"How many pinging coroutines exists at the same time"` }
func DefaultPingConfig ¶
func DefaultPingConfig() *PingConfig
type SingleNodeConfig ¶
type SingleNodeConfig struct { BaseConfig OutboundInsertBeforeTag string `json:"outboundInsertBeforeTag" desc:"Insert outbound before the exists outbound whose tag is this"` }
func DefaultSingleNodeConfig ¶
func DefaultSingleNodeConfig() *SingleNodeConfig
type V2Config ¶
type V2Config json.RawMessage
func VmessBalancerConfigMerge ¶
func VmessBalancerConfigMerge( outboundDetourConfigs []*conf.OutboundDetourConfig, template V2Config, outboundInsertBeforeTag, balancerInsertToTag string, ) V2Config
VmessBalancerConfigMerge 将一系列OutboundDetourConfig写入负载均衡配置的模板 tagFormat: outbound.Tag的格式 outboundInsertBeforeTag: 在模板outbound列表的何处插入outbounds配置,找不到位置就插在最后 balancerInsertToTag: 在模板中的哪个balancer中插入outbounds tag列表,找不到位置就不插
func VmessConfig ¶
func VmessConfigBalancer ¶
func VmessConfigSingleNode ¶
func VmessSingleNodeConfigMerge ¶
func VmessSingleNodeConfigMerge(outboundDetourConfig *conf.OutboundDetourConfig, template V2Config, outboundInsertBeforeTag string) V2Config
Click to show internal directories.
Click to hide internal directories.