Documentation
¶
Overview ¶
Package replicant provides a PT 2.1 Go API implementation of the Replicant adversary-tunable transport
Index ¶
- func NewClientConnection(conn net.Conn, config ClientConfig) (net.Conn, error)
- func NewServerConnection(conn net.Conn, config ServerConfig) (net.Conn, error)
- func ResolveAddr(addrStr string) (*net.TCPAddr, error)
- type ClientConfig
- type ClientJsonConfig
- type ConnectionState
- type DarkStarPolishClientJsonConfig
- type DarkStarPolishServerJsonConfig
- type ServerConfig
- type ServerJsonConfig
- type TransportClient
- type TransportServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientConnection ¶
func NewServerConnection ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct {
ServerAddress string `json:"serverAddress"`
Toneburst toneburst.Config `json:"toneburst"`
Polish polish.ClientConfig `json:"polish"`
Transport string `json:"transport"`
}
func UnmarshalClientConfig ¶ added in v3.0.11
func UnmarshalClientConfig(data []byte) (*ClientConfig, error)
func (ClientConfig) Dial ¶
func (config ClientConfig) Dial() (net.Conn, error)
Create outgoing transport connection
func (ClientConfig) Marshal ¶
func (config ClientConfig) Marshal() (string, error)
func (ClientConfig) ToJsonString ¶ added in v3.0.9
func (config ClientConfig) ToJsonString() (string, error)
type ClientJsonConfig ¶ added in v3.0.11
type ClientJsonConfig struct {
ServerAddress string `json:"serverAddress"`
Toneburst toneburst.StarburstConfig `json:"toneburst"`
Polish DarkStarPolishClientJsonConfig `json:"polish"`
Transport string `json:"transport"`
}
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 DarkStarPolishClientJsonConfig ¶ added in v3.0.11
type DarkStarPolishServerJsonConfig ¶ added in v3.0.11
type ServerConfig ¶
type ServerConfig struct {
ServerAddress string `json:"serverAddress"`
Toneburst toneburst.Config `json:"toneburst"`
Polish polish.ServerConfig `json:"polish"`
Transport string `json:"transport"`
BindAddress *string `json:"bindAddress"`
}
func UnmarshalServerConfig ¶ added in v3.0.11
func UnmarshalServerConfig(data []byte) (*ServerConfig, error)
func (ServerConfig) Listen ¶
func (config ServerConfig) Listen() (net.Listener, error)
Create listener for incoming transport connection
func (ServerConfig) Marshal ¶
func (config ServerConfig) Marshal() (string, error)
func (ServerConfig) ToJsonString ¶ added in v3.0.9
func (config ServerConfig) ToJsonString() (string, error)
type ServerJsonConfig ¶ added in v3.0.11
type ServerJsonConfig struct {
ServerAddress string `json:"serverAddress"`
Toneburst toneburst.StarburstConfig `json:"toneburst"`
Polish DarkStarPolishServerJsonConfig `json:"polish"`
Transport string `json:"transport"`
BindAddress *string `json:"bindAddress"`
}
type TransportClient ¶
type TransportClient struct {
Config ClientConfig
Address string
// TODO: Dialer can be removed later (both here and in dispatcher)
Dialer proxy.Dialer
}
This makes Replicant compliant with Optimizer
func NewClient ¶
func NewClient(config ClientConfig, dialer proxy.Dialer) TransportClient
type TransportServer ¶
type TransportServer struct {
Config ServerConfig
Address string
// TODO: Dialer can be removed later (both here and in dispatcher)
Dialer proxy.Dialer
}
func NewServer ¶
func NewServer(config ServerConfig, dialer proxy.Dialer) TransportServer
Click to show internal directories.
Click to hide internal directories.