MozillaVPN Integration

This commit is contained in:
Lesley Norton
2021-10-20 12:52:41 -05:00
parent de80fe9050
commit 1c0f2d8c5c
19 changed files with 2656 additions and 394 deletions
+11 -3
View File
@@ -186,12 +186,20 @@ window.assignManager = {
async handleProxifiedRequest(requestInfo) {
// The following blocks potentially dangerous requests for privacy that come without a tabId
if(requestInfo.tabId === -1)
return Utils.getBogusProxy();
// Dupe of Utils.DEFAULT_PROXY, which was occasionally and unreliably
// not being found on startup and causing significant UI grief.
if(requestInfo.tabId === -1) {
return {
value: Object.freeze({type: "direct"}),
writable: false,
enumerable: true,
configurable: false
};
}
const tab = await browser.tabs.get(requestInfo.tabId);
const proxy = await proxifiedContainers.retrieveFromBackground(tab.cookieStoreId);
return proxy;
},