client

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientTransport

type ClientTransport struct {
	Parameters *pb.GenericTransportParams
	// contains filtered or unexported fields
}

ClientTransport implements the client side transport interface for the Min transport. The significant difference is that there is an instance of this structure per client session, where the station side Transport struct has one instance to be re-used for all sessions.

func (*ClientTransport) GetDstPort

func (t *ClientTransport) GetDstPort(seed []byte) (uint16, error)

GetDstPort returns the destination port that the client should open the phantom connection to

func (*ClientTransport) GetParams

func (t *ClientTransport) GetParams() (proto.Message, error)

GetParams returns a generic protobuf with any parameters from both the registration and the transport.

func (*ClientTransport) ID

ID provides an identifier that will be sent to the conjure station during the registration so that the station knows what transport to expect connecting to the chosen phantom.

func (*ClientTransport) Name

func (*ClientTransport) Name() string

Name returns a string identifier for the Transport for logging

func (ClientTransport) ParseParams

func (t ClientTransport) ParseParams(data *anypb.Any) (any, error)

ParseParams gives the specific transport an option to parse a generic object into parameters provided by the station in the registration response during registration.

func (*ClientTransport) Prepare

func (*ClientTransport) Prepare(dialer func(ctx context.Context, network, laddr, raddr string) (net.Conn, error)) error

func (*ClientTransport) PrepareKeys

func (t *ClientTransport) PrepareKeys(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error

func (*ClientTransport) SetParams

func (t *ClientTransport) SetParams(p any, unchecked ...bool) error

SetParams allows the caller to set parameters associated with the transport, returning an error if the provided generic message is not compatible.

func (*ClientTransport) String

func (*ClientTransport) String() string

String returns a string identifier for the Transport for logging (including string formatters)

func (ClientTransport) WrapConn

func (t ClientTransport) WrapConn(conn net.Conn) (net.Conn, error)

WrapConn creates the connection to the phantom address negotiated in the registration phase of Conjure connection establishment.

Jump to

Keyboard shortcuts

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