Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefServerPort = 8909
View Source
var DefWebPort = 8000
Functions ¶
func WriterConfig ¶
func WriterConfig(cfgPath string, cfg *ClientConfig) error
WriterConfig
@Description: Get Config. @return ServerConfig
Types ¶
type ClientConfig ¶
type ClientConfig struct {
ServerPort int `json:"serverPort"`
ServerHost string `json:"serverHost"`
ManagerPort int `json:"managerPort"`
Token string `json:"token"`
PingTime time.Duration `json:"pingTime"`
Tunnels []*ClientTunnelConfig `json:"tunnels"`
Visitors []*ClientVisitorConfig `json:"visitors"`
Logger *LoggerConfig `json:"logger,omitempty"`
}
ClientConfig @Description: Description.
type ClientTunnelConfig ¶
type ClientTunnelConfig struct {
TunnelType lang.TunnelType `json:"type"`
Destination string `json:"destination"`
ProxyId string `json:"proxyId"`
HttpId string `json:"httpId,omitempty"`
//default 1500
UdpSize int `json:"udpSize,omitempty"`
RemotePort int `json:"-"`
MaxConn int `json:"maxConn,omitempty"`
}
type ClientVisitorConfig ¶ added in v0.4.0
type HttpRunnelProxy ¶
type LoggerConfig ¶
type LoggerConfig struct {
LoggLevel string `json:"logLevel"`
LogPath string `json:"logPath"`
Outs string `json:"outs"`
}
LoggerConfig @Description:
type ServerConfig ¶
type ServerConfig struct {
ServerPort int `json:"serverPort"`
TunnelPort int `json:"tunnelPort"`
Token string `json:"token"`
EnableWeb bool `json:"enableWeb"`
WebPort int `json:"webPort"`
Tunnel []*ServerTunnelConfig `json:"tunnel"`
Logger LoggerConfig `json:"logger"`
}
ServerConfig @Description: 配置文件存储.
func GetServerConfig ¶
func GetServerConfig(cfgPath string) (ServerConfig, error)
GetServerConfig
@Description: Get Config. @return ServerConfig
type ServerTunnelConfig ¶
type ServerTunnelConfig struct {
Id string `json:"id"`
Port int `json:"port"`
Type lang.TunnelType `json:"type"`
KeyFile string `json:"keyfile"`
CertFile string `json:"certFile"`
Http []HttpRunnelProxy `json:"http"`
Destination string `json:"destination"`
KeyContent string `json:"-"`
CertContent string `json:"-"`
IsFileCert bool `json:"-"`
IpStrategy string `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.