How to config atom to use PAC file in ubuntu


#1

I’m using the school network, and it has a set of complicated proxy
rules such that the proxy can only work with this PAC file. Here is a
glimpse:

// Auto-generated proxy.pac file.
// Generated by /waikato.pac for 104.14.225.184 at Fri May 27 04:02:11 2016
// zone: external network: external

function FindProxyForURL(url, host)
{
  // Strip potential trailing dot from the host name
  if (host.charAt(host.length - 1) == '.')
    host=host.substr(0,host.length - 1);
  if (isPlainHostName(host) || shExpMatch(host, "www.waikato.ac.nz") || shExpMatch(host, "www.*.waikato.ac.nz") || shExpMatch(host, "cookie.waikato.ac.nz") || shExpMatch(host, "elearn.waikato.ac.nz") || shExpMatch(host, "i.waikato.ac.nz") || shExpMatch(host, "list.waikato.ac.nz") || shExpMatch(host, "*ezproxy.waikato.ac.nz") || shExpMatch(host, "tools.its.waikato.ac.nz") || shExpMatch(host, "*print*.its.waikato.ac.nz") || shExpMatch(host, "edlinked.soe.waikato.ac.nz") || shExpMatch(host, "ivisit.soe.waikato.ac.nz") || shExpMatch(host, "mass-spec.co.nz") || shExpMatch(host, "www-mass-spec.co.nz") || shExpMatch(host, "*management.ac.nz") || shExpMatch(host, "*myweb.ac.nz") || shExpMatch(host, "baylearn.boppoly.ac.nz") || shExpMatch(host, "boppapp05.boppoly.ac.nz") || shExpMatch(host, "contacts.boppoly.ac.nz") || shExpMatch(host, "ibase.boppoly.ac.nz") || shExpMatch(host, "igress.boppoly.ac.nz") || shExpMatch(host, "webroombooking.boppoly.ac.nz") || shExpMatch(host, "netservices.boppoly.ac.nz") || shExpMatch(host, "sd.boppoly.ac.nz") || shExpMatch(host, "servicedesk.boppoly.ac.nz") || shExpMatch(host, "syllabusplus.boppoly.ac.nz") || shExpMatch(host, "thehub.boppoly.ac.nz") || shExpMatch(host, "webmail.boppoly.ac.nz") || shExpMatch(host, "aut.researchgateway.ac.nz") || shExpMatch(host, "otago.ourarchive.ac.nz") || shExpMatch(host, "unitec.researchbank.ac.nz"))
    return "DIRECT";
  else if (shExpMatch(url, "https://waikato*.lconz.ac.nz*"))
    return "PROXY proxy.waikato.ac.nz:8080";
  else if (shExpMatch(host "*.waikato.ac.nz"))
    return "PROXY proxy.waikato.ac.nz:80";
  else
    return "DIRECT";
}

Also, since I’m not allowed to install any software, I have to download the portable version (tar.gz).

How do I set up auto-config-url in atom?

apm 1.9.2

npm 2.13.3

node 0.10.40

python 2.7.6

git 1.9.1

Ubuntu 14.04.4 LTS