msg

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteMsg

func WriteMsg(w net.Conn, mType MsgType, in interface{}) error

Types

type AddTunnels

type AddTunnels struct {
	Tunnels map[string]Tunnel
}

type ClientHello

type ClientHello struct {
	EncryptMode    string
	EnableCompress bool
	Version        string
}

type ControlClientHello

type ControlClientHello struct {
	CipherKey []byte
	AuthToken string
	ClientID  *uuid.UUID
}

type ControlServerHello

type ControlServerHello struct {
	ClientID  uuid.UUID
	CipherKey []byte
}

type Error

type Error struct {
	Msg string
}

func (*Error) Error

func (e *Error) Error() string

type Local

type Local struct {
	Schema             string
	Host               string
	Port               uint16
	InsecureSkipVerify bool
}

type MsgType

type MsgType uint8
const (
	TypeClientHello MsgType = iota
	TypeServerHello
	TypeControlClientHello
	TypeControlServerHello
	TypePipeClientHello
	TypeAddTunnels
	TypePipeReq
	TypePing
	TypePong
	TypeError
	TypeExit
)

func ReadMsg

func ReadMsg(r net.Conn) (MsgType, interface{}, error)

func ReadMsgWithoutDeadline added in v0.1.5

func ReadMsgWithoutDeadline(r net.Conn) (MsgType, interface{}, error)

type PipeClientHello

type PipeClientHello struct {
	Once     uuid.UUID
	ClientID uuid.UUID
}

type Public

type Public struct {
	Schema          string
	Host            string
	Port            uint16
	AllowReallocate bool
}

type Tunnel

type Tunnel struct {
	Public          Public
	Local           Local
	HttpHostRewrite string
}

func (Tunnel) LocalAddr

func (tc Tunnel) LocalAddr() string

func (Tunnel) PublicAddr

func (tc Tunnel) PublicAddr() string

Jump to

Keyboard shortcuts

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