다음 예제는 [도메인 및 부속 도메인의 프록시] 목록과 해당하는 PAC 파일에 나열된 URL을 보여줍니다.
도메인 및 하위 도메인에 사용되는 프록시:
*intranet1.com proxy.intranet.com:8080
intranet2.com proxy.intranet1.com:8080
해당하는 PAC 파일:
// Start of the PAC File function FindProxyForURL(url, host) { if (dnsDomainIs(host, ".intranet1.com")) { return "DIRECT"; } if (dnsDomainIs(host, ".intranet2.com")) { return "PROXY proxy.intranet1.com:8080"; } return "NULL"; } //End of the PAC File |
도메인 및 하위 도메인에 사용되는 프록시:
intranet1.com
intranet2.com.proxy.intranet1.com:8080
internetproxy.intranet1.com:80
해당하는 PAC 파일:
// Start of the PAC File function FindProxyForURL(url, host) { if (dnsDomainIs(host, ".intranet1.com")) { return "DIRECT"; } if (dnsDomainIs(host, ".intranet2.com")) { return "PROXY proxy.intranet1.com:8080;" + "PROXY proxy1.intranet1.com:8080"; } return "STARPROXY internetproxy.intranet1.com:80"; } //End of the PAC File |
이 경우 요청이 .intranet2.com 도메인에 있는 호스트에 대한 것이면 게이트웨이는 proxy.intranet1.com:8080에 접속합니다. proxy.intranet1.com:8080이 다운되면 요청이 실패합니다. 게이트웨이는 페일오버하지 않고 proxy1.intranet1.com:8080에 접속합니다.