From b562dc3349395c052b50ae5c45aef44ccfdcbb6d Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Fri, 14 Jun 2024 17:41:18 +0200 Subject: [PATCH] Ensure Windows connection always autoselects IP family Without this connections will fail in many environments. It looks like the Apple daemon listens only on IPv4, and in many setups localhost now resolves to ::1. This should let us cover both options easily. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f1c05a0..0e1e3e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,7 @@ import { delay, getDeferred, CustomError } from '@httptoolkit/util'; import { readBytes } from './stream-utils'; const DEFAULT_ADDRESS = process.platform === 'win32' - ? { port: 27015 } + ? { port: 27015, autoSelectFamily: true } : { path: '/var/run/usbmuxd' }; const CLIENT_VERSION = 'usbmux-client';