Motherboard Forums


Reply
Thread Tools Display Modes

How to configure Snow Leopard to use proxy server?

 
 
DaveC
Guest
Posts: n/a
 
      03-21-2012, 04:12 AM
I want to configure Snow Leopard to use a proxy server for a few web sites.

It looks like if I configure it with a proxy server, that it defaults to
using this server nearly always.

Can I use OS X's proxy settings to use the proxy server based on URL
patterns, rather than to NOT use proxy server based on URL patterns? In other
words, can I make the default action to not use the proxy server, and to use
the proxy if the URL is one of the few I specify?

Thanks,
Dave

 
Reply With Quote
 
 
 
 
Barry Margolin
Guest
Posts: n/a
 
      03-21-2012, 06:20 AM
In article
<(E-Mail Removed)-september.org>,
DaveC <(E-Mail Removed)> wrote:

> I want to configure Snow Leopard to use a proxy server for a few web sites.
>
> It looks like if I configure it with a proxy server, that it defaults to
> using this server nearly always.
>
> Can I use OS X's proxy settings to use the proxy server based on URL
> patterns, rather than to NOT use proxy server based on URL patterns? In other
> words, can I make the default action to not use the proxy server, and to use
> the proxy if the URL is one of the few I specify?


You need to use a proxy.pac file. This is a file containing a
JavaScript function that looks at the URL and decides whether to use a
proxy or not.

http://en.wikipedia.org/wiki/Proxy_auto-config

--
Barry Margolin, (E-Mail Removed)
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
 
Reply With Quote
 
 
 
 
DaveC
Guest
Posts: n/a
 
      03-22-2012, 08:14 PM
> You need to use a proxy.pac file. This is a file containing a
> JavaScript function that looks at the URL and decides whether to use a
> proxy or not.
>
> http://en.wikipedia.org/wiki/Proxy_auto-config


In what directory is this file to be placed?

Thanks.

 
Reply With Quote
 
Wes Groleau
Guest
Posts: n/a
 
      03-22-2012, 09:57 PM
On 03-22-2012 16:14, DaveC wrote:
>> You need to use a proxy.pac file. This is a file containing a
>> JavaScript function that looks at the URL and decides whether to use a
>> proxy or not.
>>
>> http://en.wikipedia.org/wiki/Proxy_auto-config

>
> In what directory is this file to be placed?


Maybe the one you specify in System Preferences -> Network -> Advanced
-> Automatic Proxy config ?

--
Wes Groleau

Nobody believes a theoretical analysis — except the guy who did it.
Everybody believes an experimental analysis — except the guy who did it.
— Unknown

 
Reply With Quote
 
DaveC
Guest
Posts: n/a
 
      03-23-2012, 12:12 AM
> Maybe the one you specify in System Preferences -> Network -> Advanced
> -> Automatic Proxy config ?
> [Wes G.]


It allows you to place it anywhere. Where's a good folder to store it?

Thanks.

 
Reply With Quote
 
Helpful Harry
Guest
Posts: n/a
 
      03-23-2012, 01:11 AM
> You need to use a proxy.pac file. This is a file containing a
> JavaScript function that looks at the URL and decides whether to use a
> proxy or not.
>
> http://en.wikipedia.org/wiki/Proxy_auto-config


It could be easier to just use a different web browser - use Safari for
the "normal" websites and Firefox for the websites that need a proxy
server.

Helpful Harry )
 
Reply With Quote
 
Sparky
Guest
Posts: n/a
 
      03-23-2012, 01:53 AM
> It could be easier to just use a different web browser - use Safari for
> the "normal" websites and Firefox for the websites that need a proxy
> server.
>
> Helpful Harry )


Man, I SO wanted to do this.

I tried it (Safari & Firefox) but 2 browsers eat up HUGE memory and disk swap
file space. My Mac slowed to a creep.

Having more than one browser open eats up system resources that are best
spent elsewhere...

 
Reply With Quote
 
DaveC
Guest
Posts: n/a
 
      03-23-2012, 02:03 AM
> http://en.wikipedia.org/wiki/Proxy_auto-config

Having a little trouble with the script language the proxy.pac file...

Here's what I've copied & modified from examples on the above page:
- - -
function FindProxyForURL(url, host) {
// URLs within the target domain are
// accessed through the proxy server:
if (shExpMatch(host, "http://www.bbc.co.uk*"))
{
return "PROXY 123.345.567.789:1234";
}

// All other requests don't use the proxy.
return "DIRECT";
}
- - -
If I comment out the "if" line and just return the proxy IP and port, all is
well. (Oh, and also comment out the "return 'DIRECT' " line at the bottom.)

But as it is (above) the proxy is not used. All web pages are loaded
normally, just not using the proxy.

It's probably bog simple, but I'm missing it.

Thanks.

 
Reply With Quote
 
DaveC
Guest
Posts: n/a
 
      03-23-2012, 02:06 AM
> If I comment out the "if" line and just return the proxy IP and port, all is
> well. (Oh, and also comment out the "return 'DIRECT' " line at the bottom.)


By "all is well" I mean that if these 2 lines are commented out, all http
calls go through the proxy server.

 
Reply With Quote
 
Alan Baker
Guest
Posts: n/a
 
      03-23-2012, 05:51 AM
In article
<(E-Mail Removed)-september.org>,
DaveC <(E-Mail Removed)> wrote:

> > Maybe the one you specify in System Preferences -> Network -> Advanced
> > -> Automatic Proxy config ?
> > [Wes G.]

>
> It allows you to place it anywhere. Where's a good folder to store it?
>
> Thanks.


No folder is any better than any other, really, but since it's
essentially a preference you're setting up, why not store it in your
Preferences folder?

--
Alan Baker
Vancouver, British Columbia
"If you raise the ceiling four feet, move the fireplace from that wall
to that wall, you'll still only get the full stereophonic effect if you
sit in the bottom of that cupboard."
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Snow Leopard vs. Leopard Nick Naym Apple 8 11-12-2009 05:26 AM
If you installed Snow Leopard over Leopard ... James Sidbury Apple 4 10-14-2009 03:00 PM
Re: Test of Leopard vs. Snow Leopard MC Apple 4 10-07-2009 02:51 AM
Re: Test of Leopard vs. Snow Leopard BreadWithSpam@fractious.net Apple 2 10-06-2009 06:55 PM
Re: Test of Leopard vs. Snow Leopard Richard Maine Apple 0 10-06-2009 01:07 AM


All times are GMT. The time now is 02:37 AM.


Welcome!
Welcome to Motherboard Point
 

Advertisment