[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
// Example proxy auto-configuration function.  For further information:
// http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
// Host and domain names, etc., need to be modified to suit local requirements.
// 
// Configuration rule required in HTTPD$CONFIG:
//
//   [AddType]
//   .PAC  application/x-ns-proxy-autoconfig  -  proxy autoconfig
//
// File name needs to be something like PROXY.PAC and mapped in
// the HTTPD$MAP configuration to the root of the proxy service:
//
//   [proxy.host.name:8080]
//   pass http://* http://*
//   pass / /ht_root/local/proxy.pac
//   pass *
//
// WASD VMS Hypertext Services, Copyright (c) 1996-1999 Mark G.Daniel.
// This package (all associated programs), comes with ABSOLUTELY NO WARRANTY.
// This is free software, and you are welcome to redistribute it
// under the conditions of the GNU GENERAL PUBLIC LICENSE, version 2.
//
// 02-DEC-2014  MGD  expurgated
// 06-MAY-1999  MGD  initial, for v6.0 proxy

function FindProxyForURL(url, host)
{
   if (isPlainHostName(host) ||
       dnsDomainIs(host, ".wasd.example.com.au") ||
       dnsDomainIs(host, ".example.com.au"))
      return "DIRECT";
   else
   if (url.substring(0,5) == "http:")
      return "PROXY www.wasd.example.com.au:8080";
   else
   if (url.substring(0,4) == "ftp:")
//      return "PROXY www.wasd.example.com.au:8080";
      return "DIRECT";
   else
   if (url.substring(0,7) == "gopher:")
//      return "PROXY www.wasd.example.com.au:8080";
      return "DIRECT";
   else
   if (url.substring(0,6) == "https:" ||
       url.substring(0,6) == "snews:")
      return "PROXY www.wasd.example.com.au:8080";
   else
      return "DIRECT";
}