Skip to content

Inconsistency: Proxy Bypass list #339

@erosman

Description

@erosman

Inconsistency in application of Bypass list to PAC scripts

  • In Firefox passthrough applies to individual proxy settings as well as autoConfigUrl
  • In Chrome bypassList applies to individual proxy settings but NOT pacScript

The global Bypass list that applies to both individual proxies and PAC script is more functional and useable.
N.B. Other browsers have not been checked.

rules has a bypassList property.

const config = {
  mode: "fixed_servers",
  rules: {
    proxyForHttp: {
      scheme: "socks5",
      host: "1.2.3.4"
    },
    bypassList: ["foobar.com"]
  }
};

pacScript doesn't have a bypassList property. Adding it will solve the issue.

const config = {
  mode: "pac_script",
  pacScript: {
    data: "function FindProxyForURL(url, host) {\n" +
          "  if (host == 'foobar.com')\n" +
          "    return 'PROXY blackhole:80';\n" +
          "  return 'DIRECT';\n" +
          "}",
    bypassList: ["foobar.com"]  // <- add bypassList
  }
};

proxy.json

{
"id": "ProxyRules",
  "type": "object",
  "description": "An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'fallbackProxy'.",
  "properties": {
    "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (that is http, https, and ftp)."},
    "proxyForHttp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTP requests."},
    "proxyForHttps": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTPS requests."},
    "proxyForFtp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for FTP requests."},
    "fallbackProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for everthing else or if any of the specific proxyFor... is not specified."},
    "bypassList": {"type": "array", "items": {"type": "string"}, "optional": true, "description": "List of servers to connect to without a proxy server."}
  }
},
{
  "id": "PacScript",
  "type": "object",
  "description": "An object holding proxy auto-config information. Exactly one of the fields should be non-empty.",
  "properties": {
    "url": {"type": "string", "optional": true, "description": "URL of the PAC file to be used."},
    "data": {"type": "string", "optional": true, "description": "A PAC script."},
    "mandatory": {"type": "boolean", "optional": true, "description": "If true, an invalid PAC script will prevent the network stack from falling back to direct connections. Defaults to false."}
  }
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    inconsistencyInconsistent behavior across browsers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions