access proxy from terminal using proxy auto-config

I know about using ntlmaps to wrapper my proxy configurations e get access from Terminal, iTerm2, &c exporting http_proxy variable and others. But I don't want go on using this approach because it simply ***** (forgive me for this word...) for a lot of issues.


I would like simply setup my proxy environment on Network Preferences/Advanced/Automatic Proxy Configuration: (host: http://myproxy/proxy.pac) and using this setup for a whole system, including my terminals. Therefore, are there any way to reach it?


Another details, my proxy is authenticated and uses ntlm type and in browser I use internet without problems.


Thanks a lot for any help!


-Leo

MacBook Pro, Mac OS X (10.7.4), No one

Posted on Aug 2, 2012 2:45 PM

Reply
1 reply

Aug 3, 2012 2:48 PM in response to lhcezar

I am not quite sure what you are looking for. Mac OS X has supported auto proxy configuration since 10.6 Snow Leopard was introduced (acutally in response to a request I made 🙂). If you open System Preferences, click on Network, then go to the Advanced settings for your network interface, in the Proxies tab there is an option called Auto Proxy Discovery. This is different to Automatic Proxy Configuration which was also available in previous versions of OS X. Automatic Proxy Configuration uses a selected PAC file (Proxy Auto Configuration file) but Auto Proxy Discovery uses the WPAD method of finding your proxy server.


See this article for information about WPAD (Web Proxy Automatic Detection).


http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol


WPAD uses either an option advertised from your DHCP server giving the address of your proxy server, or WPAD can use a standard URL based on your domain name to download a dat file containing your proxy server details.


I have seen reports saying the the DNS method is problematic with Mac OS X but also seen reports that the DHCP method does work with this option successfully. So my suggestion is to define the DHCP option code 252 to advertise your proxy server.


Note: Thanks to yet another request I made in the past the Mac OS X DHCP Server can be manually configured to define additional DHCP option codes including option 252. The ability to define DHCP option codes was added in Mac OS X 10.5 Server (Leopard).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

access proxy from terminal using proxy auto-config

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.