Documentation ¶
Index ¶
Constants ¶
const ( MAX_FRAGMENTOR_NOTICES = 3 MAX_FRAGMENTOR_ITERATIONS_PER_NOTICE = 5 )
Variables ¶
This section is empty.
Functions ¶
func GetUpstreamMetricsNames ¶
func GetUpstreamMetricsNames() []string
GetUpstreamMetricsNames returns the upstream metrics parameter names.
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.ParametersAccessor, 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.ParametersAccessor, 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, SetReplay must be called before the first Write.
func (*Conn) CloseWrite ¶
func (*Conn) GetMetrics ¶
GetMetrics implements the common.MetricsSource interface.
func (*Conn) GetReplay ¶
GetReplay returns the seed for the fragmentor PRNG, and whether the fragmentor was configured to replay. The seed return value may be nil when isReplay is false.
GetReplay implements GetReplay.
func (*Conn) SetReplay ¶
SetReplay sets the PRNG to be used by the fragmentor, allowing for replay of a fragmentor sequence. SetReplay may be used to set the PRNG after a conn has already been wrapped with a fragmentor.Conn, when no PRNG is specified in the config, and before the first Write. SetReplay sets the fragmentor isReplay flag to true.
For replay coordinated with a peer, SetReplay may be used with obfuscator.GetDerivedPRNG, using a seed provided by the peer.
If no seed is specified in NewUp/DownstreamConfig and SetReplay is not called before the first Write, the Write will fail. If a seed was specified in the config, or SetReplay was already called, or the input PRNG is nil, SetReplay has no effect.
SetReplay implements FragmentorReplayAccessor.