Sun Java System Portal Server Secure Remote Access 7.2 管理指南

使用自動代理伺服器配置

要忽略 [網域與子網域的代理伺服器] 清單中的資訊,請啟用 [自動代理伺服器配置] 功能。

使用自動代理伺服器配置 (Proxy Auto Configuration, PAC) 檔案時:

使用範例 PAC 檔案

下列範例顯示列在 [網域與子網域的代理伺服器] 清單中的 URL 和對應的 PAC 檔案。

含有傳回 DIRECT 或 NULL 的範例

如果將這些代理伺服器用於網域與子網域:

*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

含有傳回 STARPROXY 的範例

如果將這些代理伺服器用於網域與子網域:

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

指定 PAC 檔案位置

用來指定 PAC 檔案位置的格式需視下列位置而定: