Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPresets ¶
DefaultPresets returns the built-in presets
Types ¶
type Preset ¶
type Preset struct {
Name string `yaml:"name"`
Type PresetType `yaml:"type"`
PacketSize RangeInt `yaml:"packet_size"` // Packet size in bytes
PacketsPerSecond RangeInt `yaml:"packets_per_sec"` // PPS rate
UploadDownloadRatio float64 `yaml:"upload_download_ratio"` // e.g. 0.5 for 1:2
SessionDuration RangeDuration `yaml:"session_duration"` // Time before switching
Patterns []TrafficPattern `yaml:"patterns,omitempty"` // Specific traffic patterns
}
Preset defines a complete behavior profile for mimicking a service
func DetectPreset ¶
DetectPreset attempts to guess the best preset based on the domain name
type PresetType ¶
type PresetType string
PresetType defines the category of the preset
const ( TypeSocial PresetType = "social" TypeVideo PresetType = "video" TypeMessenger PresetType = "messenger" TypeWeb PresetType = "web" )
type RangeDuration ¶
RangeDuration represents a min-max duration range
type TrafficPattern ¶
type TrafficPattern struct {
Type string `yaml:"type"` // e.g., "burst", "constant", "idle"
Duration RangeDuration `yaml:"duration"` // How long this pattern lasts
Interval RangeDuration `yaml:"interval"` // Time between repetitions
}
TrafficPattern defines a specific behavior within a preset (e.g., "burst")
Click to show internal directories.
Click to hide internal directories.