Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/localHostPfctl.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function start(rtt) {
);

await shell(
'echo "dummynet out from any to 127.0.0.1 pipe 1" | sudo pfctl -f -'
'echo "dummynet out inet from any to 127.0.0.1 pipe 1\ndummynet out inet6 from any to ::1 pipe 1" | sudo pfctl -f -'
);

await sudo('pfctl', '-E');
Expand Down
24 changes: 24 additions & 0 deletions lib/tc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,30 @@ async function setup(defaultInterface) {
'dev',
'ifb0'
);
await sudo(
'tc',
'filter',
'add',
'dev',
defaultInterface,
'parent',
'ffff:',
'protocol',
'ipv6',
'u32',
'match',
'u32',
'0',
'0',
'flowid',
'1:1',
'action',
'mirred',
'egress',
'redirect',
'dev',
'ifb0'
);
}

async function setLimits(up, down, halfWayRTT, packetLoss, indexFace) {
Expand Down
Loading