Documentation ¶
Index ¶
- type ClientConn
- func (self *ClientConn) AddHandler(handler *ProxyHandler)
- func (self *ClientConn) GetHandler(key int) *ProxyHandler
- func (self *ClientConn) GetLoginTime() string
- func (self *ClientConn) GetMappingNumber() int
- func (self *ClientConn) GetMappings() (mappings []web.MappingModel)
- func (self *ClientConn) GetName() string
- func (self *ClientConn) RemoveHandler(key int)
- func (self *ClientConn) UpdateExpireTime()
- type ClientReader
- type ProxyHandler
- type Server
- func (self *Server) GetClient(name string) (cli web.ClientModel)
- func (self *Server) GetClientNumber() int
- func (self *Server) GetClients() (clis []web.ClientModel)
- func (self *Server) GetMapping(port int) web.MappingModel
- func (self *Server) GetMappingNumber() int
- func (self *Server) GetMappings() (mappings []web.MappingModel)
- func (self *Server) GetName() string
- func (self *Server) GetStartupTime() string
- func (self *Server) Handle(conn net.Conn)
- func (self *Server) IsTLS() bool
- func (self *Server) Supervise()
- func (self *Server) TurnMappingOff(port int) bool
- func (self *Server) TurnMappingOn(port int) bool
- func (self *Server) WebDemon()
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConn ¶
type ClientConn struct {
// contains filtered or unexported fields
}
func NewClientConn ¶
func (*ClientConn) AddHandler ¶
func (self *ClientConn) AddHandler(handler *ProxyHandler)
func (*ClientConn) GetHandler ¶
func (self *ClientConn) GetHandler(key int) *ProxyHandler
func (*ClientConn) GetLoginTime ¶
func (self *ClientConn) GetLoginTime() string
func (*ClientConn) GetMappingNumber ¶
func (self *ClientConn) GetMappingNumber() int
func (*ClientConn) GetMappings ¶
func (self *ClientConn) GetMappings() (mappings []web.MappingModel)
func (*ClientConn) GetName ¶
func (self *ClientConn) GetName() string
func (*ClientConn) RemoveHandler ¶
func (self *ClientConn) RemoveHandler(key int)
func (*ClientConn) UpdateExpireTime ¶
func (self *ClientConn) UpdateExpireTime()
type ClientReader ¶
type ClientReader struct {
common.ProtocolReader
}
type ProxyHandler ¶
type ProxyHandler struct {
// contains filtered or unexported fields
}
func NewProxyHandler ¶
func (*ProxyHandler) Free ¶
func (self *ProxyHandler) Free()
func (*ProxyHandler) GetAddr ¶
func (self *ProxyHandler) GetAddr() string
func (*ProxyHandler) GetRemotePort ¶
func (self *ProxyHandler) GetRemotePort() int
func (*ProxyHandler) Handle ¶
func (self *ProxyHandler) Handle(conn net.Conn)
func (*ProxyHandler) IsOn ¶
func (self *ProxyHandler) IsOn() bool
func (*ProxyHandler) TurnOff ¶
func (self *ProxyHandler) TurnOff() bool
func (*ProxyHandler) TurnOn ¶
func (self *ProxyHandler) TurnOn() bool
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) GetClientNumber ¶
func (*Server) GetClients ¶
func (self *Server) GetClients() (clis []web.ClientModel)
func (*Server) GetMapping ¶
func (self *Server) GetMapping(port int) web.MappingModel
func (*Server) GetMappingNumber ¶
func (*Server) GetMappings ¶
func (self *Server) GetMappings() (mappings []web.MappingModel)
func (*Server) GetStartupTime ¶
func (*Server) TurnMappingOff ¶
func (*Server) TurnMappingOn ¶
type ServerConfig ¶
type ServerConfig struct { Ip string `json:"ip"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` Timeout int `json:"timeout"` TLS struct { Enabled bool `json:"enabled"` Port int `json:"port"` Ca string `json:"ca"` Key string `json:"key"` } `json:"tls"` Web web.WebConfig `json:"web"` }
Click to show internal directories.
Click to hide internal directories.