Documentation ¶
Index ¶
- type ClientTransport
- func (*ClientTransport) DisableRegDelay() bool
- func (t *ClientTransport) GetDstPort(seed []byte) (uint16, error)
- func (t *ClientTransport) GetParams() (proto.Message, error)
- func (*ClientTransport) ID() pb.TransportType
- func (*ClientTransport) Name() string
- func (ClientTransport) ParseParams(*anypb.Any) (any, error)
- func (t *ClientTransport) Prepare(...) error
- func (t *ClientTransport) PrepareKeys(pubkey [32]byte, sharedSecret []byte, dRand io.Reader) error
- func (t *ClientTransport) SetParams(p any, unchecked ...bool) error
- func (*ClientTransport) String() string
- func (t *ClientTransport) WrapDial(dialer dialFunc) (dialFunc, error)
- type Transport
- func (t *Transport) Connect(ctx context.Context, reg transports.Registration) (net.Conn, error)
- func (Transport) GetDstPort(libVersion uint, seed []byte, params any) (uint16, error)
- func (Transport) GetIdentifier(reg transports.Registration) string
- func (Transport) GetProto() pb.IPProto
- func (Transport) GetSrcPort(libVersion uint, seed []byte, params any) (uint16, error)
- func (Transport) LogPrefix() string
- func (Transport) Name() string
- func (t Transport) ParamStrings(p any) []string
- func (Transport) ParseParams(libVersion uint, data *anypb.Any) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientTransport ¶
type ClientTransport struct { // Parameters are fields that will be shared with the station in the registration Parameters *pb.DTLSTransportParams // contains filtered or unexported fields }
ClientTransport implements the client side transport interface for the DTLS 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) DisableRegDelay ¶
func (*ClientTransport) DisableRegDelay() bool
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 ¶
func (*ClientTransport) ID() pb.TransportType
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 (ClientTransport) ParseParams(*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 (t *ClientTransport) Prepare(dialer func(ctx context.Context, network, laddr, raddr string) (net.Conn, error)) 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.
func (*ClientTransport) PrepareKeys ¶
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 t
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.
DTLS transport currently has no caller controlled params
func (*ClientTransport) String ¶
func (*ClientTransport) String() string
String returns a string identifier for the Transport for logging (including string formatters)
func (*ClientTransport) WrapDial ¶
func (t *ClientTransport) WrapDial(dialer dialFunc) (dialFunc, error)
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
func NewTransport ¶
func NewTransport(logAuthFail func(*net.IP), logOtherFail func(*net.IP), logDialSuccess func(*net.IP), logListenSuccess func(*net.IP)) (*Transport, error)
NewTransport creates a new dtls transport
func (*Transport) Connect ¶
func (t *Transport) Connect(ctx context.Context, reg transports.Registration) (net.Conn, error)
Connect takes a registraion and returns a dtls Conn connected to the client
func (Transport) GetDstPort ¶
func (Transport) GetIdentifier ¶
func (Transport) GetIdentifier(reg transports.Registration) string
GetIdentifier returns an identifier unique a registration
func (Transport) GetSrcPort ¶
func (Transport) ParamStrings ¶
ParamStrings returns an array of tag string that will be added to tunStats when a proxy session is closed. For now, no params of interest.