network

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConnectRequestType_name = map[int32]string{
		0: "tcp",
		1: "udp",
		2: "shell",
		3: "vnc",
		4: "bench",
		5: "code",
	}
	ConnectRequestType_value = map[string]int32{
		"tcp":   0,
		"udp":   1,
		"shell": 2,
		"vnc":   3,
		"bench": 4,
		"code":  5,
	}
)

Enum value maps for ConnectRequestType.

View Source
var (
	MsgType_name = map[int32]string{
		0:  "unknown",
		1:  "handshake",
		2:  "keepalive",
		3:  "connect_req",
		4:  "connect_rep",
		5:  "disconnect",
		6:  "forward",
		10: "shell_resize",
		11: "shell_data",
		20: "vnc_ctrl",
		21: "vnc_image",
		22: "vnc_mouse",
		23: "vnc_keyboard",
		24: "vnc_cad",
		25: "vnc_scroll",
		26: "vnc_clipboard",
		30: "code_request",
		31: "code_response_hdr",
		32: "code_response_body",
		33: "code_connect",
		34: "code_connect_response",
		35: "code_data",
	}
	MsgType_value = map[string]int32{
		"unknown":               0,
		"handshake":             1,
		"keepalive":             2,
		"connect_req":           3,
		"connect_rep":           4,
		"disconnect":            5,
		"forward":               6,
		"shell_resize":          10,
		"shell_data":            11,
		"vnc_ctrl":              20,
		"vnc_image":             21,
		"vnc_mouse":             22,
		"vnc_keyboard":          23,
		"vnc_cad":               24,
		"vnc_scroll":            25,
		"vnc_clipboard":         26,
		"code_request":          30,
		"code_response_hdr":     31,
		"code_response_body":    32,
		"code_connect":          33,
		"code_connect_response": 34,
		"code_data":             35,
	}
)

Enum value maps for MsgType.

View Source
var (
	VncStatus_name = map[int32]string{
		0: "unset_st",
		1: "down",
		2: "up",
	}
	VncStatus_value = map[string]int32{
		"unset_st": 0,
		"down":     1,
		"up":       2,
	}
)

Enum value maps for VncStatus.

View Source
var (
	VncImageEncoding_name = map[int32]string{
		0: "raw",
		1: "jpeg",
		2: "png",
	}
	VncImageEncoding_value = map[string]int32{
		"raw":  0,
		"jpeg": 1,
		"png":  2,
	}
)

Enum value maps for VncImageEncoding.

View Source
var (
	VncMouseButton_name = map[int32]string{
		0: "unset_btn",
		1: "left",
		2: "middle",
		3: "right",
	}
	VncMouseButton_value = map[string]int32{
		"unset_btn": 0,
		"left":      1,
		"middle":    2,
		"right":     3,
	}
)

Enum value maps for VncMouseButton.

View Source
var (
	VncClipboardType_name = map[int32]string{
		0: "unset_type",
		1: "text",
		2: "image",
		3: "file",
	}
	VncClipboardType_value = map[string]int32{
		"unset_type": 0,
		"text":       1,
		"image":      2,
		"file":       3,
	}
)

Enum value maps for VncClipboardType.

View Source
var File_connect_proto protoreflect.FileDescriptor
View Source
var File_forward_proto protoreflect.FileDescriptor
View Source
var File_shell_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CodeConnect added in v0.10.0

type CodeConnect struct {
	RequestId uint64                       `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Uri       string                       `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
	Header    map[string]*CodeHeaderValues `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

websocket

func (*CodeConnect) Descriptor deprecated added in v0.10.0

func (*CodeConnect) Descriptor() ([]byte, []int)

Deprecated: Use CodeConnect.ProtoReflect.Descriptor instead.

func (*CodeConnect) GetHeader added in v0.10.0

func (x *CodeConnect) GetHeader() map[string]*CodeHeaderValues

func (*CodeConnect) GetRequestId added in v0.10.0

func (x *CodeConnect) GetRequestId() uint64

func (*CodeConnect) GetUri added in v0.10.0

func (x *CodeConnect) GetUri() string

func (*CodeConnect) ProtoMessage added in v0.10.0

func (*CodeConnect) ProtoMessage()

func (*CodeConnect) ProtoReflect added in v0.10.0

func (x *CodeConnect) ProtoReflect() protoreflect.Message

func (*CodeConnect) Reset added in v0.10.0

func (x *CodeConnect) Reset()

func (*CodeConnect) String added in v0.10.0

func (x *CodeConnect) String() string

type CodeConnectResponse added in v0.10.0

type CodeConnectResponse struct {
	RequestId uint64                       `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Ok        bool                         `protobuf:"varint,2,opt,name=ok,proto3" json:"ok,omitempty"`
	Msg       string                       `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	Header    map[string]*CodeHeaderValues `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CodeConnectResponse) Descriptor deprecated added in v0.10.0

func (*CodeConnectResponse) Descriptor() ([]byte, []int)

Deprecated: Use CodeConnectResponse.ProtoReflect.Descriptor instead.

func (*CodeConnectResponse) GetHeader added in v0.10.0

func (x *CodeConnectResponse) GetHeader() map[string]*CodeHeaderValues

func (*CodeConnectResponse) GetMsg added in v0.10.0

func (x *CodeConnectResponse) GetMsg() string

func (*CodeConnectResponse) GetOk added in v0.10.0

