-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency: Proxy Bypass list #339
Comments
This isn't an API I'm familiar with but I started looking to try and understand the problem. A couple of questions:
|
Correct. However that is only a naming difference which is not as important as a difference in functionality.
Of course there are workarounds but the topic is about inconsistency. Bypass list pattern processing is already part of Chrome code but it is not applied to PAC. Furthermore, a PAC can be a remote URL, where it wont be possible to implement any workarounds. |
Thanks for the quick reply!
It seems like Chrome lets you specify the script inline, whereas Firefox requires you to point to a URL (and under a different property name)? I'm not trying to catch you out, I just want to understand the extent of the differences :)
Ah, this makes a lot of sense. I can definitely see why that's useful. So far I'm thinking the APIs are different enough that this may be two separate feature requests for the Chrome and Firefox issue trackers. Any thoughts on that? |
In Chrome, there are different properties for the above i.e. In Firefox's proxy.settings, you can use a URL or data URL, e.g. const pac = `function FindProxyForURL(url, host) { return "HTTPS 1.2.3.4:443"; }`;
const proxySettings = {
proxyType: "autoConfig",
autoConfigUrl: `data:application/x-ns-proxy-autoconfig;charset=utf-8,${encodeURIComponent(pac)}`,
};
browser.proxy.settings.set({ value: proxySettings });
The proxy process runs natively in the browsers. PAC is synchronous. For example dnsResolve() has to run synchronously. The proxy configuration runs very early, before all other request type APIs. The configuration becomes part of browser configuration (not extension configuration). The proxying would usually entail: 1- Check proxy configuration before any connection made I would imagine, step 3 could be added to the Chrome PAC handling without any major compilations. At the moment .... Chrome
Firefox
|
@oliverdunk To simplify the matter, the request is to add From: {
"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."}
}
}, Update to: {
"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."},
"bypassList": {"type": "array", "items": {"type": "string"}, "optional": true, "description": "List of servers to connect to without a proxy server."}
}
}, Obviously, the associated processes have to be updated accordingly. |
I think we're in agreement - that feels like a feature request that only applies to Chrome though, right? If so it would be great if you could open one a bug to track the feature request. Given how different these APIs are I would say it probably makes sense to close this issue once the bug is opened - I appreciate you bringing it up, but I'm not sure there is any cross-browser discussions to be had (other than agreeing on one API over the other, which feels out of scope for this particular issue). Let me know if that makes sense 😄 |
@oliverdunk TBH, it is not a feature request per se. It is an inconsistency affecting Chrome. Firefox already has this behaviour. I am also not sure how other browsers are handling the bypass list. It would be good to have a consensus on the implementation. Subsequently, this inconsistency topic can be closed. For reference: Consensus on processing the bypass list in case of single proxy, and PacScript (URL/Script) |
Thanks for the understanding, I've filed a bug here: https://bugs.chromium.org/p/chromium/issues/detail?id=1495756 I'm going to close this out but I really do appreciate the suggestion - hopefully we can make some progress on it. |
@oliverdunk Regardless of the final decision by the Chromium developers, please note the following: Concept
The purpose of this topic is to make extension development more consistent across browsers and furthermore, to demonstrate that the process works successfully in another browser. There is no conceptual difference between single proxy & PAC. PAC is simply a method to add conditions to the process.
Bypass ListWhat is fine for a single proxy, is also fine for a conditional single proxy (i.e. PAC).
Android
Android is NOT designed to work well with proxies, single or PAC. Users mostly use a VPN on Android. Nonetheless, what is fine for a single proxy, is also fine for a conditional single proxy (i.e. PAC). UI
Chrome doesn't have a UI for the bypass list for the single proxy either. Enterprise Policy
What is fine for a single proxy, is also fine for a conditional single proxy (i.e. PAC). WPAD
chrome.proxy does not have any options under |
Inconsistency in application of Bypass list to PAC scripts
passthrough
applies to individual proxy settings as well asautoConfigUrl
bypassList
applies to individual proxy settings but NOTpacScript
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 abypassList
property.pacScript
doesn't have abypassList
property. Adding it will solve the issue.proxy.json
The text was updated successfully, but these errors were encountered: