msg

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(c1 *conn.Conn, c2 *conn.Conn)

deprecated will block until connection close

func JoinMore

func JoinMore(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser, conf config.BaseConf, needRecord bool)

join two connections and do some operations

Types

type ControlReq

type ControlReq struct {
	Type          int64  `json:"type"`
	ProxyName     string `json:"proxy_name"`
	AuthKey       string `json:"auth_key"`
	UseEncryption bool   `json:"use_encryption"`
	UseGzip       bool   `json:"use_gzip"`
	PoolCount     int64  `json:"pool_count"`

	// configures used if privilege_mode is enabled
	PrivilegeMode     bool     `json:"privilege_mode"`
	PrivilegeKey      string   `json:"privilege_key"`
	ProxyType         string   `json:"proxy_type"`
	RemotePort        int64    `json:"remote_port"`
	CustomDomains     []string `json:"custom_domains, omitempty"`
	Locations         []string `json:"locations"`
	HostHeaderRewrite string   `json:"host_header_rewrite"`
	HttpUserName      string   `json:"http_username"`
	HttpPassWord      string   `json:"http_password"`
	SubDomain         string   `json:"subdomain"`
	Timestamp         int64    `json:"timestamp"`
}

messages between control connections of frpc and frps

type ControlRes

type ControlRes struct {
	Type int64  `json:"type"`
	Code int64  `json:"code"`
	Msg  string `json:"msg"`
}

type GeneralRes

type GeneralRes struct {
	Code int64  `json:"code"`
	Msg  string `json:"msg"`
}

type UdpPacket added in v0.9.0

type UdpPacket struct {
	Content []byte       `json:"-"`
	Src     *net.UDPAddr `json:"-"`
	Dst     *net.UDPAddr `json:"-"`

	EncodeContent string `json:"content"`
	SrcStr        string `json:"src"`
	DstStr        string `json:"dst"`
}

func NewUdpPacket added in v0.9.0

func NewUdpPacket(content []byte, src, dst *net.UDPAddr) *UdpPacket

func (*UdpPacket) Pack added in v0.9.0

func (up *UdpPacket) Pack() []byte

parse one udp packet struct to bytes

func (*UdpPacket) UnPack added in v0.9.0

func (up *UdpPacket) UnPack(packet []byte) error

parse from bytes to UdpPacket struct

Jump to

Keyboard shortcuts

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