mind our own business re: container tab proxy settings

This commit is contained in:
idk
2021-07-07 15:12:59 -04:00
parent e013c093d8
commit 3d39e75ffd
2 changed files with 13 additions and 3 deletions

View File

@@ -126,8 +126,15 @@ var handleContextProxyRequest = async function (requestDetails) {
} else if (context.name == torrentpref) {
proxy = btProxy();
return proxy;
}else if (context.name == mailpref) {
return proxy;
}else if (context.name == tunnelpref) {
return proxy;
}else if (context.name == muwirepref) {
return proxy;
}else if (context.name == botepref) {
return proxy;
}
return proxy;
} else {
if (!routerHost(requestDetails.url)) {
if (localHost(requestDetails.url)) {
@@ -149,6 +156,8 @@ var handleContextProxyRequest = async function (requestDetails) {
host: getHost(),
port: getPort(),
};
}else{
proxy = null;
}
if (requestDetails.url.includes("rpc")) {
console.log("(proxy for rpc url)", rpc);

View File

@@ -120,7 +120,7 @@ var contextSetup = function (requestDetails) {
function onContextError() {
console.error("Context launcher error");
}
async function forceIntoIsolation(tabId, contextidentifier, tab) {
async function forceIntoIsolation(tabId, contextidentifier, tab, pin = true) {
console.info(
"(isolate) forcing context for",
tabId,
@@ -158,6 +158,7 @@ var contextSetup = function (requestDetails) {
active: true,
cookieStoreId: context[0].cookieStoreId,
url: requestDetails.url,
pinned: pin,
});
created.then(onCreated, onContextError);
}
@@ -176,7 +177,7 @@ var contextSetup = function (requestDetails) {
var context = await browser.contextualIdentities.query({
name: titlepref,
});
return forceIntoIsolation(tabId, titlepref, tab);
return forceIntoIsolation(tabId, titlepref, tab, false);
} catch (error) {
console.error("(isolate)Context Error", error);
}