sample PAC file - Tahaan/proxymanager GitHub Wiki

  1. Copy the below code to a text file.
  2. Edit the Network address and Mask to match your requirements.
  3. Check and update the Proxy server and port returned.
  4. Save the file, eg ~/.mozilla/proxy.pac
  5. Configure Firefox to use this file as PAC file by entering the file path in the Automatic Proxy Configuration URL under the Connection Settings.
function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(), "172.18.0.0", "255.255.0.0"))
  return "PROXY localhost:3128";
else
  return "DIRECT";
}

Notes:

  1. The format for the Proxy Auto Configuration URL file path is: file:///home/username/.mozilla/proxy.pac

  2. The PAC file is not automatically read when it is changed, you need to manually "Reload" the file from the Connection Settings screen.

  3. Errors in this file causes the PAC file to be silently ignored and a DIRECT connection will then be attempted.

⚠️ **GitHub.com Fallback** ⚠️