Merge pull request #2223 from mozilla/proxy
Use an empty object for no-proxy requests
This commit is contained in:
commit
9aeb80e6ab
3 changed files with 5 additions and 5 deletions
|
@ -188,13 +188,13 @@ window.assignManager = {
|
||||||
// The following blocks potentially dangerous requests for privacy that come without a tabId
|
// The following blocks potentially dangerous requests for privacy that come without a tabId
|
||||||
|
|
||||||
if(requestInfo.tabId === -1) {
|
if(requestInfo.tabId === -1) {
|
||||||
return {type: "direct"};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const tab = await browser.tabs.get(requestInfo.tabId);
|
const tab = await browser.tabs.get(requestInfo.tabId);
|
||||||
const result = await proxifiedContainers.retrieve(tab.cookieStoreId);
|
const result = await proxifiedContainers.retrieve(tab.cookieStoreId);
|
||||||
if (!result || !result.proxy) {
|
if (!result || !result.proxy) {
|
||||||
return {type: "direct"};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.proxy.mozProxyEnabled) {
|
if (!result.proxy.mozProxyEnabled) {
|
||||||
|
|
|
@ -1582,7 +1582,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
||||||
this.mozProxyEnabledInput.value = proxyInfo.mozProxyEnabled;
|
this.mozProxyEnabledInput.value = proxyInfo.mozProxyEnabled;
|
||||||
this.proxyAddressInput.value = `${proxyInfo.type}://${proxyInfo.host}:${proxyInfo.port}`;
|
this.proxyAddressInput.value = `${proxyInfo.type}://${proxyInfo.host}:${proxyInfo.port}`;
|
||||||
|
|
||||||
if (typeof(proxyInfo.countryCode) === "undefined" && proxyInfo.type !== "direct") {
|
if (typeof(proxyInfo.countryCode) === "undefined" && proxyInfo.type) {
|
||||||
// Set custom proxy URL below 'Advanced proxy settings' button label
|
// Set custom proxy URL below 'Advanced proxy settings' button label
|
||||||
this.advancedProxyAddress.textContent = `${proxyInfo.type}://${proxyInfo.host}:${proxyInfo.port}`;
|
this.advancedProxyAddress.textContent = `${proxyInfo.type}://${proxyInfo.host}:${proxyInfo.port}`;
|
||||||
}
|
}
|
||||||
|
@ -1948,7 +1948,7 @@ Logic.registerPanel(P_ADVANCED_PROXY_SETTINGS, {
|
||||||
};
|
};
|
||||||
|
|
||||||
const edit_proxy_dom = function(proxy) {
|
const edit_proxy_dom = function(proxy) {
|
||||||
if (proxy.type === "direct" || typeof proxy.type === "undefined" || MozillaVPN.proxyIsDisabled(proxy)) {
|
if (!proxy.type || MozillaVPN.proxyIsDisabled(proxy)) {
|
||||||
resetProxyInput();
|
resetProxyInput();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ proxifiedContainers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mozillaVpnData && mozillaVpnData.mozProxyEnabled === undefined) {
|
if (mozillaVpnData && mozillaVpnData.mozProxyEnabled === undefined) {
|
||||||
matches.groups.type = "direct";
|
matches.groups.type = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mozillaVpnData) {
|
if (!mozillaVpnData) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue