Skip to content

Fix Electron proxy agents#12770

Merged
xyhp915 merged 7 commits into
masterfrom
fix/proxy-settings
Jun 17, 2026
Merged

Fix Electron proxy agents#12770
xyhp915 merged 7 commits into
masterfrom
fix/proxy-settings

Conversation

@megayu

@megayu megayu commented Jun 5, 2026

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 setProxy first.

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.

Comment thread src/main/frontend/state.cljs
@megayu megayu requested a review from tiensonqin June 5, 2026 12:52
@tiensonqin tiensonqin requested review from xyhp915 and removed request for tiensonqin and xyhp915 June 8, 2026 09:35
@xyhp915 xyhp915 merged commit 6088ec8 into master Jun 17, 2026
10 checks passed
RCmerci pushed a commit that referenced this pull request Jun 19, 2026
RCmerci pushed a commit that referenced this pull request Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants