mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
fix(ProxyManager): handle optional currentProxy in system proxy check and log changes (#8865)
This commit is contained in:
parent
281c545a8f
commit
9e0aa1f3fa
@ -87,10 +87,11 @@ export class ProxyManager {
|
||||
// Set new interval
|
||||
this.systemProxyInterval = setInterval(async () => {
|
||||
const currentProxy = await getSystemProxy()
|
||||
if (currentProxy && currentProxy.proxyUrl.toLowerCase() === this.config?.proxyRules) {
|
||||
if (currentProxy?.proxyUrl.toLowerCase() === this.config?.proxyRules) {
|
||||
return
|
||||
}
|
||||
|
||||
logger.info(`system proxy changed: ${currentProxy?.proxyUrl}, this.config.proxyRules: ${this.config.proxyRules}`)
|
||||
await this.configureProxy({
|
||||
mode: 'system',
|
||||
proxyRules: currentProxy?.proxyUrl.toLowerCase(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user