MacOS - No PAC URL specified or Detected
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
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:
- Original method using SCDynamicStoreCopyValue
- 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
Awaiting PR approval: ~github.com/samuong/alpaca/pull/147/files~ https://github.com/samuong/alpaca/pull/154
Sorry for the delay in fixing this. PR now at https://github.com/samuong/alpaca/pull/154