windscout 0.5.4 → 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.
package/README.md CHANGED
@@ -75,7 +75,7 @@ windscout -t 40 -a # longer connect timeout, also list
75
75
  |---|---|---|
76
76
  | `-c, --countries` | comma-separated ISO country codes, city names or nicknames | open the picker |
77
77
  | `-p, --protocols` | comma-separated: `wireguard`, `ikev2` (macOS and Windows), `stealth`, `wstunnel`, `udp`, `tcp`, optionally `:port` | saved, or all |
78
- | `-t, --timeout` | seconds to wait for each connection, at least 10 | picker: saved, or 10; with `-c`: 10 |
78
+ | `-t, --timeout` | seconds to wait for each connection, at least 10 | picker: saved, or 15; with `-c`: 15 |
79
79
  | `-a, --all` | include failed attempts in the final table | off |
80
80
  | `-n, --no-speed` | connect-only mode: skip the download test, rank by latency | picker: saved, or connect-only on first run; with `-c`: speed test on |
81
81
  | `-f, --firewall` | block internet while scanning, except through the VPN | picker: saved, or off; with `-c`: off |
package/dist/config.js CHANGED
@@ -3,7 +3,7 @@ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { dirname, join } from "node:path";
5
5
  import { COUNTRIES, PROTOCOLS } from "./windscribe.js";
6
- export const DEFAULT_TIMEOUT = 10;
6
+ export const DEFAULT_TIMEOUT = 15;
7
7
  export const MIN_TIMEOUT = 10; // seconds; shorter cuts off connections that would have worked
8
8
  export const CONFIG = join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "windscout", "config.json");
9
9
  /** The saved choice, minus anything this version doesn't offer; null on first run or an unreadable file */
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.4",
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": {