Documentation
¶
Index ¶
- func Apply(ctx context.Context, opts WinOpts) error
- func CleanupQosPolicies()
- func Revert(ctx context.Context, opts WinOpts) error
- type BlackholeOpts
- type CorruptPackagesOpts
- type DelayOpts
- type Direction
- type Family
- type Filter
- type LimitBandwidthOpts
- type Mode
- type PackageLossOpts
- type QosPolicy
- type WinDivertMode
- type WinDivertOpts
- type WinOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupQosPolicies ¶
func CleanupQosPolicies()
CleanupQosPolicies removes leftover Steadybit QoS policies. It only looks for them when they may exist, as it holds the lock that network attacks wait for.
Types ¶
type BlackholeOpts ¶
func (*BlackholeOpts) QoSPolicies ¶ added in v0.5.0
func (o *BlackholeOpts) QoSPolicies() []QosPolicy
func (*BlackholeOpts) String ¶
func (o *BlackholeOpts) String() string
func (*BlackholeOpts) WinDivert ¶ added in v0.5.0
func (o *BlackholeOpts) WinDivert() *WinDivertOpts
type CorruptPackagesOpts ¶
func (*CorruptPackagesOpts) QoSPolicies ¶ added in v0.5.0
func (o *CorruptPackagesOpts) QoSPolicies() []QosPolicy
func (*CorruptPackagesOpts) String ¶
func (o *CorruptPackagesOpts) String() string
func (*CorruptPackagesOpts) WinDivert ¶ added in v0.5.0
func (o *CorruptPackagesOpts) WinDivert() *WinDivertOpts
type DelayOpts ¶
func (*DelayOpts) QoSPolicies ¶ added in v0.5.0
func (*DelayOpts) WinDivert ¶ added in v0.5.0
func (o *DelayOpts) WinDivert() *WinDivertOpts
type Filter ¶
type Filter struct {
Include []akn.NetWithPortRange
Exclude []akn.NetWithPortRange
InterfaceIndexes []int
Direction Direction
// ExcludeLoopback leaves loopback traffic (127.0.0.0/8, ::1) untouched.
// WinDivert captures loopback packets, so they are affected unless excluded.
ExcludeLoopback bool
}
type LimitBandwidthOpts ¶
type LimitBandwidthOpts struct {
// Bandwidth names the limit in the policy names, e.g. "1024KB" for 1024kbit.
Bandwidth string
BitsPerSecond uint64
IncludeCidrs []net.IPNet
PortRange network.PortRange
}
func (*LimitBandwidthOpts) QoSPolicies ¶ added in v0.5.0
func (o *LimitBandwidthOpts) QoSPolicies() []QosPolicy
func (*LimitBandwidthOpts) String ¶
func (o *LimitBandwidthOpts) String() string
func (*LimitBandwidthOpts) WinDivert ¶ added in v0.5.0
func (o *LimitBandwidthOpts) WinDivert() *WinDivertOpts
type PackageLossOpts ¶
func (*PackageLossOpts) QoSPolicies ¶ added in v0.5.0
func (o *PackageLossOpts) QoSPolicies() []QosPolicy
func (*PackageLossOpts) String ¶
func (o *PackageLossOpts) String() string
func (*PackageLossOpts) WinDivert ¶ added in v0.5.0
func (o *PackageLossOpts) WinDivert() *WinDivertOpts
type WinDivertMode ¶ added in v0.5.0
type WinDivertMode string
const ( WinDivertModeDelay WinDivertMode = "delay" WinDivertModeDrop WinDivertMode = "drop" WinDivertModeCorrupt WinDivertMode = "corrupt" )
type WinDivertOpts ¶ added in v0.5.0
type WinOpts ¶
type WinOpts interface {
// QoSPolicies returns the QoS policies for attacks implemented with Windows QoS, nil otherwise.
QoSPolicies() []QosPolicy
// WinDivert returns the wdna.exe run for attacks implemented with WinDivert, nil otherwise.
WinDivert() *WinDivertOpts
String() string
}
Click to show internal directories.
Click to hide internal directories.