Skip to content

Auto Restore Proxy when closing Proxyman #482

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

Open
12 tasks done
NghiaTranUIT opened this issue Mar 29, 2025 · 1 comment
Open
12 tasks done

Auto Restore Proxy when closing Proxyman #482

NghiaTranUIT opened this issue Mar 29, 2025 · 1 comment
Assignees
Labels
✅ Done Ticket is resolved enhancement New feature or request

Comments

@NghiaTranUIT
Copy link
Member

NghiaTranUIT commented Mar 29, 2025

Description

Like Proxyman macOS, when closing Proxyman Windows, the app doesn't restore to previous User's Proxy Setting that causes a lot of trouble. We should bring this feature to Windows.

Acceptance Criteria

  • Add this Option to setting: Advance Tab (Add to the Top of the list and have a Horizontal Seperator)
Image
  • This option is stored in AppConfiguration
  • This feature only works with Windows. For Linux, disable it and the entire Logic. Use if os(...) to check.

How it works

  1. When the app is starting, before overriding the System Proxy to Proxyman 127.0.0.1:9090, If this feature is enabled -> Proxyman will fetch:
1. The Status of the System Proxy
2. Proxy IP
3. Port
4. Bypass Proxy List
5. Do not use proxy server for local checkbox

Image

  • Ask Cursor Thinking Mode to write logic to fetch 5 data and store it in the UserProxySetting class. Beware that these settings could be undefined or empty. ALWAYS fetch this data even though this feature is OFF ✅
  • Verify this logic can run without asking for any username/password system alert! -> It's really annoying if it asks for a username/password when launching the app
  • Save this setting to AppConfiguration
  • Override System Proxy as normal (Verify it doesn't break the current logic)
  1. When the app is closed. Before reverting the Proxy:
  • Check if this feature is ON, and there is UserProxySetting in AppConfiguration -> Write a logic to override the system proxy to UserProxySetting
  • Verify 5 properties are updated correctly after the app is closed!
  • Make sure the normal revert Proxy is still working

Edge Case 1:

  • If the Proxy Address and Port (in UserProxySetting) is the same with Proxyman (IP = 127.0.0.1 and 9090 (current port) ) and Proxy Server Toggle is ON -> We must revert as normal -> It means the Proxy Server Toggle is OFF.
  • To explain: Sometimes when Proxyman is running -> System Proxy is overrideen to Proxyman -> Proxyman is crashed -> System Proxy wasn't revert -> Can't access to the Internet -> User will try open Proxyman again -> Then close the app -> Proxyman must revert the proxy, so users can access the Internet

Real Windows 11

  • Test with real Windows 11 PC and record video
@NghiaTranUIT NghiaTranUIT added the enhancement New feature or request label Mar 29, 2025
@NghiaTranUIT
Copy link
Member Author

NghiaTranUIT commented Mar 29, 2025

How to test

Scenario 1: Restore correctly

  1. In Windows -> Open Proxy Settings -> Manual Proxy -> Edit -> Try to set 5 properties with different values (The Proxy Server Toggle must be switched ON), like the below screenshot

Image

  1. Open Proxyman -> Go to Setting -> Advanced Tab -> Turn ON this feature
  2. Open System Proxy Settings -> Verify it's overridden to Proxyman 127.0.0.1:9090
  3. Close Proxyman -> Open System Proxy again -> Verify it's restored to the original settings (check 5 properties)

Scenario 2: Edge case

  • Verify it works with Edge case

@kics223w1 kics223w1 added the ✅ Done Ticket is resolved label Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Done Ticket is resolved enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants