ThrottleConfig: {
    capture?: string;
    device?: string;
    down?: ThrottleRule | ThrottleRule[];
    filter?: string;
    match?: string;
    protocol?: "udp" | "tcp";
    sessions?: string;
    skipDestinationPorts?: string;
    skipSourcePorts?: string;
    up?: ThrottleRule | ThrottleRule[];
}

The network throttling rules. Specify multiple ThrottleRule with different at values to schedule network bandwidth/delay fluctuations during the test run, e.g.:

{
device: "eth0",
sessions: "0-1",
protocol: "udp",
down: [
{ rate: 1000000, delay: 50, loss: 0, queue: 5 },
{ rate: 200000, delay: 100, loss: 5, queue: 5, at: 60},
],
up: { rate: 100000, delay: 50, queue: 5 },
capture: 'capture.pcap',
}

Type declaration

  • Optionalcapture?: string

    If set, the packets matching the provided session and protocol will be captured at that file location.

  • Optionaldevice?: string

    The network interface to throttle. If not specified, the default interface will be used.

  • Optionaldown?: ThrottleRule | ThrottleRule[]

    The downlink throttle rules.

  • Optionalfilter?: string

    An additional IPTables packet filter rule.

  • Optionalmatch?: string

    An additional TC match expression used to filter packets (https://man7.org/linux/man-pages/man8/tc-ematch.8.html).

  • Optionalprotocol?: "udp" | "tcp"

    The protocol to throttle.

  • Optionalsessions?: string

    The sessions to throttle. It could be a single index ("0"), a range ("0-2") or a comma-separated list ("0,3,4").

  • OptionalskipDestinationPorts?: string

    A comma-separated list of destination ports that will not be throttled.

  • OptionalskipSourcePorts?: string

    A comma-separated list of source ports that will not be throttled.

  • Optionalup?: ThrottleRule | ThrottleRule[]

    The uplink throttle rules.