windscout 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/measure.js +7 -0
  2. package/package.json +1 -1
package/dist/measure.js CHANGED
@@ -1,5 +1,12 @@
1
1
  // Latency and download speed over whatever connection is up (the VPN tunnel, during a scan).
2
+ import { setDefaultResultOrder } from "node:dns";
3
+ import { setDefaultAutoSelectFamily } from "node:net";
2
4
  import { now } from "./time.js";
5
+ // a slow tunnel can take over a second to open a TCP connection, but Node's happy eyeballs gives each address 250 ms,
6
+ // fails fast on IPv6 (no route on Linux), and fetch ends in ETIMEDOUT though the VPN works.
7
+ // Connect to one IPv4 address instead, with the whole timeout
8
+ setDefaultAutoSelectFamily(false);
9
+ setDefaultResultOrder("ipv4first");
3
10
  const LATENCY_URL = "https://www.gstatic.com/generate_204";
4
11
  const SPEED_URL = "https://speed.cloudflare.com/__down?bytes=10000000";
5
12
  const SPEED_SECONDS = 15;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windscout",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Find which Windscribe locations and protocols work from your network, ranked by speed (unofficial)",
5
5
  "type": "module",
6
6
  "bin": {