func (x *CodeConnectResponse) GetOk() bool

func (*CodeConnectResponse) GetRequestId added in v0.10.0

func (x *CodeConnectResponse) GetRequestId() uint64

func (*CodeConnectResponse) ProtoMessage added in v0.10.0

func (*CodeConnectResponse) ProtoMessage()

func (*CodeConnectResponse) ProtoReflect added in v0.10.0

func (x *CodeConnectResponse) ProtoReflect() protoreflect.Message

func (*CodeConnectResponse) Reset added in v0.10.0

func (x *CodeConnectResponse) Reset()

func (*CodeConnectResponse) String added in v0.10.0

func (x *CodeConnectResponse) String() string

type CodeData added in v0.10.0

type CodeData struct {
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Ok        bool   `protobuf:"varint,2,opt,name=ok,proto3" json:"ok,omitempty"`
	Type      uint32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"`
	Data      []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*CodeData) Descriptor deprecated added in v0.10.0

func (*CodeData) Descriptor() ([]byte, []int)

Deprecated: Use CodeData.ProtoReflect.Descriptor instead.

func (*CodeData) GetData added in v0.10.0

func (x *CodeData) GetData() []byte

func (*CodeData) GetOk added in v0.10.0

func (x *CodeData) GetOk() bool

func (*CodeData) GetRequestId added in v0.10.0

func (x *CodeData) GetRequestId() uint64

func (*CodeData) GetType added in v0.10.0

func (x *CodeData) GetType() uint32

func (*CodeData) ProtoMessage added in v0.10.0

func (*CodeData) ProtoMessage()

func (*CodeData) ProtoReflect added in v0.10.0

func (x *CodeData) ProtoReflect() protoreflect.Message

func (*CodeData) Reset added in v0.10.0

func (x *CodeData) Reset()

func (*CodeData) String added in v0.10.0

func (x *CodeData) String() string

type CodeHeaderValues added in v0.10.0

type CodeHeaderValues struct {
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*CodeHeaderValues) Descriptor deprecated added in v0.10.0

func (*CodeHeaderValues) Descriptor() ([]byte, []int)

Deprecated: Use CodeHeaderValues.ProtoReflect.Descriptor instead.

func (*CodeHeaderValues) GetValues added in v0.10.0

func (x *CodeHeaderValues) GetValues() []string

func (*CodeHeaderValues) ProtoMessage added in v0.10.0

func (*CodeHeaderValues) ProtoMessage()

func (*CodeHeaderValues) ProtoReflect added in v0.10.0

func (x *CodeHeaderValues) ProtoReflect() protoreflect.Message

func (*CodeHeaderValues) Reset added in v0.10.0

func (x *CodeHeaderValues) Reset()

func (*CodeHeaderValues) String added in v0.10.0

func (x *CodeHeaderValues) String() string

type CodeRequest added in v0.10.0

type CodeRequest struct {
	RequestId uint64                       `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Method    string                       `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Uri       string                       `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
	Body      []byte                       `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	Header    map[string]*CodeHeaderValues `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

normal request

func (*CodeRequest) Descriptor deprecated added in v0.10.0

func (*CodeRequest) Descriptor() ([]byte, []int)

Deprecated: Use CodeRequest.ProtoReflect.Descriptor instead.

func (*CodeRequest) GetBody added in v0.10.0

func (x *CodeRequest) GetBody() []byte

func (*CodeRequest) GetHeader added in v0.10.0

func (x *CodeRequest) GetHeader() map[string]*CodeHeaderValues

func (*CodeRequest) GetMethod added in v0.10.0

func (x *CodeRequest) GetMethod() string

func (*CodeRequest) GetRequestId added in v0.10.0

func (x *CodeRequest) GetRequestId() uint64

func (*CodeRequest) GetUri added in v0.10.0

func (x *CodeRequest) GetUri() string

func (*CodeRequest) ProtoMessage added in v0.10.0

func (*CodeRequest) ProtoMessage()

func (*CodeRequest) ProtoReflect added in v0.10.0

func (x *CodeRequest) ProtoReflect() protoreflect.Message

func (*CodeRequest) Reset added in v0.10.0

func (x *CodeRequest) Reset()

func (*CodeRequest) String added in v0.10.0

func (x *CodeRequest) String() string

type CodeResponseBody added in v0.10.0

type CodeResponseBody struct {
	RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Index     uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	Mask      uint32 `protobuf:"varint,3,opt,name=mask,proto3" json:"mask,omitempty"`
	Body      []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*CodeResponseBody) Descriptor deprecated added in v0.10.0

func (*CodeResponseBody) Descriptor() ([]byte, []int)

Deprecated: Use CodeResponseBody.ProtoReflect.Descriptor instead.

func (*CodeResponseBody) GetBody added in v0.10.0

func (x *CodeResponseBody) GetBody() []byte

func (*CodeResponseBody) GetIndex added in v0.10.0

func (x *CodeResponseBody) GetIndex() uint32

func (*CodeResponseBody) GetMask added in v0.10.0

func (x *CodeResponseBody) GetMask() uint32

func (*CodeResponseBody) GetRequestId added in v0.10.0

func (x *CodeResponseBody) GetRequestId() uint64

func (*CodeResponseBody) ProtoMessage added in v0.10.0

func (*CodeResponseBody) ProtoMessage()

func (*CodeResponseBody) ProtoReflect added in v0.10.0

func (x *CodeResponseBody) ProtoReflect() protoreflect.Message

func (*CodeResponseBody) Reset added in v0.10.0

func (x *CodeResponseBody) Reset()

func (*CodeResponseBody) String added in v0.10.0

func (x *CodeResponseBody) String() string

type CodeResponseHeader added in v0.10.0

type CodeResponseHeader struct {
	RequestId uint64                       `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Code      uint32                       `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	Header    map[string]*CodeHeaderValues `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CodeResponseHeader) Descriptor deprecated added in v0.10.0

