Skip to content

Commit 4756382

Browse files
authored
Merge pull request #1 from beyondkmp/httpsProxy
feat: Refactor proxy URL selection logic to prioritize HTTP over HTTPS
2 parents bd7e363 + 4628813 commit 4756382

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ export async function getWindowsSystemProxy(): Promise<WindowsProxySettings | un
5151
.map((proxyPair) => proxyPair.split('=') as [string, string])
5252
);
5353

54-
const proxyUrl = proxies['https']
55-
? `https://${proxies['https']}`
56-
: proxies['http']
54+
const proxyUrl = proxies['http']
5755
? `http://${proxies['http']}`
5856
: proxies['socks']
5957
? `socks://${proxies['socks']}`
58+
: proxies['https']
59+
? `http://${proxies['https']}`
6060
: undefined;
6161

6262
if (!proxyUrl) {

0 commit comments

Comments
 (0)