Fix Electron proxy agents#12770
Merged
Merged
Conversation
megayu
commented
Jun 5, 2026
Collaborator
- Proxy connection test no longer changes the app-wide proxy setting while testing.
- Proxy test requests now use the selected proxy options directly.
- HTTP and SOCKS5 proxy settings can be saved and restored correctly.
- The proxy test success message now receives the status code and response time correctly.
- Host and port inputs are validated before testing or saving.
- Port input now accepts only valid numeric port values.
- Proxy Setting UI polish.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Logseq Desktop’s proxy handling for plugin/network requests: proxy testing no longer mutates the app-wide proxy state, per-request proxy settings are applied directly, proxy settings are normalized/validated in the UI, and proxy agent dependencies are adjusted to avoid Electron/Node module-loading pitfalls.
Changes:
- Added host/port validation + port input sanitization/normalization in the proxy settings UI, with a new i18n key for the validation error.
- Updated Electron main-process proxy implementation to support per-request proxy resolution (including system proxy) and simplified proxy-agent loading by pinning compatible agent versions.
- Adjusted proxy test IPC flow to use the selected proxy options directly without calling the global
setProxyfirst.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/main/frontend/components/plugins.cljs |
Proxy settings UI: new select component, host/port validation, port sanitization/normalization, per-request proxy test + safer save flow. |
src/main/frontend/state.cljs |
Proxy indicator/value computation updated to handle older saved proxy settings. |
src/electron/electron/utils.cljs |
Electron proxy + fetch proxy plumbing refactor; per-request proxy support; temporary session used to resolve system proxy without changing global proxy. |
src/electron/electron/handler.cljs |
Proxy test IPC no longer calls global setProxy; passes proxy options into utils/fetch for isolated testing. |
resources/package.json |
Pins https-proxy-agent / socks-proxy-agent versions to compatible releases. |
resources/pnpm-lock.yaml |
Lockfile updates matching the proxy-agent version pins. |
src/resources/dicts/en.edn |
Adds :plugin.proxy/host-port-required and normalizes dict formatting. |
src/resources/dicts/zh-cn.edn |
Adds required zh-CN translation for the new key. |
src/resources/dicts/* (multiple locales) |
Adds translations for :plugin.proxy/host-port-required across many locales. |
Files not reviewed (1)
- resources/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
xyhp915
approved these changes
Jun 17, 2026
RCmerci
pushed a commit
that referenced
this pull request
Jun 19, 2026
RCmerci
pushed a commit
that referenced
this pull request
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.