Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport interface {
// Name returns a string identifier for the Transport for logging
Name() string
// String returns a string identifier for the Transport for logging (including string formatters)
String() string
// 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.
ID() pb.TransportType
// GetParams returns a generic protobuf with any parameters from both the registration and the
// transport.
GetParams() (proto.Message, 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.
ParseParams(data *anypb.Any) (any, error)
// SetParams allows the caller to set parameters associated with the transport, returning an
// error if the provided generic message is not compatible. the variadic bool parameter is used
// to indicate whether the client should sanity check the params or just apply them. This is
// useful in cases where the registrar may provide options to the client that it is able to
// handle, but are outside of the clients sanity checks. (see prefix transport for an example)
SetParams(any, ...bool) error
// GetDstPort returns the destination port that the client should open the phantom connection with.
GetDstPort(seed []byte) (uint16, error)
// PrepareKeys provides an opportunity for the transport to integrate the station public key
// as well as bytes from the deterministic random generator associated with the registration
// that this ClientTransport is attached to.
PrepareKeys(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error
// Connect returns a net.Conn connection given a context and ConjureReg
WrapConn(conn net.Conn) (net.Conn, error)
}
Transport provides a generic interface for utilities that allow the client to dial and connect to a phantom address when creating a Conjure connection.
Click to show internal directories.
Click to hide internal directories.