[도메인 및 부속 도메인의 프록시] 목록에 있는 정보를 무시하려면 자동 프록시 구성(PAC) 기능을 활성화합니다.
자동 프록시 구성(PAC) 파일을 사용하는 경우
Portal Server, Gateway, Netlet 및 Proxylet은 Rhino 소프트웨어를 사용하여 PAC 파일을 구문 분석합니다. SUNWrhino 패키지는 Java Enterprise System Accessory CD에서 설치할 수 있습니다.
이 패키지에는 /usr/share/lib 디렉토리에 반드시 있어야 하는 js.jar 파일이 포함되어 있습니다. 이 디렉토리를 게이트웨이 및 Portal Server 시스템의 webserver/appserver 클래스 경로에 추가합니다. 그렇지 않으면 Portal Server, Gateway, Netlet 및 Proxylet에서 PAC 파일을 구문 분석할 수 없습니다.
js.jar은 게이트웨이 컴퓨터의 $JRE_HOME/lib/ext 디렉토리에 있어야 합니다. 그렇지 않으면 게이트웨이에서 PAC 파일의 구문을 분석할 수 없습니다.
게이트웨이는 부팅 시에 게이트웨이 프로필 [자동 프록시 구성 파일] 위치 필드에 지정된 위치로부터 PAC 파일을 불러옵니다.
게이트웨이는 URLConnection API를 사용하여 이 위치에 도달합니다. 프록시가 게이트웨이에 도달하도록 구성해야 하는 경우에는 프록시를 다음과 같이 구성해야 합니다.
명령줄에서 다음 파일을 편집합니다.
/etc/opt/SUNWportal/platform.conf.gateway-profile-name
다음 항목을 추가합니다.
http.proxyHost= web-proxy-hostname
http.proxyPort= web-proxy-port
http.proxySet=true
게이트웨이를 다시 시작하여 지정된 프록시를 사용합니다.
./psadmin start-sra-instance –u amadmin – f <password file> –N <profile name>– t <gateway>
PAC 파일 초기화가 실패하면 게이트웨이는 [도메인 및 부속 도메인의 프록시] 목록에 있는 정보를 사용합니다.
PAC 파일로부터 "" (빈 문자열) 이나 "null"이 반환되면 게이트웨이에서는 호스트가 인트라넷에 속하지 않는 것으로 가정합니다. 이는 호스트가 [도메인 및 부속 도메인의 프록시] 목록에 있지 경우와 비슷합니다.
게이트웨이에서 호스트에 직접 연결되도록 하려면 "DIRECT"를 반환합니다. DIRECT 또는 NULL이 반환되는 예제를 참조하십시오.
여러 프록시가 지정되어 있으면 게이트웨이는 첫 번째 반환된 프록시만 사용합니다. 호스트에 지정된 여러 프록시에서 페일오버나 로드 균형 조정을 시도하지 않습니다.
게이트웨이는 SOCKS 프록시를 무시하고 직접 연결을 시도하면서 호스트가 인트라넷의 일부라 가정합니다.
인트라넷의 일부가 아닌 호스트에 도달하는 데 프록시를 사용하도록 지정하려면 프록시 유형 STARPROXY를 사용합니다. 이 프록시 유형은 PAC 파일 형식의 확장이며 게이트웨이 프로필에 있는 [도메인 및 하위 도메인의 프록시] 부분의 * proxyHost:port 항목과 유사합니다. STARPROXY가 반환되는 예제를 참조하십시오.
다음 예제는 [도메인 및 부속 도메인의 프록시] 목록과 해당하는 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에 접속합니다.
PAC 파일의 위치를 지정하는 형식은 다음과 같이 해당 위치에 따라 다릅니다.
PAC 파일이 웹 서버에 상주하는 경우 다음과 같이 PAC URL을 입력합니다.
http://hostname/pacfile_name .pac
PAC 파일이 로컬 파일(예: c:\\pacfile\\sample.pac)인 경우 java 1.4.1_x에 대해 다음과 같이 PAC URL을 입력합니다.
file://c:/pacfile/sample.pac
PAC 파일이 로컬 파일(예: c:\\pacfile\\sample.pac)인 경우 java 1.4.2_x에 대해 다음과 같이 PAC URL을 입력합니다.
file:///c:/pacfile/sample.pac