alpaca icon indicating copy to clipboard operation
alpaca copied to clipboard

MacOS - No PAC URL specified or Detected

Open Enelass opened this issue 8 months ago • 2 comments

When the PAC file URL is set in the Network Interface / Proxies / Automatic proxy configuration on MacOS, Alpaca will read it and use it. However it this isn't set, Alpaca will resort to making direct connections only... Even if scutil --proxy does define the PAC URL...

This is because Alpaca is set to pull the value from getPACUrlFromSCDynamicStoreCopyValue and is omitting getPACUrlFromSCDynamicStoreCopyProxies

Enelass avatar Apr 14 '25 10:04 Enelass

Added Redundant PAC URL Detection Methods in https://github.com/Enelass/alpaca_pacfinder_darwin_fix

Before:

  • Single method for PAC URL detection using SCDynamicStoreCopyValue

After:

  • Two methods for PAC URL detection:
    1. Original method using SCDynamicStoreCopyValue
    2. New method using SCDynamicStoreCopyProxies
  • Fallback mechanism: if the first method fails, the second is tried

3. Code Structure Improvements

Before:

  • Single monolithic function for PAC URL detection
  • Limited comments and documentation

After:

  • Split functionality into separate methods with clear responsibilities
  • Better function naming (getPACUrlFromSCDynamicStoreCopyValue, getPACUrlFromSCDynamicStoreCopyProxies)
  • Added commented logging statements (currently disabled) for debugging

Enelass avatar Jun 02 '25 01:06 Enelass

Awaiting PR approval: ~github.com/samuong/alpaca/pull/147/files~ https://github.com/samuong/alpaca/pull/154

Enelass avatar Jun 11 '25 02:06 Enelass

Sorry for the delay in fixing this. PR now at https://github.com/samuong/alpaca/pull/154

Enelass avatar Jul 13 '25 13:07 Enelass