Documentation
¶
Index ¶
- Variables
- func NewProtoReader(stream quic.ReceiveStream) protodelim.Reader
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetArgs() []string
- func (x *Command) GetParam(key string) (string, bool)
- func (x *Command) GetParamWithDefault(key, val string) string
- func (x *Command) GetParams() []*CommandParam
- func (x *Command) GetType() CommandType
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type CommandParam
- func (*CommandParam) Descriptor() ([]byte, []int)deprecated
- func (x *CommandParam) GetKey() string
- func (x *CommandParam) GetValue() string
- func (*CommandParam) ProtoMessage()
- func (x *CommandParam) ProtoReflect() protoreflect.Message
- func (x *CommandParam) Reset()
- func (x *CommandParam) String() string
- type CommandType
- func (CommandType) Descriptor() protoreflect.EnumDescriptor
- func (x CommandType) Enum() *CommandType
- func (CommandType) EnumDescriptor() ([]byte, []int)deprecated
- func (x CommandType) Number() protoreflect.EnumNumber
- func (x CommandType) String() string
- func (CommandType) Type() protoreflect.EnumType
- type ErrCode
- type Handshake
- func (*Handshake) Descriptor() ([]byte, []int)deprecated
- func (x *Handshake) GetAccessKey() string
- func (x *Handshake) GetSign() string
- func (x *Handshake) GetT() uint64
- func (*Handshake) ProtoMessage()
- func (x *Handshake) ProtoReflect() protoreflect.Message
- func (x *Handshake) Reset()
- func (x *Handshake) String() string
- type Heartbeat
- func (*Heartbeat) Descriptor() ([]byte, []int)deprecated
- func (x *Heartbeat) GetHostname() string
- func (x *Heartbeat) GetLocaltime() int64
- func (x *Heartbeat) GetOsName() string
- func (x *Heartbeat) GetUsername() string
- func (*Heartbeat) ProtoMessage()
- func (x *Heartbeat) ProtoReflect() protoreflect.Message
- func (x *Heartbeat) Reset()
- func (x *Heartbeat) String() string
- type Ret
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCode_name = map[int32]string{ 0: "NoError", 1: "AuthError", 2: "UnknownApp", 3: "SignatureTimeout", 4: "HandshakeFailed", 5: "UnknownCommand", 6: "UnknownSession", } ErrCode_value = map[string]int32{ "NoError": 0, "AuthError": 1, "UnknownApp": 2, "SignatureTimeout": 3, "HandshakeFailed": 4, "UnknownCommand": 5, "UnknownSession": 6, } )
Enum value maps for ErrCode.
View Source
var ( CommandType_name = map[int32]string{ 0: "EMPTY", 1: "ECHO", 2: "EXEC", 3: "PROXY", 4: "FORWARD", } CommandType_value = map[string]int32{ "EMPTY": 0, "ECHO": 1, "EXEC": 2, "PROXY": 3, "FORWARD": 4, } )
Enum value maps for CommandType.
View Source
var File_packet_proto protoreflect.FileDescriptor
Functions ¶
func NewProtoReader ¶
func NewProtoReader(stream quic.ReceiveStream) protodelim.Reader
Types ¶
type Command ¶
type Command struct { Type CommandType `protobuf:"varint,1,opt,name=type,proto3,enum=packet.CommandType" json:"type,omitempty"` Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` Params []*CommandParam `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func ForwardCommand ¶
ForwardCommand FORWARD <REMOTE> <ADDRESS> like FORWARD xxx 127.0.0.1:8000
func (*Command) Descriptor
deprecated
func (*Command) GetParamWithDefault ¶
func (*Command) GetParams ¶
func (x *Command) GetParams() []*CommandParam
func (*Command) GetType ¶
func (x *Command) GetType() CommandType
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type CommandParam ¶
type CommandParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*CommandParam) Descriptor
deprecated
func (*CommandParam) Descriptor() ([]byte, []int)
Deprecated: Use CommandParam.ProtoReflect.Descriptor instead.
func (*CommandParam) GetKey ¶
func (x *CommandParam) GetKey() string
func (*CommandParam) GetValue ¶
func (x *CommandParam) GetValue() string
func (*CommandParam) ProtoMessage ¶
func (*CommandParam) ProtoMessage()
func (*CommandParam) ProtoReflect ¶
func (x *CommandParam) ProtoReflect() protoreflect.Message
func (*CommandParam) Reset ¶
func (x *CommandParam) Reset()
func (*CommandParam) String ¶
func (x *CommandParam) String() string
type CommandType ¶
type CommandType int32
const ( CommandType_EMPTY CommandType = 0 CommandType_ECHO CommandType = 1 CommandType_EXEC CommandType = 2 CommandType_PROXY CommandType = 3 CommandType_FORWARD CommandType = 4 )
func (CommandType) Descriptor ¶
func (CommandType) Descriptor() protoreflect.EnumDescriptor
func (CommandType) Enum ¶
func (x CommandType) Enum() *CommandType
func (CommandType) EnumDescriptor
deprecated
func (CommandType) EnumDescriptor() ([]byte, []int)
Deprecated: Use CommandType.Descriptor instead.
func (CommandType) Number ¶
func (x CommandType) Number() protoreflect.EnumNumber
func (CommandType) String ¶
func (x CommandType) String() string
func (CommandType) Type ¶
func (CommandType) Type() protoreflect.EnumType
type ErrCode ¶
type ErrCode int32
func (ErrCode) Descriptor ¶
func (ErrCode) Descriptor() protoreflect.EnumDescriptor
func (ErrCode) EnumDescriptor
deprecated
func (ErrCode) Number ¶
func (x ErrCode) Number() protoreflect.EnumNumber
func (ErrCode) Type ¶
func (ErrCode) Type() protoreflect.EnumType
type Handshake ¶
type Handshake struct { AccessKey string `protobuf:"bytes,1,opt,name=accessKey,proto3" json:"accessKey,omitempty"` Sign string `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"` T uint64 `protobuf:"varint,3,opt,name=t,proto3" json:"t,omitempty"` // contains filtered or unexported fields }
func (*Handshake) Descriptor
deprecated
func (*Handshake) GetAccessKey ¶
func (*Handshake) ProtoMessage ¶
func (*Handshake) ProtoMessage()
func (*Handshake) ProtoReflect ¶
func (x *Handshake) ProtoReflect() protoreflect.Message
type Heartbeat ¶
type Heartbeat struct { Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` OsName string `protobuf:"bytes,3,opt,name=osName,proto3" json:"osName,omitempty"` Localtime int64 `protobuf:"varint,4,opt,name=localtime,proto3" json:"localtime,omitempty"` // contains filtered or unexported fields }
func NewHeartbeat ¶
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) GetHostname ¶
func (*Heartbeat) GetLocaltime ¶
func (*Heartbeat) GetUsername ¶
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
type Ret ¶
type Ret struct { ErrNo uint64 `protobuf:"varint,1,opt,name=errNo,proto3" json:"errNo,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Ret) Descriptor
deprecated
func (*Ret) ProtoMessage ¶
func (*Ret) ProtoMessage()
func (*Ret) ProtoReflect ¶
func (x *Ret) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.