portsession

package
v0.0.0-...-ee5af42 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package portsession starts port session.

Package portsession starts port session.

Package portsession starts port session.

Package portsession starts port session.

Package portsession starts port session.

Index

Constants

View Source
const (
	LocalPortForwardingType = "LocalPortForwarding"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicPortForwarding

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

BasicPortForwarding is type of port session accepts one client connection at a time

func (*BasicPortForwarding) InitializeStreams

func (p *BasicPortForwarding) InitializeStreams(log log.T, agentVersion string) (err error)

InitializeStreams establishes connection and initializes the stream

func (*BasicPortForwarding) IsStreamNotSet

func (p *BasicPortForwarding) IsStreamNotSet() (status bool)

IsStreamNotSet checks if stream is not set

func (*BasicPortForwarding) ReadStream

func (p *BasicPortForwarding) ReadStream(log log.T) (err error)

ReadStream reads data from the stream

func (*BasicPortForwarding) Stop

func (p *BasicPortForwarding) Stop()

Stop closes the stream

func (*BasicPortForwarding) WriteStream

func (p *BasicPortForwarding) WriteStream(outputMessage message.ClientMessage) error

WriteStream writes data to stream

type IPortSession

type IPortSession interface {
	IsStreamNotSet() (status bool)
	InitializeStreams(log log.T, agentVersion string) (err error)
	ReadStream(log log.T) (err error)
	WriteStream(outputMessage message.ClientMessage) (err error)
	Stop()
}

type MgsConn

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

MgsConn contains local server and corresponding connection to smux client

type MuxClient

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

MuxClient contains smux client session and corresponding network connection

type MuxPortForwarding

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

MuxPortForwarding is type of port session accepts multiple client connections through multiplexing

func (*MuxPortForwarding) InitializeStreams

func (p *MuxPortForwarding) InitializeStreams(log log.T, agentVersion string) (err error)

InitializeStreams initializes i/o streams

func (*MuxPortForwarding) IsStreamNotSet

func (p *MuxPortForwarding) IsStreamNotSet() (status bool)

IsStreamNotSet checks if stream is not set

func (*MuxPortForwarding) ReadStream

func (p *MuxPortForwarding) ReadStream(log log.T) (err error)

ReadStream reads data from different connections

func (*MuxPortForwarding) Stop

func (p *MuxPortForwarding) Stop()

Stop closes all open stream

func (*MuxPortForwarding) WriteStream

func (p *MuxPortForwarding) WriteStream(outputMessage message.ClientMessage) error

WriteStream writes data to stream

type PortParameters

type PortParameters struct {
	PortNumber          string `json:"portNumber"`
	LocalPortNumber     string `json:"localPortNumber"`
	LocalUnixSocket     string `json:"localUnixSocket"`
	LocalConnectionType string `json:"localConnectionType"`
	Type                string `json:"type"`
}

type PortSession

type PortSession struct {
	session.Session
	// contains filtered or unexported fields
}

func (*PortSession) Initialize

func (s *PortSession) Initialize(log log.T, sessionVar *session.Session)

func (PortSession) Name

func (PortSession) Name() string

Name is the session name used inputStream the plugin

func (*PortSession) ProcessStreamMessagePayload

func (s *PortSession) ProcessStreamMessagePayload(log log.T, outputMessage message.ClientMessage) (isHandlerReady bool, err error)

ProcessStreamMessagePayload writes messages received on datachannel to stdout

func (*PortSession) SetSessionHandlers

func (s *PortSession) SetSessionHandlers(log log.T) (err error)

StartSession redirects inputStream/outputStream data to datachannel.

func (*PortSession) Stop

func (s *PortSession) Stop()

type StandardStreamForwarding

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

func (*StandardStreamForwarding) InitializeStreams

func (p *StandardStreamForwarding) InitializeStreams(log log.T, agentVersion string) (err error)

InitializeStreams initializes the streams with its file descriptors

func (*StandardStreamForwarding) IsStreamNotSet

func (p *StandardStreamForwarding) IsStreamNotSet() (status bool)

IsStreamNotSet checks if streams are not set

func (*StandardStreamForwarding) ReadStream

func (p *StandardStreamForwarding) ReadStream(log log.T) (err error)

ReadStream reads data from the input stream

func (*StandardStreamForwarding) Stop

func (p *StandardStreamForwarding) Stop()

Stop closes the streams

func (*StandardStreamForwarding) WriteStream

func (p *StandardStreamForwarding) WriteStream(outputMessage message.ClientMessage) error

WriteStream writes data to output stream

Jump to

Keyboard shortcuts

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