Documentation ¶
Index ¶
Constants ¶
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.ClientParametersAccessor, tunnelProtocol string, seed *prng.Seed) *Config
NewDownstreamConfig creates a new Config; may return nil. Specifying the PRNG seed allows for optional replay of a fragmentor sequence.
func NewUpstreamConfig ¶
func NewUpstreamConfig( p parameters.ClientParametersAccessor, tunnelProtocol string, seed *prng.Seed) *Config
NewUpstreamConfig creates a new Config; may return nil. Specifying the PRNG seed allows for optional replay of a fragmentor sequence.
func (*Config) MayFragment ¶ added in v1.0.10
MayFragment indicates whether the fragmentor configuration may result in any fragmentation; config can be nil. When MayFragment is false, the caller should skip wrapping the associated conn with a fragmentor.Conn.
type Conn ¶
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 ¶
NewConn creates a new Conn. When no seed was provided in the Config, SetPRNG must be called before the first Write.
func (*Conn) CloseWrite ¶
func (*Conn) GetMetrics ¶
GetMetrics implements the common.MetricsSource interface.
func (*Conn) SetPRNG ¶ added in v1.0.10
SetPRNG sets the PRNG to be used by the fragmentor. Specifying a PRNG allows for optional replay of a fragmentor sequence. SetPRNG is intended to be used with obfuscator.GetDerivedPRNG and allows for setting the PRNG after a conn has already been wrapped with a fragmentor.Conn (but before the first Write).
If no seed is specified in NewUp/DownstreamConfig and SetPRNG is not called before the first Write, the Write will fail. If a seed was specified, or SetPRNG was already called, SetPRNG has no effect.