Documentation
¶
Index ¶
- Variables
- type EncryptedSessionMessage
- func (*EncryptedSessionMessage) Descriptor() ([]byte, []int)deprecated
- func (x *EncryptedSessionMessage) GetCiphertext() []byte
- func (x *EncryptedSessionMessage) GetNonce() []byte
- func (*EncryptedSessionMessage) ProtoMessage()
- func (x *EncryptedSessionMessage) ProtoReflect() protoreflect.Message
- func (x *EncryptedSessionMessage) Reset()
- func (x *EncryptedSessionMessage) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetEncryptedSessionMessage() *EncryptedSessionMessage
- func (x *Message) GetPublicMessage() *PublicMessage
- func (m *Message) GetWrapper() isMessage_Wrapper
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type Message_EncryptedSessionMessage
- type Message_PublicMessage
- type PublicMessage
- func (*PublicMessage) Descriptor() ([]byte, []int)deprecated
- func (x *PublicMessage) GetSender() string
- func (x *PublicMessage) GetSessionCreated() bool
- func (x *PublicMessage) GetSessionError() string
- func (x *PublicMessage) GetSessionHostname() string
- func (x *PublicMessage) GetSessionKeyPart() []byte
- func (x *PublicMessage) GetType() PublicMessage_MessageType
- func (*PublicMessage) ProtoMessage()
- func (x *PublicMessage) ProtoReflect() protoreflect.Message
- func (x *PublicMessage) Reset()
- func (x *PublicMessage) String() string
- type PublicMessage_MessageType
- func (PublicMessage_MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x PublicMessage_MessageType) Enum() *PublicMessage_MessageType
- func (PublicMessage_MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x PublicMessage_MessageType) Number() protoreflect.EnumNumber
- func (x PublicMessage_MessageType) String() string
- func (PublicMessage_MessageType) Type() protoreflect.EnumType
- type SessionMessage
- func (*SessionMessage) Descriptor() ([]byte, []int)deprecated
- func (x *SessionMessage) GetBootstrapFilename() string
- func (x *SessionMessage) GetBootstrapMode() SessionMode
- func (x *SessionMessage) GetBootstrapMotd() string
- func (x *SessionMessage) GetBootstrapUsername() string
- func (x *SessionMessage) GetExitError() string
- func (x *SessionMessage) GetExitNormal() bool
- func (x *SessionMessage) GetFilePayload() []byte
- func (x *SessionMessage) GetPtyDimensions() uint64
- func (x *SessionMessage) GetPtyPayload() []byte
- func (x *SessionMessage) GetSender() string
- func (x *SessionMessage) GetType() SessionMessage_MessageType
- func (*SessionMessage) ProtoMessage()
- func (x *SessionMessage) ProtoReflect() protoreflect.Message
- func (x *SessionMessage) Reset()
- func (x *SessionMessage) String() string
- type SessionMessage_MessageType
- func (SessionMessage_MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x SessionMessage_MessageType) Enum() *SessionMessage_MessageType
- func (SessionMessage_MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SessionMessage_MessageType) Number() protoreflect.EnumNumber
- func (x SessionMessage_MessageType) String() string
- func (SessionMessage_MessageType) Type() protoreflect.EnumType
- type SessionMode
- func (SessionMode) Descriptor() protoreflect.EnumDescriptor
- func (x SessionMode) Enum() *SessionMode
- func (SessionMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x SessionMode) Number() protoreflect.EnumNumber
- func (x SessionMode) String() string
- func (SessionMode) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( SessionMode_name = map[int32]string{ 0: "MODE_WAITING", 1: "MODE_PTY", 2: "MODE_FILE_UPLOAD", 3: "MODE_FILE_DOWNLOAD", } SessionMode_value = map[string]int32{ "MODE_WAITING": 0, "MODE_PTY": 1, "MODE_FILE_UPLOAD": 2, "MODE_FILE_DOWNLOAD": 3, } )
Enum value maps for SessionMode.
var ( PublicMessage_MessageType_name = map[int32]string{ 0: "READY", 1: "PING_REQUEST", 2: "PING_RESPONSE", 3: "SESSION_REQUEST", 4: "SESSION_RESPONSE", } PublicMessage_MessageType_value = map[string]int32{ "READY": 0, "PING_REQUEST": 1, "PING_RESPONSE": 2, "SESSION_REQUEST": 3, "SESSION_RESPONSE": 4, } )
Enum value maps for PublicMessage_MessageType.
var ( SessionMessage_MessageType_name = map[int32]string{ 0: "EXIT", 1: "BOOTSTRAP_REQUEST", 2: "BOOTSTRAP_RESPONSE", 3: "HEARTBEAT_REQUEST", 4: "HEARTBEAT_RESPONSE", 5: "PTY_INPUT", 6: "PTY_WINCH", 7: "PTY_OUTPUT", 8: "FILE_CHUNK", 9: "FILE_CLOSE", } SessionMessage_MessageType_value = map[string]int32{ "EXIT": 0, "BOOTSTRAP_REQUEST": 1, "BOOTSTRAP_RESPONSE": 2, "HEARTBEAT_REQUEST": 3, "HEARTBEAT_RESPONSE": 4, "PTY_INPUT": 5, "PTY_WINCH": 6, "PTY_OUTPUT": 7, "FILE_CHUNK": 8, "FILE_CLOSE": 9, } )
Enum value maps for SessionMessage_MessageType.
var File_internal_proto_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type EncryptedSessionMessage ¶
type EncryptedSessionMessage struct { Ciphertext []byte `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
An encrypted session message contains a session message in ciphertext format.
func (*EncryptedSessionMessage) Descriptor
deprecated
func (*EncryptedSessionMessage) Descriptor() ([]byte, []int)
Deprecated: Use EncryptedSessionMessage.ProtoReflect.Descriptor instead.
func (*EncryptedSessionMessage) GetCiphertext ¶
func (x *EncryptedSessionMessage) GetCiphertext() []byte
func (*EncryptedSessionMessage) GetNonce ¶
func (x *EncryptedSessionMessage) GetNonce() []byte
func (*EncryptedSessionMessage) ProtoMessage ¶
func (*EncryptedSessionMessage) ProtoMessage()
func (*EncryptedSessionMessage) ProtoReflect ¶
func (x *EncryptedSessionMessage) ProtoReflect() protoreflect.Message
func (*EncryptedSessionMessage) Reset ¶
func (x *EncryptedSessionMessage) Reset()
func (*EncryptedSessionMessage) String ¶
func (x *EncryptedSessionMessage) String() string
type Message ¶
type Message struct { // Types that are assignable to Wrapper: // *Message_PublicMessage // *Message_EncryptedSessionMessage Wrapper isMessage_Wrapper `protobuf_oneof:"wrapper"` // contains filtered or unexported fields }
Any message in transit must be in one of the following formats.
func (*Message) Descriptor
deprecated
func (*Message) GetEncryptedSessionMessage ¶
func (x *Message) GetEncryptedSessionMessage() *EncryptedSessionMessage
func (*Message) GetPublicMessage ¶
func (x *Message) GetPublicMessage() *PublicMessage
func (*Message) GetWrapper ¶
func (m *Message) GetWrapper() isMessage_Wrapper
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type Message_EncryptedSessionMessage ¶
type Message_EncryptedSessionMessage struct {
EncryptedSessionMessage *EncryptedSessionMessage `protobuf:"bytes,2,opt,name=encrypted_session_message,json=encryptedSessionMessage,proto3,oneof"`
}
type Message_PublicMessage ¶
type Message_PublicMessage struct {
PublicMessage *PublicMessage `protobuf:"bytes,1,opt,name=public_message,json=publicMessage,proto3,oneof"`
}
type PublicMessage ¶
type PublicMessage struct { // All messages Type PublicMessage_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=drsh.proto.PublicMessage_MessageType" json:"type,omitempty"` Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // Session messages SessionKeyPart []byte `protobuf:"bytes,3,opt,name=session_key_part,json=sessionKeyPart,proto3" json:"session_key_part,omitempty"` // Sent by both C&S to establish a shared key SessionCreated bool `protobuf:"varint,4,opt,name=session_created,json=sessionCreated,proto3" json:"session_created,omitempty"` // Server indicates whether or not a session was created SessionError string `protobuf:"bytes,5,opt,name=session_error,json=sessionError,proto3" json:"session_error,omitempty"` // Server can optionally provide a error explaining why session cannot be created SessionHostname string `protobuf:"bytes,6,opt,name=session_hostname,json=sessionHostname,proto3" json:"session_hostname,omitempty"` // Server provides a valid session hostname if one was created // contains filtered or unexported fields }
Public messages are sent without encryption between any server and client. They are ephmereal messages that require minimal or no state to be kept on the server. Sensitive information should not be transferred here.
func (*PublicMessage) Descriptor
deprecated
func (*PublicMessage) Descriptor() ([]byte, []int)
Deprecated: Use PublicMessage.ProtoReflect.Descriptor instead.
func (*PublicMessage) GetSender ¶
func (x *PublicMessage) GetSender() string
func (*PublicMessage) GetSessionCreated ¶
func (x *PublicMessage) GetSessionCreated() bool
func (*PublicMessage) GetSessionError ¶
func (x *PublicMessage) GetSessionError() string
func (*PublicMessage) GetSessionHostname ¶
func (x *PublicMessage) GetSessionHostname() string
func (*PublicMessage) GetSessionKeyPart ¶
func (x *PublicMessage) GetSessionKeyPart() []byte
func (*PublicMessage) GetType ¶
func (x *PublicMessage) GetType() PublicMessage_MessageType
func (*PublicMessage) ProtoMessage ¶
func (*PublicMessage) ProtoMessage()
func (*PublicMessage) ProtoReflect ¶
func (x *PublicMessage) ProtoReflect() protoreflect.Message
func (*PublicMessage) Reset ¶
func (x *PublicMessage) Reset()
func (*PublicMessage) String ¶
func (x *PublicMessage) String() string
type PublicMessage_MessageType ¶
type PublicMessage_MessageType int32
const ( PublicMessage_READY PublicMessage_MessageType = 0 // C->C, S->S, used to test that Redis is delivering messages PublicMessage_PING_REQUEST PublicMessage_MessageType = 1 // C->S, client wants to check if the server is active PublicMessage_PING_RESPONSE PublicMessage_MessageType = 2 // S->C, server responds to the client that it is active PublicMessage_SESSION_REQUEST PublicMessage_MessageType = 3 // C->S, client wants to establish an encrypted session with the server PublicMessage_SESSION_RESPONSE PublicMessage_MessageType = 4 // S->C, server responds if it is able to set up a session )
func (PublicMessage_MessageType) Descriptor ¶
func (PublicMessage_MessageType) Descriptor() protoreflect.EnumDescriptor
func (PublicMessage_MessageType) Enum ¶
func (x PublicMessage_MessageType) Enum() *PublicMessage_MessageType
func (PublicMessage_MessageType) EnumDescriptor
deprecated
func (PublicMessage_MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PublicMessage_MessageType.Descriptor instead.
func (PublicMessage_MessageType) Number ¶
func (x PublicMessage_MessageType) Number() protoreflect.EnumNumber
func (PublicMessage_MessageType) String ¶
func (x PublicMessage_MessageType) String() string
func (PublicMessage_MessageType) Type ¶
func (PublicMessage_MessageType) Type() protoreflect.EnumType
type SessionMessage ¶
type SessionMessage struct { // All messages Type SessionMessage_MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=drsh.proto.SessionMessage_MessageType" json:"type,omitempty"` Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // Exit messages ExitNormal bool `protobuf:"varint,3,opt,name=exit_normal,json=exitNormal,proto3" json:"exit_normal,omitempty"` // Sending party specifies if they are exiting normally ExitError string `protobuf:"bytes,4,opt,name=exit_error,json=exitError,proto3" json:"exit_error,omitempty"` // Sending party specifies that they are exiting because of an error // Bootstrap messages BootstrapMode SessionMode `` // Client requests that the session be of this mode /* 129-byte string literal not displayed */ BootstrapUsername string `protobuf:"bytes,6,opt,name=bootstrap_username,json=bootstrapUsername,proto3" json:"bootstrap_username,omitempty"` // Client requests that the session be tied to this user account BootstrapFilename string `protobuf:"bytes,7,opt,name=bootstrap_filename,json=bootstrapFilename,proto3" json:"bootstrap_filename,omitempty"` // Client requests that the session prepare this remote file for transfer BootstrapMotd string `protobuf:"bytes,8,opt,name=bootstrap_motd,json=bootstrapMotd,proto3" json:"bootstrap_motd,omitempty"` // Server provides a MOTD to be displayed to the client // PTY messages PtyPayload []byte `protobuf:"bytes,9,opt,name=pty_payload,json=ptyPayload,proto3" json:"pty_payload,omitempty"` // Used by PTY_INPUT, PTY_OUTPUT messages PtyDimensions uint64 `protobuf:"varint,10,opt,name=pty_dimensions,json=ptyDimensions,proto3" json:"pty_dimensions,omitempty"` // Used by PTY_WINCH message // File messages FilePayload []byte `protobuf:"bytes,11,opt,name=file_payload,json=filePayload,proto3" json:"file_payload,omitempty"` // Used by FILE_CHUNK message // contains filtered or unexported fields }
Session messages are sent with encryption guarantees between a server and client. All session messages are assumed to be in a ciphertext format in transit. Thus, they can implement core logic associated with sensitive actions, such as transferring files, sending commands to a server as a user, etc.
func (*SessionMessage) Descriptor
deprecated
func (*SessionMessage) Descriptor() ([]byte, []int)
Deprecated: Use SessionMessage.ProtoReflect.Descriptor instead.
func (*SessionMessage) GetBootstrapFilename ¶
func (x *SessionMessage) GetBootstrapFilename() string
func (*SessionMessage) GetBootstrapMode ¶
func (x *SessionMessage) GetBootstrapMode() SessionMode
func (*SessionMessage) GetBootstrapMotd ¶
func (x *SessionMessage) GetBootstrapMotd() string
func (*SessionMessage) GetBootstrapUsername ¶
func (x *SessionMessage) GetBootstrapUsername() string
func (*SessionMessage) GetExitError ¶
func (x *SessionMessage) GetExitError() string
func (*SessionMessage) GetExitNormal ¶
func (x *SessionMessage) GetExitNormal() bool
func (*SessionMessage) GetFilePayload ¶
func (x *SessionMessage) GetFilePayload() []byte
func (*SessionMessage) GetPtyDimensions ¶
func (x *SessionMessage) GetPtyDimensions() uint64
func (*SessionMessage) GetPtyPayload ¶
func (x *SessionMessage) GetPtyPayload() []byte
func (*SessionMessage) GetSender ¶
func (x *SessionMessage) GetSender() string
func (*SessionMessage) GetType ¶
func (x *SessionMessage) GetType() SessionMessage_MessageType
func (*SessionMessage) ProtoMessage ¶
func (*SessionMessage) ProtoMessage()
func (*SessionMessage) ProtoReflect ¶
func (x *SessionMessage) ProtoReflect() protoreflect.Message
func (*SessionMessage) Reset ¶
func (x *SessionMessage) Reset()
func (*SessionMessage) String ¶
func (x *SessionMessage) String() string
type SessionMessage_MessageType ¶
type SessionMessage_MessageType int32
const ( SessionMessage_EXIT SessionMessage_MessageType = 0 // C->S, S->C, sent by either party to indicate session is closed SessionMessage_BOOTSTRAP_REQUEST SessionMessage_MessageType = 1 // C->S, client starts by requesting that the session follow some parameters SessionMessage_BOOTSTRAP_RESPONSE SessionMessage_MessageType = 2 // S->C, server acknowledges that it will respect the client's wishes SessionMessage_HEARTBEAT_REQUEST SessionMessage_MessageType = 3 // C->S, empty message to signal that client is still active SessionMessage_HEARTBEAT_RESPONSE SessionMessage_MessageType = 4 // S->C, empty message to signal that server is still active SessionMessage_PTY_INPUT SessionMessage_MessageType = 5 // C->S, client is sending commands to the server's PTY SessionMessage_PTY_WINCH SessionMessage_MessageType = 6 // C->S, client wants to adjust the size of the server's PTY SessionMessage_PTY_OUTPUT SessionMessage_MessageType = 7 // S->C, server is sending output from its PTY SessionMessage_FILE_CHUNK SessionMessage_MessageType = 8 // S->C, C->S, the party sending a file uses this message to transfer data SessionMessage_FILE_CLOSE SessionMessage_MessageType = 9 // S->C, C->S, the party sending a file indicates that they are done )
func (SessionMessage_MessageType) Descriptor ¶
func (SessionMessage_MessageType) Descriptor() protoreflect.EnumDescriptor
func (SessionMessage_MessageType) Enum ¶
func (x SessionMessage_MessageType) Enum() *SessionMessage_MessageType
func (SessionMessage_MessageType) EnumDescriptor
deprecated
func (SessionMessage_MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SessionMessage_MessageType.Descriptor instead.
func (SessionMessage_MessageType) Number ¶
func (x SessionMessage_MessageType) Number() protoreflect.EnumNumber
func (SessionMessage_MessageType) String ¶
func (x SessionMessage_MessageType) String() string
func (SessionMessage_MessageType) Type ¶
func (SessionMessage_MessageType) Type() protoreflect.EnumType
type SessionMode ¶
type SessionMode int32
const ( SessionMode_MODE_WAITING SessionMode = 0 SessionMode_MODE_PTY SessionMode = 1 SessionMode_MODE_FILE_UPLOAD SessionMode = 2 SessionMode_MODE_FILE_DOWNLOAD SessionMode = 3 )
func (SessionMode) Descriptor ¶
func (SessionMode) Descriptor() protoreflect.EnumDescriptor
func (SessionMode) Enum ¶
func (x SessionMode) Enum() *SessionMode
func (SessionMode) EnumDescriptor
deprecated
func (SessionMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use SessionMode.Descriptor instead.
func (SessionMode) Number ¶
func (x SessionMode) Number() protoreflect.EnumNumber
func (SessionMode) String ¶
func (x SessionMode) String() string
func (SessionMode) Type ¶
func (SessionMode) Type() protoreflect.EnumType