Skip to content

Commit 2dce1c7

Browse files
committed
Fixed interfaces on windows
1 parent 627a64c commit 2dce1c7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/util/speedtest.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ module.exports = async (mode, serverId) => {
1515
let args;
1616

1717
if (mode === "ookla") {
18-
args = ['--accept-license', '--accept-gdpr', '--format=json', '--interface=' + currentInterface];
18+
args = ['--accept-license', '--accept-gdpr', '--format=json'];
19+
20+
if (process.platform === "win32") {
21+
args.push('--ip=' + interfaceIp);
22+
} else {
23+
args.push('--interface=' + currentInterface);
24+
}
25+
1926
if (serverId) args.push(`--server-id=${serverId}`);
2027
} else {
2128
args = ['--json', '--duration=5', '--source=' + interfaceIp];

0 commit comments

Comments
 (0)