replicant

package module
v0.0.0-...-cac72fb Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: BSD-2-Clause, BSD-3-Clause Imports: 12 Imported by: 9

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
}

func DecodeClientConfig

func DecodeClientConfig(encoded string) (*ClientConfig, error)

func (ClientConfig) Dial

func (config ClientConfig) Dial(address string) net.Conn

Create outgoing transport connection

func (ClientConfig) Encode

func (config ClientConfig) Encode() (string, error)

func (ClientConfig) Marshal

func (config ClientConfig) Marshal() (string, error)

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

Create listener for incoming transport connection

func (ServerConfig) Marshal

func (config ServerConfig) Marshal() (string, error)

type Transport

type Transport struct {
	Config  ClientConfig
	Address string
	Dialer  proxy.Dialer
}

FIXME This makes Replicant compliant with Optimizer

func (Transport) Dial

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

TODO: the dial we call currently does not return an error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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