func (*CodeResponseHeader) Descriptor() ([]byte, []int)

Deprecated: Use CodeResponseHeader.ProtoReflect.Descriptor instead.

func (*CodeResponseHeader) GetCode added in v0.10.0

func (x *CodeResponseHeader) GetCode() uint32

func (*CodeResponseHeader) GetHeader added in v0.10.0

func (x *CodeResponseHeader) GetHeader() map[string]*CodeHeaderValues

func (*CodeResponseHeader) GetRequestId added in v0.10.0

func (x *CodeResponseHeader) GetRequestId() uint64

func (*CodeResponseHeader) ProtoMessage added in v0.10.0

func (*CodeResponseHeader) ProtoMessage()

func (*CodeResponseHeader) ProtoReflect added in v0.10.0

func (x *CodeResponseHeader) ProtoReflect() protoreflect.Message

func (*CodeResponseHeader) Reset added in v0.10.0

func (x *CodeResponseHeader) Reset()

func (*CodeResponseHeader) String added in v0.10.0

func (x *CodeResponseHeader) String() string

type Conn

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

Conn network connection

func NewConn

func NewConn(c net.Conn) *Conn

NewConn create connection

func (*Conn) Close

func (c *Conn) Close()

Close close connection

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

LocalAddr get connection local address

func (*Conn) ReadMessage

func (c *Conn) ReadMessage(timeout time.Duration) (*Msg, uint16, error)

ReadMessage read message with timeout

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

RemoteAddr get connection remote address

func (*Conn) SetCodec added in v0.12.1

func (c *Conn) SetCodec(cc encoding.Codec) *Conn

SetCodec set codec

func (*Conn) SetCompressor added in v0.12.1

func (c *Conn) SetCompressor(cp encoding.Compressor) *Conn

SetCompressor set compressor

func (*Conn) WriteMessage

func (c *Conn) WriteMessage(msg *Msg, timeout time.Duration) error

WriteMessage write message with timeout

type ConnectAddr

type ConnectAddr struct {
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectAddr) Descriptor deprecated

func (*ConnectAddr) Descriptor() ([]byte, []int)

Deprecated: Use ConnectAddr.ProtoReflect.Descriptor instead.

func (*ConnectAddr) GetAddr

func (x *ConnectAddr) GetAddr() string

func (*ConnectAddr) GetPort

func (x *ConnectAddr) GetPort() uint32

func (*ConnectAddr) ProtoMessage

func (*ConnectAddr) ProtoMessage()

func (*ConnectAddr) ProtoReflect

func (x *ConnectAddr) ProtoReflect() protoreflect.Message

func (*ConnectAddr) Reset

func (x *ConnectAddr) Reset()

func (*ConnectAddr) String

func (x *ConnectAddr) String() string

type ConnectRequest

type ConnectRequest struct {
	Name  string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                              // rule name
	XType ConnectRequestType `protobuf:"varint,2,opt,name=_type,json=Type,proto3,enum=network.ConnectRequestType" json:"_type,omitempty"` // rule type
	// Types that are assignable to Payload:
	//	*ConnectRequest_Caddr
	//	*ConnectRequest_Cshell
	//	*ConnectRequest_Cvnc
	Payload isConnectRequest_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*ConnectRequest) Descriptor deprecated

func (*ConnectRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.

func (*ConnectRequest) GetCaddr

func (x *ConnectRequest) GetCaddr() *ConnectAddr

func (*ConnectRequest) GetCshell

func (x *ConnectRequest) GetCshell() *ConnectShell

func (*ConnectRequest) GetCvnc

func (x *ConnectRequest) GetCvnc() *ConnectVnc

func (*ConnectRequest) GetName

func (x *ConnectRequest) GetName() string

func (*ConnectRequest) GetPayload

func (m *ConnectRequest) GetPayload() isConnectRequest_Payload

func (*ConnectRequest) GetXType

func (x *ConnectRequest) GetXType() ConnectRequestType

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) ProtoReflect

func (x *ConnectRequest) ProtoReflect() protoreflect.Message

func (*ConnectRequest) Reset

func (x *ConnectRequest) Reset()

func (*ConnectRequest) String

func (x *ConnectRequest) String() string

type ConnectRequestType

type ConnectRequestType int32
const (
	ConnectRequest_tcp   ConnectRequestType = 0 // tcp reverse proxy
	ConnectRequest_udp   ConnectRequestType = 1 // udp reverse proxy
	ConnectRequest_shell ConnectRequestType = 2 // shell
	ConnectRequest_vnc   ConnectRequestType = 3 // vnc
	ConnectRequest_bench ConnectRequestType = 4 // benchmark
	ConnectRequest_code  ConnectRequestType = 5 // code-server
)

func (ConnectRequestType) Descriptor

func (ConnectRequestType) Enum

