Skip to content

Commit 8b6aed3

Browse files
committed
fix docs
1 parent e549db8 commit 8b6aed3

File tree

2 files changed

+51
-22
lines changed

2 files changed

+51
-22
lines changed

docs/config.md

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -104,29 +104,29 @@ If greater than 0, the test will stop after the provided number of seconds.
104104
*Default*: `0`
105105

106106
## throttleConfig
107-
A JSON5 string with a valid network throttling configuration, e.g.:
107+
A JSON5 string with a valid network throttling configuration. Example:
108108
```javascript
109-
{
109+
[{
110+
sessions: '0-1',
111+
device: 'eth0',
112+
protocol: 'udp',
110113
up: {
111-
rate: 1000
112-
rtt: 50
113-
loss: '5%'
114-
queue: 10
115-
protocol: 'udp'
116-
at: 60
114+
rate: 1000,
115+
delay: 50,
116+
loss: 5,
117+
queue: 10,
117118
},
118-
down: {
119-
rate: 2000
120-
rtt: 50
121-
loss: '5%'
122-
queue: 20
123-
protocol: 'udp'
124-
at: 60
125-
}
126-
}
119+
down: [
120+
{ rate: 2000, delay: 50, loss: 2, queue: 20 },
121+
{ rate: 1000, delay: 50, loss: 2, queue: 20, at: 60 },
122+
]
123+
}]
124+
```
125+
The sessions field represents the sessions IDs range that will be affected by the rule, e.g.: "0-10", "2,4" or simply "2". The device, protocol, up, down fields are optional. When device is not set, the default route device will be used. If protocol is specified ('udp' or 'tcp'), only the packets with the specified protocol will be affected by the shaping rules. When running as regular user, add the following sudo configuration:
126+
```
127+
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/iptables,/usr/sbin/addgroup,/usr/sbin/adduser,/usr/sbin/tc,/usr/sbin/modprobe
127128
```
128129

129-
When used with docker, run `sudo modprobe ifb numifbs=1` first and add the `--cap-add=NET_ADMIN` docker option.
130130

131131
*Type*: `string`
132132

@@ -384,7 +384,14 @@ A comma-separated list of request URLs that will be automatically blocked.
384384
*Default*: `""`
385385

386386
## extraHeaders
387-
A dictionary of headers keyed by the url in JSON format (e.g. `{ "https://url.com": { "header-name": "value" } }`).
387+
A dictionary of headers keyed by the url in JSON5 format (e.g. `{ "https://url.com/*": { "header-name": "value" } }`).
388+
389+
*Type*: `string`
390+
391+
*Default*: `""`
392+
393+
## responseModifiers
394+
A dictionary of content replacements keyed by the url in JSON5 format (e.g. `{ "https://url.com/*": [{ search: "searchString": replace: "anotherString" }] }`).The search string should be a valid regular expression.
388395

389396
*Type*: `string`
390397

@@ -544,6 +551,27 @@ An optional path that the HTTP server will expose with the /data endpoint.
544551

545552
*Default*: `""`
546553

554+
## vmafPath
555+
When set, it runs the VMAF calculator for the videos saved under the provided directory path.
556+
557+
*Type*: `string`
558+
559+
*Default*: `""`
560+
561+
## vmafPreview
562+
If true, for each VMAF comparison it creates a side-by-side video with the reference and degraded versions.
563+
564+
*Type*: `boolean`
565+
566+
*Default*: `false`
567+
568+
## vmafKeepIntermediateFiles
569+
If true, the VMAF intermediate files will not be deleted.
570+
571+
*Type*: `boolean`
572+
573+
*Default*: `false`
574+
547575

548576

549577
---

src/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@ the rule, e.g.: "0-10", "2,4" or simply "2". \
163163
The device, protocol, up, down fields are optional. When device is not set, the \
164164
default route device will be used. If protocol is specified ('udp' or 'tcp'), \
165165
only the packets with the specified protocol will be affected by the shaping rules. \
166-
When running as regular user, add the following sudo configuration: \
167-
\`\`\`
166+
When running as regular user, add the following sudo configuration:
167+
\`\`\`
168168
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/iptables,/usr/sbin/addgroup,/usr/sbin/adduser,/usr/sbin/tc,/usr/sbin/modprobe
169-
\`\`\`
169+
\`\`\`
170+
\
170171
`,
171172
format: String,
172173
nullable: true,

0 commit comments

Comments
 (0)