Skip to content

完善代理设置 #2382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 10, 2025
Merged

完善代理设置 #2382

merged 5 commits into from
May 10, 2025

Conversation

Folltoshe
Copy link
Contributor

No description provided.

@lyswhut
Copy link
Owner

lyswhut commented May 7, 2025

看了下,当设置为 系统代理 时,只是设置了 browserWindow.webContents.session.setProxy({ mode: 'system' }),接口还是不会走系统代理,与设置描述不完全一致,其实就是现在的行为,
所以我更倾向于,保留现在的设置方式,但是不启用代理时,也将不会自动走系统代理,即设置为 browserWindow.webContents.session.setProxy({ mode: 'direct' })

@Folltoshe
Copy link
Contributor Author

看了下,当设置为 系统代理 时,只是设置了 browserWindow.webContents.session.setProxy({ mode: 'system' }),接口还是不会走系统代理,与设置描述不完全一致,其实就是现在的行为,
所以我更倾向于,保留现在的设置方式,但是不启用代理时,也将不会自动走系统代理,即设置为 browserWindow.webContents.session.setProxy({ mode: 'direct' })

我那边的实现代码是使用Axios来发送接口请求,这样子就可以覆盖到。
但是needle我没找到相关配置,所以实现不了

@lyswhut
Copy link
Owner

lyswhut commented May 7, 2025

那就改成未启用代理时让 Chromium 也走直连就行了

@lyswhut lyswhut merged commit 4c6257c into lyswhut:dev May 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants