Skip to content

Commit 576fa3b

Browse files
committed
fix(proxy): update clearSystemProxy to handle proxy bypass list correctly
1 parent d19420f commit 576fa3b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

frontend/src/stores/env.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export const useEnvStore = defineStore('env', () => {
6060
}
6161

6262
const clearSystemProxy = async () => {
63-
await SetSystemProxy(false, '')
63+
const proxyBypassList = appSettings.app.proxyBypassList
64+
await SetSystemProxy(false, '', undefined, proxyBypassList)
6465
systemProxy.value = false
6566
}
6667

frontend/src/utils/helper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,11 @@ async function setWindowsSystemProxy(
126126
'/v',
127127
'ProxyOverride',
128128
'/d',
129-
bypass.trim(),
129+
bypass
130+
.split(';')
131+
.map((v) => v.trim())
132+
.filter(Boolean)
133+
.join(';'),
130134
'/f',
131135
])
132136

0 commit comments

Comments
 (0)