Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectingTransport ¶ added in v0.6.0
type DNAT ¶ added in v0.6.7
type DNAT interface {
AddEntry(clientAddr *net.IP, clientPort uint16, phantomIP *net.IP, phantomPort uint16) error
}
DNAT used by the station side DTLS transport implementation to warm up the DNAT table such that we are able to handle incoming client connections.
type DnatBuilder ¶ added in v0.6.7
DnatBuilder function type alias for building a DNAT object
type Overrides ¶
type Overrides []RegOverride
Overrides makes it possible to treat an array of overrides as a single override note that the subsequent overrides are not aware of those that come before so they may end up undoing their changes.
type RegOverride ¶
type RegOverride interface {
Override(*pb.C2SWrapper, io.Reader) error
}
RegOverride provides a generic way for the station to mutate an incoming registration before handing it off to the stations or returning it to the client as part of the RegResponse protobuf.
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 // Prepare lets the transport use the dialer to prepare. This is called before GetParams to let the // transport prepare stuff such as nat traversal. Prepare(dialer func(ctx context.Context, network, laddr, raddr string) (net.Conn, error)) 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 }
Transport provides a generic interface for utilities that allow the client to dial and connect to a phantom address when creating a Conjure connection.