Skip to content

fix: clearer Chinese error when Windows rejects system proxy enable#20

Merged
UndergroundAlzar merged 1 commit into
mainfrom
feature/sysproxy-enable-ux
Jul 14, 2026
Merged

fix: clearer Chinese error when Windows rejects system proxy enable#20
UndergroundAlzar merged 1 commit into
mainfrom
feature/sysproxy-enable-ux

Conversation

@UndergroundAlzar

Copy link
Copy Markdown
Owner

Summary

  • When triggerSysProxy(true) / enable fails because Windows did not accept the requested system proxy state, rethrow a clearer Chinese user-facing message: 系统代理未能应用(可能被其他代理软件占用,请先用手动代理 127.0.0.1:17890 测试).
  • Logs still record the original English error before remapping.
  • Soft-fail recovery path on main is untouched; restore failures keep their existing messages.

Test plan

  • npx vitest run src/main/sys/sysproxy.test.ts (12 passed)
  • New unit test: maps WinINET state rejection on enable to Chinese message
  • Manual: enable system proxy while another client holds WinINET and confirm toast shows the new message (no host proxy mutation in this PR agent run)

Map WinINET state-rejection on enable to a user-facing Chinese message
suggesting manual proxy 127.0.0.1:17890 when another client may own the
proxy. Logs keep the original English error; restore path unchanged.
@UndergroundAlzar
UndergroundAlzar force-pushed the feature/sysproxy-enable-ux branch from 0265999 to 63a1cba Compare July 14, 2026 01:06
@UndergroundAlzar
UndergroundAlzar merged commit 3b43251 into main Jul 14, 2026
2 checks passed
@UndergroundAlzar
UndergroundAlzar deleted the feature/sysproxy-enable-ux branch July 14, 2026 01:11
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.

1 participant