replicant

package module
v3.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2020 License: MIT Imports: 12 Imported by: 1

README

Overview of Replicant for Go

(This is still in an unstable state! It is not suitable for production deployment.)

Replicant is still in progress. more information will appear as development furthers.

Documentation

Overview

Package replicant provides a PT 2.1 Go API implementation of the Replicant adversary-tunable transport

Index

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) Read

func (sconn *Connection) Read(b []byte) (int, error)

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

func (*Connection) Write

func (sconn *Connection) Write(b []byte) (int, 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 Server

type Server struct {
	// contains filtered or unexported fields
}

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

func (TransportClient) Dial added in v3.0.4

func (transport TransportClient) Dial() (net.Conn, error)

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

func (TransportServer) Listen added in v3.0.4

func (transport TransportServer) Listen() (net.Listener, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL