Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


PAC file Exception

Posted on 2009-12-29
Medium Priority
Last Modified: 2013-12-08
Hi Expert s
I am currently managing a network a network that consist of three sites(A,B,C) that are connected by an mpls link. i have deployed two proxy. One proxy in site A and the second proxy in site B.
I need to write a pac file that perform the following tasks
for users that are in site A subnet i want them to use proxy 1 ( port 80 ) and they should failover to proxy 2: port 80 in case proxy 1 is not active
for users that are in site B subnet i want them to use proxy 2: port 80 and they should failover to proxy 1 ( port 80 ) for users that are in site B subnet i want them to use proxy 2: port 80 and they should failover to proxy 1 ( port 80 )  in case proxy2 is not active in case proxy2 is not active
At the same time i want user to bypass the prxy in the following cases
If URL has no dots in host name and If IP address is internal or hostname resolves to internal IP send direct.

Question by:mzhaim
1 Comment
LVL 57

Accepted Solution

giltjr earned 2000 total points
ID: 26149337
Obviously I can't test this so there are most likely (like 100% for sure) issues with the following, but this should get you started:

function FindProxyForURL(url, host)
       if (isPlainHostName(host) ||
        (host == "") ||
        (isInNet(host, "",  "")) ||
        (isInNet(host, "",  "")) ||
            (isInNet(host, "",  "")) ||
            (isInNet(host, dnsResolve("") ,  ""))
            (isInNet(host, dnsResolve("") ,  ""))
            (isInNet(host, dnsResolve("") ,  "")))
      return "DIRECT" ;
            if (isInNet(myIpAddress(), "",  ""))
                  return "PROXY ; PROXY";
            if (isInNet(myIpAddress(), "",  "") ||
                  isInNet(myIpAddress(), "",  ""))
                        return "PROXY ; PROXY ";

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
When you put your credit card number into a website for an online transaction, surely you know to look for signs of a secure website such as the padlock icon in the web browser or the green address bar.  This is one way to protect yourself from oth…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question