// 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";
}
