Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version request header Version = []byte("\x01MAGIC") )
Functions ¶
func NewTLSConfig ¶
NewTLSConfig return tls.config
Types ¶
type Client ¶
type Client struct { Sessions Name string LocalAddr string ServerAddr string // contains filtered or unexported fields }
Client define a client
type Config ¶
type Config struct { ServerAddr string `yaml:"server_addr,omitempty"` AuthToken string `yaml:"auth_token"` Proxy map[string]string `yaml:"proxy"` }
Config define a client config
func ParseConfig ¶
ParseConfig parse config file
type Proxy ¶
type Proxy struct { Sessions Name string Port int Listener net.Listener // contains filtered or unexported fields }
Proxy define a Proxy
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server define a server type
type Session ¶
type Session struct { ID []byte CloseC chan []byte Done chan struct{} // contains filtered or unexported fields }
Session define session.
func NewSession ¶
NewSession return a new session and start a goroutine
Source Files
¶
Click to show internal directories.
Click to hide internal directories.