func (ConnectRequestType) EnumDescriptor deprecated

func (ConnectRequestType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ConnectRequestType.Descriptor instead.

func (ConnectRequestType) Number

func (ConnectRequestType) String

func (x ConnectRequestType) String() string

func (ConnectRequestType) Type

type ConnectRequest_Caddr

type ConnectRequest_Caddr struct {
	Caddr *ConnectAddr `protobuf:"bytes,10,opt,name=caddr,proto3,oneof"` // for reverse proxy
}

type ConnectRequest_Cshell

type ConnectRequest_Cshell struct {
	Cshell *ConnectShell `protobuf:"bytes,11,opt,name=cshell,proto3,oneof"` // for shell
}

type ConnectRequest_Cvnc

type ConnectRequest_Cvnc struct {
	Cvnc *ConnectVnc `protobuf:"bytes,12,opt,name=cvnc,proto3,oneof"` // for vnc
}

type ConnectResponse

type ConnectResponse struct {
	Ok  bool   `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectResponse) Descriptor deprecated

func (*ConnectResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConnectResponse.ProtoReflect.Descriptor instead.

func (*ConnectResponse) GetMsg

func (x *ConnectResponse) GetMsg() string

func (*ConnectResponse) GetOk

func (x *ConnectResponse) GetOk() bool

func (*ConnectResponse) ProtoMessage

func (*ConnectResponse) ProtoMessage()

func (*ConnectResponse) ProtoReflect

func (x *ConnectResponse) ProtoReflect() protoreflect.Message

func (*ConnectResponse) Reset

func (x *ConnectResponse) Reset()

func (*ConnectResponse) String

func (x *ConnectResponse) String() string

type ConnectShell

type ConnectShell struct {
	Exec string   `protobuf:"bytes,1,opt,name=exec,proto3" json:"exec,omitempty"`
	Env  []string `protobuf:"bytes,2,rep,name=env,proto3" json:"env,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectShell) Descriptor deprecated

func (*ConnectShell) Descriptor() ([]byte, []int)

Deprecated: Use ConnectShell.ProtoReflect.Descriptor instead.

func (*ConnectShell) GetEnv

func (x *ConnectShell) GetEnv() []string

func (*ConnectShell) GetExec

func (x *ConnectShell) GetExec() string

func (*ConnectShell) ProtoMessage

func (*ConnectShell) ProtoMessage()

func (*ConnectShell) ProtoReflect

func (x *ConnectShell) ProtoReflect() protoreflect.Message

func (*ConnectShell) Reset

func (x *ConnectShell) Reset()

func (*ConnectShell) String

func (x *ConnectShell) String() string

type ConnectVnc

type ConnectVnc struct {
	Fps     uint32 `protobuf:"varint,1,opt,name=fps,proto3" json:"fps,omitempty"`
	Quality uint32 `protobuf:"varint,2,opt,name=quality,proto3" json:"quality,omitempty"` // image quality, percent
	Cursor  bool   `protobuf:"varint,3,opt,name=cursor,proto3" json:"cursor,omitempty"`   // show cursor
	// contains filtered or unexported fields
}

func (*ConnectVnc) Descriptor deprecated

func (*ConnectVnc) Descriptor() ([]byte, []int)

Deprecated: Use ConnectVnc.ProtoReflect.Descriptor instead.

func (*ConnectVnc) GetCursor

func (x *ConnectVnc) GetCursor() bool

func (*ConnectVnc) GetFps

func (x *ConnectVnc) GetFps() uint32

func (*ConnectVnc) GetQuality

func (x *ConnectVnc) GetQuality() uint32

func (*ConnectVnc) ProtoMessage

func (*ConnectVnc) ProtoMessage()

func (*ConnectVnc) ProtoReflect

func (x *ConnectVnc) ProtoReflect() protoreflect.Message

func (*ConnectVnc) Reset

func (x *ConnectVnc) Reset()

func (*ConnectVnc) String

func (x *ConnectVnc) String() string

type Data

type Data struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated

func (*Data) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetData

func (x *Data) GetData() []byte

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

type HandshakePayload

type HandshakePayload struct {
	Enc []byte `protobuf:"bytes,1,opt,name=enc,proto3" json:"enc,omitempty"`
	// contains filtered or unexported fields
}

func (*HandshakePayload) Descriptor deprecated

func (*HandshakePayload) Descriptor() ([]byte, []int)

Deprecated: Use HandshakePayload.ProtoReflect.Descriptor instead.

func (*HandshakePayload) GetEnc

func (x *HandshakePayload) GetEnc() []byte

func (*HandshakePayload) ProtoMessage

func (*HandshakePayload) ProtoMessage()

func (*HandshakePayload) ProtoReflect

func (x *HandshakePayload) ProtoReflect() protoreflect.Message

func (*HandshakePayload) Reset

func (x *HandshakePayload) Reset()

func (*HandshakePayload) String

func (x *HandshakePayload) String() string

type Msg

type Msg struct {
	XType  MsgType `protobuf:"varint,1,opt,name=_type,json=Type,proto3,enum=network.MsgType" json:"_type,omitempty"`
	From   string  `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	To     string  `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"`
	LinkId string  `protobuf:"bytes,6,opt,name=link_id,json=linkId,proto3" json:"link_id,omitempty"`
	// Types that are assignable to Payload:
	//	*Msg_Hsp
	//	*Msg_Creq
	//	*Msg_Crep
	//	*Msg_XData
	//	*Msg_Sresize
	//	*Msg_Sdata
	//	*Msg_Vctrl
	//	*Msg_Vimg
	//	*Msg_Vmouse
	//	*Msg_Vkbd
	//	*Msg_Vscroll
	//	*Msg_Vclipboard
	//	*Msg_Csreq
	//	*Msg_CsrepHdr
	//	*Msg_CsrepBody
	//	*Msg_Csconn
	//	*Msg_CsconnRep
	//	*Msg_Csdata
	Payload isMsg_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Msg) Descriptor deprecated

func (*Msg) Descriptor() ([]byte, []int)

Deprecated: Use Msg.ProtoReflect.Descriptor instead.

func (*Msg) GetCrep

func (x *Msg) GetCrep() *ConnectResponse

func (*Msg) GetCreq

func (x *Msg) GetCreq() *ConnectRequest

func (*Msg) GetCsconn added in v0.10.0

func (x *Msg) GetCsconn() *CodeConnect

func (*Msg) GetCsconnRep added in v0.10.0

func (x *Msg) GetCsconnRep() *CodeConnectResponse

func (*Msg) GetCsdata added in v0.10.0

func (x *Msg) GetCsdata() *CodeData

func (*Msg) GetCsrepBody added in v0.10.0

func (x *Msg) GetCsrepBody() *CodeResponseBody

func (*Msg) GetCsrepHdr added in v0.10.0

func (x *Msg) GetCsrepHdr() *CodeResponseHeader

func (*Msg) GetCsreq added in v0.10.0

func (x *Msg) GetCsreq() *CodeRequest

func (*Msg) GetFrom

func (x *Msg) GetFrom() string

func (*Msg) GetHsp

func (x *Msg) GetHsp() *HandshakePayload

func (*Msg) GetLinkId

func (x *Msg) GetLinkId() string

func (*Msg) GetPayload

func (m *Msg) GetPayload() isMsg_Payload

func (*Msg) GetSdata

func (x *Msg) GetSdata() *ShellData

func (*Msg) GetSresize

func (x *Msg) GetSresize() *ShellResize

func (*Msg) GetTo

func (x *Msg) GetTo() string

func (*Msg) GetVclipboard

func (x *Msg) GetVclipboard() *VncClipboard

func (*Msg) GetVctrl

func (x *Msg) GetVctrl() *VncControl

func (*Msg) GetVimg

func (x *Msg) GetVimg() *VncImage

func (*Msg) GetVkbd

func (x *Msg) GetVkbd() *VncKeyboard

func (*Msg) GetVmouse

func (x *Msg) GetVmouse() *VncMouse

func (*Msg) GetVscroll

func (x *Msg) GetVscroll() *VncScroll

func (*Msg) GetXData

func (x *Msg) GetXData() *Data

func (*Msg) GetXType

func (x *Msg) GetXType() MsgType

func (*Msg) ProtoMessage

func (*Msg) ProtoMessage()

func (*Msg) ProtoReflect

func (x *Msg) ProtoReflect() protoreflect.Message

func (*Msg) Reset

func (x *Msg) Reset()

func (*Msg) String

func (x *Msg) String() string

type MsgType

type MsgType int32
const (
	Msg_unknown     MsgType = 0
	Msg_handshake   MsgType = 1
	Msg_keepalive   MsgType = 2
	Msg_connect_req MsgType = 3
	Msg_connect_rep MsgType = 4
	Msg_disconnect  MsgType = 5
	Msg_forward     MsgType = 6
	// shell
	Msg_shell_resize MsgType = 10
	Msg_shell_data   MsgType = 11
	// vnc
	Msg_vnc_ctrl      MsgType = 20
	Msg_vnc_image     MsgType = 21
	Msg_vnc_mouse     MsgType = 22
	Msg_vnc_keyboard  MsgType = 23
	Msg_vnc_cad       MsgType = 24 // ctrl+alt+del
	Msg_vnc_scroll    MsgType = 25
	Msg_vnc_clipboard MsgType = 26
	// code-server
	Msg_code_request          MsgType = 30
	Msg_code_response_hdr     MsgType = 31
	Msg_code_response_body    MsgType = 32
	Msg_code_connect          MsgType = 33
	Msg_code_connect_response MsgType = 34
	Msg_code_data             MsgType = 35
)

func (MsgType) Descriptor

func (MsgType) Descriptor() protoreflect.EnumDescriptor

func (MsgType) Enum

func (x MsgType) Enum() *MsgType

func (MsgType) EnumDescriptor deprecated

func (MsgType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MsgType.Descriptor instead.

func (MsgType) Number

func (x MsgType) Number() protoreflect.EnumNumber

func (MsgType) String

func (x MsgType) String() string

func (MsgType) Type

func (MsgType) Type() protoreflect.EnumType

type Msg_Crep

type Msg_Crep struct {
	Crep *ConnectResponse `protobuf:"bytes,12,opt,name=crep,proto3,oneof"`
}

type Msg_Creq

type Msg_Creq struct {
	Creq *ConnectRequest `protobuf:"bytes,11,opt,name=creq,proto3,oneof"`
}

type Msg_Csconn added in v0.10.0

type Msg_Csconn struct {
	Csconn *CodeConnect `protobuf:"bytes,43,opt,name=csconn,proto3,oneof"`
}

type Msg_CsconnRep added in v0.10.0

type Msg_CsconnRep struct {
	CsconnRep *CodeConnectResponse `protobuf:"bytes,44,opt,name=csconn_rep,json=csconnRep,proto3,oneof"`
}

type Msg_Csdata added in v0.10.0

type Msg_Csdata struct {
	Csdata *CodeData `protobuf:"bytes,45,opt,name=csdata,proto3,oneof"`
}

type Msg_CsrepBody added in v0.10.0

type Msg_CsrepBody struct {
	CsrepBody *CodeResponseBody `protobuf:"bytes,42,opt,name=csrep_body,json=csrepBody,proto3,oneof"`
}

type Msg_CsrepHdr added in v0.10.0

type Msg_CsrepHdr struct {
	CsrepHdr *CodeResponseHeader `protobuf:"bytes,41,opt,name=csrep_hdr,json=csrepHdr,proto3,oneof"`
}

type Msg_Csreq added in v0.10.0

type Msg_Csreq struct {
	// code-server
	Csreq *CodeRequest `protobuf:"bytes,40,opt,name=csreq,proto3,oneof"`
}

type Msg_Hsp

type Msg_Hsp struct {
	Hsp *HandshakePayload `protobuf:"bytes,10,opt,name=hsp,proto3,oneof"`
}

type Msg_Sdata

type Msg_Sdata struct {
	Sdata *ShellData `protobuf:"bytes,21,opt,name=sdata,proto3,oneof"`
}

type Msg_Sresize

type Msg_Sresize struct {
	// shell
	Sresize *ShellResize `protobuf:"bytes,20,opt,name=sresize,proto3,oneof"`
}

type Msg_Vclipboard

type Msg_Vclipboard struct {
	Vclipboard *VncClipboard `protobuf:"bytes,35,opt,name=vclipboard,proto3,oneof"`
}

type Msg_Vctrl

type Msg_Vctrl struct {
	// vnc
	Vctrl *VncControl `protobuf:"bytes,30,opt,name=vctrl,proto3,oneof"`
}

type Msg_Vimg

type Msg_Vimg struct {
	Vimg *VncImage `protobuf:"bytes,31,opt,name=vimg,proto3,oneof"`
}

type Msg_Vkbd

type Msg_Vkbd struct {
	Vkbd *VncKeyboard `protobuf:"bytes,33,opt,name=vkbd,proto3,oneof"`
}

type Msg_Vmouse

type Msg_Vmouse struct {
	Vmouse *VncMouse `protobuf:"bytes,32,opt,name=vmouse,proto3,oneof"`
}

type Msg_Vscroll

type Msg_Vscroll struct {
	Vscroll *VncScroll `protobuf:"bytes,34,opt,name=vscroll,proto3,oneof"`
}

type Msg_XData

type Msg_XData struct {
	XData *Data `protobuf:"bytes,13,opt,name=_data,json=Data,proto3,oneof"`
}

type ShellData

type ShellData struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ShellData) Descriptor deprecated

func (*ShellData) Descriptor() ([]byte, []int)

Deprecated: Use ShellData.ProtoReflect.Descriptor instead.

func (*ShellData) GetData

func (x *ShellData) GetData() []byte

func (*ShellData) ProtoMessage

func (*ShellData) ProtoMessage()

func (*ShellData) ProtoReflect

func (x *ShellData) ProtoReflect() protoreflect.Message

func (*ShellData) Reset

func (x *ShellData) Reset()

func (*ShellData) String

func (x *ShellData) String() string

type ShellResize

type ShellResize struct {
	Rows uint32 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"`
	Cols uint32 `protobuf:"varint,2,opt,name=cols,proto3" json:"cols,omitempty"`
	// contains filtered or unexported fields
}

func (*ShellResize) Descriptor deprecated

func (*ShellResize) Descriptor() ([]byte, []int)

Deprecated: Use ShellResize.ProtoReflect.Descriptor instead.

func (*ShellResize) GetCols

func (x *ShellResize) GetCols() uint32

func (*ShellResize) GetRows

func (x *ShellResize) GetRows() uint32

func (*ShellResize) ProtoMessage

func (*ShellResize) ProtoMessage()

func (*ShellResize) ProtoReflect

func (x *ShellResize) ProtoReflect() protoreflect.Message

func (*ShellResize) Reset

func (x *ShellResize) Reset()

func (*ShellResize) String

func (x *ShellResize) String() string

type VncClipboard

type VncClipboard struct {
	Set   bool             `protobuf:"varint,1,opt,name=set,proto3" json:"set,omitempty"`
	XType VncClipboardType `protobuf:"varint,2,opt,name=_type,json=Type,proto3,enum=network.VncClipboardType" json:"_type,omitempty"`
	// Types that are assignable to Payload:
	//	*VncClipboard_Data
	Payload isVncClipboard_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*VncClipboard) Descriptor deprecated

func (*VncClipboard) Descriptor() ([]byte, []int)

Deprecated: Use VncClipboard.ProtoReflect.Descriptor instead.

func (*VncClipboard) GetData

func (x *VncClipboard) GetData() string

func (*VncClipboard) GetPayload

func (m *VncClipboard) GetPayload() isVncClipboard_Payload

func (*VncClipboard) GetSet

func (x *VncClipboard) GetSet() bool

func (*VncClipboard) GetXType

func (x *VncClipboard) GetXType() VncClipboardType

func (*VncClipboard) ProtoMessage

func (*VncClipboard) ProtoMessage()

func (*VncClipboard) ProtoReflect

func (x *VncClipboard) ProtoReflect() protoreflect.Message

func (*VncClipboard) Reset

func (x *VncClipboard) Reset()

func (*VncClipboard) String

func (x *VncClipboard) String() string

type VncClipboardType

type VncClipboardType int32
const (
	VncClipboard_unset_type VncClipboardType = 0
	VncClipboard_text       VncClipboardType = 1
	VncClipboard_image      VncClipboardType = 2
	VncClipboard_file       VncClipboardType = 3
)

func (VncClipboardType) Descriptor

func (VncClipboardType) Enum

func (VncClipboardType) EnumDescriptor deprecated

func (VncClipboardType) EnumDescriptor() ([]byte, []int)

Deprecated: Use VncClipboardType.Descriptor instead.

func (VncClipboardType) Number

func (VncClipboardType) String

func (x VncClipboardType) String() string

func (VncClipboardType) Type

type VncClipboard_Data

type VncClipboard_Data struct {
	Data string `protobuf:"bytes,10,opt,name=data,proto3,oneof"` // text data
}

type VncControl

type VncControl struct {
	Quality uint32 `protobuf:"varint,1,opt,name=quality,proto3" json:"quality,omitempty"` // image quality, percent
	Cursor  bool   `protobuf:"varint,2,opt,name=cursor,proto3" json:"cursor,omitempty"`   // show cursor
	// contains filtered or unexported fields
}

func (*VncControl) Descriptor deprecated

func (*VncControl) Descriptor() ([]byte, []int)

Deprecated: Use VncControl.ProtoReflect.Descriptor instead.

func (*VncControl) GetCursor

func (x *VncControl) GetCursor() bool

func (*VncControl) GetQuality

func (x *VncControl) GetQuality() uint32

func (*VncControl) ProtoMessage

func (*VncControl) ProtoMessage()

func (*VncControl) ProtoReflect

func (x *VncControl) ProtoReflect() protoreflect.Message

func (*VncControl) Reset

func (x *VncControl) Reset()

func (*VncControl) String

func (x *VncControl) String() string

type VncImage

type VncImage struct {
	XInfo  *VncImageInfo    `protobuf:"bytes,1,opt,name=_info,json=Info,proto3" json:"_info,omitempty"`
	Encode VncImageEncoding `protobuf:"varint,2,opt,name=encode,proto3,enum=network.VncImageEncoding" json:"encode,omitempty"`
	Data   []byte           `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*VncImage) Descriptor deprecated

func (*VncImage) Descriptor() ([]byte, []int)

Deprecated: Use VncImage.ProtoReflect.Descriptor instead.

func (*VncImage) GetData

func (x *VncImage) GetData() []byte

func (*VncImage) GetEncode

func (x *VncImage) GetEncode() VncImageEncoding

func (*VncImage) GetXInfo

func (x *VncImage) GetXInfo() *VncImageInfo

func (*VncImage) ProtoMessage

func (*VncImage) ProtoMessage()

func (*VncImage) ProtoReflect

func (x *VncImage) ProtoReflect() protoreflect.Message

func (*VncImage) Reset

func (x *VncImage) Reset()

func (*VncImage) String

func (x *VncImage) String() string

type VncImageEncoding

type VncImageEncoding int32
const (
	VncImage_raw  VncImageEncoding = 0
	VncImage_jpeg VncImageEncoding = 1
	VncImage_png  VncImageEncoding = 2
)

func (VncImageEncoding) Descriptor

func (VncImageEncoding) Enum

func (VncImageEncoding) EnumDescriptor deprecated

func (VncImageEncoding) EnumDescriptor() ([]byte, []int)

Deprecated: Use VncImageEncoding.Descriptor instead.

func (VncImageEncoding) Number

func (VncImageEncoding) String

func (x VncImageEncoding) String() string

func (VncImageEncoding) Type

type VncImageInfo

type VncImageInfo struct {
	ScreenWidth  uint32 `protobuf:"varint,1,opt,name=screen_width,json=screenWidth,proto3" json:"screen_width,omitempty"`
	ScreenHeight uint32 `protobuf:"varint,2,opt,name=screen_height,json=screenHeight,proto3" json:"screen_height,omitempty"`
	RectX        uint32 `protobuf:"varint,3,opt,name=rect_x,json=rectX,proto3" json:"rect_x,omitempty"`
	RectY        uint32 `protobuf:"varint,4,opt,name=rect_y,json=rectY,proto3" json:"rect_y,omitempty"`
	RectWidth    uint32 `protobuf:"varint,5,opt,name=rect_width,json=rectWidth,proto3" json:"rect_width,omitempty"`
	RectHeight   uint32 `protobuf:"varint,6,opt,name=rect_height,json=rectHeight,proto3" json:"rect_height,omitempty"`
	// contains filtered or unexported fields
}

func (*VncImageInfo) Descriptor deprecated

func (*VncImageInfo) Descriptor() ([]byte, []int)

Deprecated: Use VncImageInfo.ProtoReflect.Descriptor instead.

func (*VncImageInfo) GetRectHeight

func (x *VncImageInfo) GetRectHeight() uint32

func (*VncImageInfo) GetRectWidth

func (x *VncImageInfo) GetRectWidth() uint32

func (*VncImageInfo) GetRectX

func (x *VncImageInfo) GetRectX() uint32

func (*VncImageInfo) GetRectY

func (x *VncImageInfo) GetRectY() uint32

func (*VncImageInfo) GetScreenHeight

func (x *VncImageInfo) GetScreenHeight() uint32

func (*VncImageInfo) GetScreenWidth

func (x *VncImageInfo) GetScreenWidth() uint32

func (*VncImageInfo) ProtoMessage

func (*VncImageInfo) ProtoMessage()

func (*VncImageInfo) ProtoReflect

func (x *VncImageInfo) ProtoReflect() protoreflect.Message

func (*VncImageInfo) Reset

func (x *VncImageInfo) Reset()

func (*VncImageInfo) String

func (x *VncImageInfo) String() string

type VncKeyboard

type VncKeyboard struct {
	Type VncStatus `protobuf:"varint,1,opt,name=type,proto3,enum=network.VncStatus" json:"type,omitempty"`
	// https://github.com/go-vgo/robotgo/blob/master/docs/keys.md
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*VncKeyboard) Descriptor deprecated

func (*VncKeyboard) Descriptor() ([]byte, []int)

Deprecated: Use VncKeyboard.ProtoReflect.Descriptor instead.

func (*VncKeyboard) GetKey

func (x *VncKeyboard) GetKey() string

func (*VncKeyboard) GetType

func (x *VncKeyboard) GetType() VncStatus

func (*VncKeyboard) ProtoMessage

func (*VncKeyboard) ProtoMessage()

func (*VncKeyboard) ProtoReflect

func (x *VncKeyboard) ProtoReflect() protoreflect.Message

func (*VncKeyboard) Reset

func (x *VncKeyboard) Reset()

func (*VncKeyboard) String

func (x *VncKeyboard) String() string

type VncMouse

type VncMouse struct {
	Type VncStatus      `protobuf:"varint,1,opt,name=type,proto3,enum=network.VncStatus" json:"type,omitempty"`
	Btn  VncMouseButton `protobuf:"varint,2,opt,name=btn,proto3,enum=network.VncMouseButton" json:"btn,omitempty"`
	X    uint32         `protobuf:"varint,3,opt,name=x,proto3" json:"x,omitempty"`
	Y    uint32         `protobuf:"varint,4,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

func (*VncMouse) Descriptor deprecated

func (*VncMouse) Descriptor() ([]byte, []int)

Deprecated: Use VncMouse.ProtoReflect.Descriptor instead.

func (*VncMouse) GetBtn

func (x *VncMouse) GetBtn() VncMouseButton

func (*VncMouse) GetType

func (x *VncMouse) GetType() VncStatus

func (*VncMouse) GetX

func (x *VncMouse) GetX() uint32

func (*VncMouse) GetY

func (x *VncMouse) GetY() uint32

func (*VncMouse) ProtoMessage

func (*VncMouse) ProtoMessage()

func (*VncMouse) ProtoReflect

func (x *VncMouse) ProtoReflect() protoreflect.Message

func (*VncMouse) Reset

func (x *VncMouse) Reset()

func (*VncMouse) String

func (x *VncMouse) String() string

type VncMouseButton

type VncMouseButton int32
const (
	VncMouse_unset_btn VncMouseButton = 0
	VncMouse_left      VncMouseButton = 1
	VncMouse_middle    VncMouseButton = 2
	VncMouse_right     VncMouseButton = 3
)

func (VncMouseButton) Descriptor

func (VncMouseButton) Enum

func (x VncMouseButton) Enum() *VncMouseButton

func (VncMouseButton) EnumDescriptor deprecated

func (VncMouseButton) EnumDescriptor() ([]byte, []int)

Deprecated: Use VncMouseButton.Descriptor instead.

func (VncMouseButton) Number

func (VncMouseButton) String

func (x VncMouseButton) String() string

func (VncMouseButton) Type

type VncScroll

type VncScroll struct {
	X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

func (*VncScroll) Descriptor deprecated

func (*VncScroll) Descriptor() ([]byte, []int)

Deprecated: Use VncScroll.ProtoReflect.Descriptor instead.

func (*VncScroll) GetX

func (x *VncScroll) GetX() int32

func (*VncScroll) GetY

func (x *VncScroll) GetY() int32

func (*VncScroll) ProtoMessage

func (*VncScroll) ProtoMessage()

func (*VncScroll) ProtoReflect

func (x *VncScroll) ProtoReflect() protoreflect.Message

func (*VncScroll) Reset

func (x *VncScroll) Reset()

func (*VncScroll) String

func (x *VncScroll) String() string

type VncStatus

type VncStatus int32
const (
	VncStatus_unset_st VncStatus = 0
	VncStatus_down     VncStatus = 1
	VncStatus_up       VncStatus = 2
)

func (VncStatus) Descriptor

func (VncStatus) Descriptor() protoreflect.EnumDescriptor

func (VncStatus) Enum

func (x VncStatus) Enum() *VncStatus

func (VncStatus) EnumDescriptor deprecated

func (VncStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use VncStatus.Descriptor instead.

func (VncStatus) Number

func (x VncStatus) Number() protoreflect.EnumNumber

func (VncStatus) String

func (x VncStatus) String() string

func (VncStatus) Type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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