Documentation ¶
Index ¶
- Variables
- func LoadCA(caFile string) (cp *x509.CertPool, err error)
- func ParseAuthenticator(s string) (gost.Authenticator, error)
- func ParseBypass(s string) *gost.Bypass
- func ParseChainNode(ns string) (nodes []gost.Node, err error)
- func ParseHosts(s string) *gost.Hosts
- func ParseIP(s string, port string) (ips []string)
- func ParseResolver(cfg string) gost.Resolver
- func ParseUsers(authFile string) (users []*url.Userinfo, err error)
- func TlsConfig(certFile, keyFile string) (*tls.Config, error)
- type BaseConfig
- type PeerConfig
- type Route
- type Router
- type StringList
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultCertFile = "cert.pem" DefaultKeyFile = "key.pem" )
View Source
var (
Routers []Router
)
Functions ¶
func ParseAuthenticator ¶
func ParseBypass ¶
func ParseBypass(s string) *gost.Bypass
func ParseChainNode ¶
func ParseHosts ¶
func ParseHosts(s string) *gost.Hosts
func ParseResolver ¶
func ParseResolver(cfg string) gost.Resolver
Types ¶
type BaseConfig ¶
func ParseBaseConfig ¶
func ParseBaseConfig(s string, baseCfg *BaseConfig) (*BaseConfig, error)
type PeerConfig ¶
type PeerConfig struct { Strategy string `json:"strategy"` MaxFails int `json:"max_fails"` FailTimeout time.Duration PeriodF time.Duration // the PeriodF for live reloading Nodes []string `json:"nodes"` Group *gost.NodeGroup BaseNodes []gost.Node StoppedF chan struct{} }
func (*PeerConfig) Period ¶
func (cfg *PeerConfig) Period() time.Duration
func (*PeerConfig) Stopped ¶
func (cfg *PeerConfig) Stopped() bool
Stopped checks whether the reloader is StoppedF.
func (*PeerConfig) Validate ¶
func (cfg *PeerConfig) Validate()
type Route ¶
type Route struct { ServeNodes StringList ChainNodes StringList Retries int }
func (*Route) GenRouters ¶
func (*Route) ParseChain ¶
type Router ¶
type Router struct { Node gost.Node Server *gost.Server Handler gost.Handler Chain *gost.Chain Resolver gost.Resolver Hosts *gost.Hosts }
type StringList ¶
type StringList []string
func (*StringList) Set ¶
func (l *StringList) Set(value string) error
func (*StringList) String ¶
func (l *StringList) String() string
Click to show internal directories.
Click to hide internal directories.