ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.69k stars 188 forks source link

Automatic proxy configuration #2155

Open enzosterro opened 1 month ago

enzosterro commented 1 month ago

Description

I am required to use automatic proxy configuration. When I install the Proxy Helper tool and the application starts, it overrides the current system proxy settings as expected. However, when I stop the application, it does not fully revert the changes, leaving the automatic proxy configuration on but with an empty URL.

Steps to Reproduce

  1. Enable Automatic proxy configuration in the settings.
  2. Install Proxy Helper tool
  3. Run the app
  4. Check the Automatic proxy configuration is disabled.
  5. Stop the app
  6. Check the Automatic proxy configuration is enabled, but URL is empty.

Current Behavior

Automatic proxy configuration is empty when stopping the app.

Expected Behavior

Automatic proxy configuration is restored to the previous state with provided URL.

Environment

NghiaTranUIT commented 1 month ago

Can you try to enable the "Auto Restore HTTP Proxy Setting when closing" in the Settings -> Advance Tab ?

Screenshot 2024-10-11 at 09 01 54

By default, Proxyman won't restore your previous state until it's enabled.

enzosterro commented 1 month ago

Can you try to enable the "Auto Restore HTTP Proxy Setting when closing" in the Settings -> Advance Tab ? By default, Proxyman won't restore your previous state until it's enabled.

It is enabled, that's why it restores the toggle state, but the URL string becomes empty.

NghiaTranUIT commented 1 month ago

thanks, let me check, it could be a bug

enzosterro commented 1 week ago

Sure. @NghiaTranUIT, any updates?

NghiaTranUIT commented 1 week ago

not yet, but I will fix it in next release 👍

NghiaTranUIT commented 1 week ago

@enzosterro can you try with the latest build v5.10.0?

I tested and the PAC URL are still restored when closing Proxyman app. See the demo video.

https://github.com/user-attachments/assets/7776247e-0a0f-46b6-ba05-0e9073146a60

enzosterro commented 1 week ago

Hi @NghiaTranUIT, I tried it on the latest 5.10.0 and got the same result. When I close the app, the URL gets empty.

I'm using Wi-Fi and the URL is in the format http://10.0.0.10/pac.

Here's a screenshot when I quit the app by pressing ⌘Q.

screenshot

NghiaTranUIT commented 1 week ago

Thanks, it's a bug from Apple too. Please see the video: I just turned off and turned on the PAC file, and no Proxyman is involved -> The URL is cleared.

https://github.com/user-attachments/assets/af796e88-a44d-4b03-99da-6409c9d98b8c


I've checked the code from Proxyman, it doesn't override the PAC URL, it only overrides the Toggle -> Apple Bug -> PAC URL is empty.

To fix it, I will capture the PAC URL and manually override it when Proxyman is closed

enzosterro commented 1 week ago

@NghiaTranUIT, thanks a bunch! Do you have an estimate of when the fix will be ready?

NghiaTranUIT commented 1 week ago

@enzosterro let's try this build: https://download.proxyman.io/beta/Proxyman_5.10.0_Fix_PAC_URL_could_not_be_restored_with_Helper_Tool.dmg

enzosterro commented 1 week ago

It works now. Thanks! 🙏