fragmentor

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_FRAGMENTOR_NOTICES               = 3
	MAX_FRAGMENTOR_ITERATIONS_PER_NOTICE = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config specifies a fragmentor configuration. NewUpstreamConfig and NewDownstreamConfig will generate configurations based on the given client parameters.

func NewDownstreamConfig

func NewDownstreamConfig(
	p *parameters.ClientParametersSnapshot, tunnelProtocol string) *Config

NewDownstreamConfig creates a new Config; may return nil.

func NewUpstreamConfig

func NewUpstreamConfig(
	p *parameters.ClientParametersSnapshot, tunnelProtocol string) *Config

NewUpstreamConfig creates a new Config; may return nil.

func (*Config) IsFragmenting

func (config *Config) IsFragmenting() bool

IsFragmenting indicates whether the fragmentor configuration results in any fragmentation; config may be nil.

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

Conn implements simple fragmentation of application-level messages/packets into multiple TCP packets by splitting writes into smaller sizes and adding delays between writes.

The intent of Conn is both to frustrate firewalls that perform DPI on application-level messages that cross TCP packets as well as to perform a simple size and timing transformation to the traffic shape of the initial portion of a TCP flow.

func NewConn

func NewConn(
	config *Config,
	noticeEmitter func(string),
	conn net.Conn) *Conn

NewConn creates a new Conn.

func (*Conn) Close

func (c *Conn) Close() (err error)

func (*Conn) GetMetrics

func (c *Conn) GetMetrics() common.LogFields

GetMetrics implements the common.MetricsSource interface.

func (*Conn) IsClosed

func (c *Conn) IsClosed() bool

func (*Conn) Write

func (c *Conn) Write(buffer []byte) (int, error)

Jump to

Keyboard shortcuts

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