Documentation ¶
Overview ¶
Package replicant provides a PT 2.1 Go API implementation of the Replicant adversary-tunable transport
Index ¶
- func InitializeGobRegistry()
- type ClientConfig
- type ClientJSONConfig
- type Connection
- func (sconn *Connection) Close() error
- func (sconn *Connection) LocalAddr() net.Addr
- func (sconn *Connection) Read(b []byte) (int, error)
- func (sconn *Connection) RemoteAddr() net.Addr
- func (sconn *Connection) SetDeadline(t time.Time) error
- func (sconn *Connection) SetReadDeadline(t time.Time) error
- func (sconn *Connection) SetWriteDeadline(t time.Time) error
- func (sconn *Connection) Write(b []byte) (int, error)
- type ConnectionState
- type Server
- type ServerConfig
- type ServerJSONInnerConfig
- type ServerJSONOuterConfig
- type TransportClient
- type TransportServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeGobRegistry ¶
func InitializeGobRegistry()
Types ¶
type ClientConfig ¶
type ClientConfig struct { Toneburst toneburst.Config Polish polish.ClientConfig Address string }
func DecodeClientConfig ¶
func DecodeClientConfig(encoded string) (*ClientConfig, error)
func (ClientConfig) Dial ¶
func (config ClientConfig) Dial(address string) (net.Conn, error)
Create outgoing transport connection
func (ClientConfig) Encode ¶
func (config ClientConfig) Encode() (string, error)
func (ClientConfig) Marshal ¶
func (config ClientConfig) Marshal() (string, error)
type ClientJSONConfig ¶ added in v3.0.9
type ClientJSONConfig struct {
Config string `json:"config"`
}
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewClientConnection ¶
func NewClientConnection(conn net.Conn, config ClientConfig) (*Connection, error)
func NewServerConnection ¶
func NewServerConnection(conn net.Conn, config ServerConfig) (*Connection, error)
func (*Connection) Close ¶
func (sconn *Connection) Close() error
func (*Connection) LocalAddr ¶
func (sconn *Connection) LocalAddr() net.Addr
func (*Connection) RemoteAddr ¶
func (sconn *Connection) RemoteAddr() net.Addr
func (*Connection) SetDeadline ¶
func (sconn *Connection) SetDeadline(t time.Time) error
func (*Connection) SetReadDeadline ¶
func (sconn *Connection) SetReadDeadline(t time.Time) error
func (*Connection) SetWriteDeadline ¶
func (sconn *Connection) SetWriteDeadline(t time.Time) error
type ConnectionState ¶
type ConnectionState struct {
// contains filtered or unexported fields
}
func NewReplicantClientConnectionState ¶
func NewReplicantClientConnectionState(config ClientConfig) (*ConnectionState, error)
func NewReplicantServerConnectionState ¶
func NewReplicantServerConnectionState(config ServerConfig, polishServer polish.Server, conn net.Conn) (*ConnectionState, error)
type ServerConfig ¶
type ServerConfig struct { Toneburst toneburst.Config Polish polish.ServerConfig }
func DecodeServerConfig ¶
func DecodeServerConfig(encoded string) (*ServerConfig, error)
func (ServerConfig) Encode ¶
func (config ServerConfig) Encode() (string, error)
func (ServerConfig) Listen ¶
func (config ServerConfig) Listen(address string) (net.Listener, error)
Create listener for incoming transport connection
func (ServerConfig) Marshal ¶
func (config ServerConfig) Marshal() (string, error)
type ServerJSONInnerConfig ¶ added in v3.0.9
type ServerJSONInnerConfig struct {
Config string `json:"config"`
}
type ServerJSONOuterConfig ¶ added in v3.0.9
type ServerJSONOuterConfig struct {
Replicant ServerJSONInnerConfig
}
type TransportClient ¶ added in v3.0.4
type TransportClient struct { Config ClientConfig Address string Dialer proxy.Dialer }
This makes Replicant compliant with Optimizer
func NewClient ¶ added in v3.0.4
func NewClient(config ClientConfig, dialer proxy.Dialer) TransportClient
type TransportServer ¶ added in v3.0.4
type TransportServer struct { Config ServerConfig Address string Dialer proxy.Dialer }
func NewServer ¶ added in v3.0.4
func NewServer(config ServerConfig, address string, dialer proxy.Dialer) TransportServer
Click to show internal directories.
Click to hide internal directories.