diff --git a/proxy.js b/proxy.js index 8194134..fef18e0 100644 --- a/proxy.js +++ b/proxy.js @@ -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); diff --git a/scrub.js b/scrub.js index 627c639..26b9ccf 100644 --- a/scrub.js +++ b/scrub.js @@ -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); }