server

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2017 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ControlMap = make(map[uuid.UUID]*Control)
View Source
var ControlMapLock sync.RWMutex
View Source
var OldTunnelLock sync.Mutex
View Source
var OldTunnelMap = make(map[uuid.UUID]map[string]msg.Tunnel)
View Source
var TunnelMap = make(map[string]*Tunnel)
View Source
var TunnelMapLock sync.RWMutex

Functions

func LoadConfig

func LoadConfig(configDetail []byte, configType string) error

func Main

func Main(configDetail []byte, configType string)

func PipeHandShake

func PipeHandShake(conn net.Conn, phs *msg.PipeClientHello) error

Types

type Aes

type Aes struct {
	SecretKey string `yaml:"secret_key,omitempty"`
}

type Config

type Config struct {
	Debug        bool   `yaml:"debug,omitempty"`
	LogFile      string `yaml:"log_file,omitempty"`
	ListenPort   int    `yaml:"port,omitempty"`
	ListenIP     string `yaml:"ip,omitempty"`
	HttpPort     uint16 `yaml:"http_port,omitempty"`
	HttpsPort    uint16 `yaml:"https_port,omitempty"`
	ManagePort   uint16 `yaml:"manage_port,omitempty"`
	ServerDomain string `yaml:"server_domain,omitempty"`
	Aes          Aes    `yaml:"aes,omitempty"`
	Tls          Tls    `yaml:"tls,omitempty"`
	AuthEnable   bool   `yaml:"auth_enable,omitempty"`
	AuthUrl      string `yaml:"auth_url,omitempty"`
	NotifyEnable bool   `yaml:"notify_enable,omitempty"`
	NotifyUrl    string `yaml:"notify_url,omitempty"`
	NotifyKey    string `yaml:"notify_key,omitempty"`
	DSN          string `yaml:"dsn,omitempty"`
	RelicLicense string `yaml:"relic,omitempty"`
	Health       Health `yaml:"health,omitempty"`
	MaxIdlePipes string `yaml:"max_idle_pipes,omitempty"`
	MaxStreams   string `yaml:"max_streams,omitempty"`
	PProfEnable  bool   `yaml:"pprof_enable,omitempty"`
}

type Control

type Control struct {
	ClientID uuid.UUID
	// contains filtered or unexported fields
}

func NewControl

func NewControl(conn net.Conn, encryptMode string, enableCompress bool, version string) *Control

func (*Control) Close

func (c *Control) Close()

func (*Control) GenerateClientId

func (c *Control) GenerateClientId() uuid.UUID

func (*Control) Serve

func (c *Control) Serve()

func (*Control) ServerAddTunnels

func (c *Control) ServerAddTunnels(sstm *msg.AddTunnels)

add or update tunnel stat

func (*Control) ServerHandShake

func (c *Control) ServerHandShake() error

type Health

type Health struct {
	Interval int64 `yaml:"interval,omitempty"`
	TimeOut  int64 `yaml:"timeout,omitempty"`
}

type Tls

type Tls struct {
	TlsCert string `yaml:"cert,omitempty"`
	TlsKey  string `yaml:"key,omitempty"`
}

type Tunnel

type Tunnel struct {
	// contains filtered or unexported fields
}

func (*Tunnel) Close

func (t *Tunnel) Close()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL