Just to be clear, if you're on the internal network then use the
proxy.  If you take your laptop home/hotel/whatever, go direct to the
internet, right?

Here's one way:

function FindProxyForURL(url,host) { return "PROXY
192.168.10.100:3128; DIRECT"; }

Basically, if you can ping the proxy at address 192.168.10.100, use
it.  If not, go direct to the Internet.

You can also bypass the proxy for local addresses:

function FindProxyForURL(url,host) {

if (
(isInNet(host,"10.10.1.0","255.255.255.0")) ||
(isInNet(host,"10.100.0.0","255.255.0.0")) ||
(isInNet(host,"192.168.10.0","255.255.255.0")) ||
(isInNet(host,"127.0.0.0","255.255.255.0"))
)
return "DIRECT";
else
return "PROXY 192.168.10.100:3128; DIRECT"; }

or if you have hosts that you'd like to bypass:

function FindProxyForURL(url,host) {

if (
(isInNet(host,"10.10.1.0","255.255.255.0")) ||
(isInNet(host,"10.100.0.0","255.255.0.0")) ||
(isInNet(host,"192.168.10.0","255.255.255.0")) ||
(dnsDomainIs(host, ".bypassed_url.com")) ||
(isInNet(host,"127.0.0.0","255.255.255.0"))
)
return "DIRECT";
else
return "PROXY 192.168.10.100:3128; DIRECT"; }

I wrote this up on a blog post a long time ago (I don't maintain it
much anymore):

http://sysadminhell.blogspot.com/2009/03/proxy-pac-files-how-to-use-with-laptops.html

Hope this helps.

Seth



On Tue, Aug 10, 2010 at 7:08 AM, James Rankin <[email protected]> wrote:
> Anyone have a link to a nice step-by-step procedure for setting up a
> proxy.pac file for IE to deliver a proxy internally and go direct
> externally? I'm trying to explain the process to a friend of mine with his
> own business and we're getting kind of lost as he's not very
> technical...he's just going to store the proxy.pac files local to his users'
> laptops, so there's no need for any complex stuff involving web servers.
>
> I've been Googling about and all the articles I can find seem to be old or
> convoluted....is there a link to a nice MS procedure somewhere I'm missing,
> or any such like?
>
> TIA,
>
>
>
> JRR
>

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to