Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Web Proxy - apply only to specified URLs

I subscribe to a web proxy service. Is there a utility that allows me to have my proxy "kick in" only when visiting specified sites? For example:


1) browse to http://www.google.com - no proxy active

2) browse to http://www.facebook.com - proxy automatically activates

15" i5 MacBook 2.4GHz, Mac OS X (10.6.5)

Posted on Jun 18, 2011 5:07 AM

Reply
Question marked as Best reply

Posted on Jun 18, 2011 2:46 PM

You would need to create a proxy.pac file (see Wikipedia), then in network preferences > Advanced > Proxies select Automatic Proxy Configuration then Choose File... to select your proxy.pac file.


Bob

6 replies

Jul 23, 2011 3:27 AM in response to NewbieApple

My .pac looks something like this:


function FindProxyForURL(url, host)

{

// variable strings to return

var proxy_yes = "PROXY yourproxyhere.com:7128";

var proxy_no = "DIRECT";

if (shExpMatch(url, "https://proxythissite.com*")) { return proxy_yes; }

if (shExpMatch(url, "https://proxythissitealso.com*")) { return proxy_yes; }

// Proxy anything else

return proxy_no;

}



You'll need to put your proxy details in (including the port number if applicable), and specify which sites you want proxied. Edit this text in TextEdit, and save it as proxy.pac. Then, go into System Preferences->Network->Advanced->Proxies and select "Automatic Proxy Configuration". Select your .pac file and hit "OK". Then, hit "Apply" and you're all set.


Unfortunately, my .pac file doesn't seem to be working under 10.7 (Lion). I guess I'll have to wait for Apple to debug their shiny new OS a little further!

Web Proxy - apply only to specified URLs

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