From 65e43abe02dbb785f2a27c7099da80d3745d118d Mon Sep 17 00:00:00 2001 From: idk Date: Fri, 28 May 2021 14:20:57 -0400 Subject: [PATCH 1/8] Remove a whole bunch of redundant code related to forcing a contextual identity to it's own function. Only Snark(Due to X-I2P-Torrentlocation) needs it's own isolator now, everybody else can use the same one. Makes it easier to add new contexts. --- content.js | 1 - i2pcontrol/i2pcontrol.js | 2 +- i2ppb@eyedeekay.github.io.xpi.torrent | Bin 2485 -> 2485 bytes index.html | 2 +- releases.atom | 43 +-- scrub.js | 385 ++++++-------------------- torrent/index.html | 2 +- 7 files changed, 108 insertions(+), 327 deletions(-) diff --git a/content.js b/content.js index 9dd7b40..565f7fb 100644 --- a/content.js +++ b/content.js @@ -90,4 +90,3 @@ fetch("http://127.0.0.1:7657/jsonrpc/") var toopieLinks = document.querySelectorAll(".window-visit-toopie"); hide(toopieLinks); }); - diff --git a/i2pcontrol/i2pcontrol.js b/i2pcontrol/i2pcontrol.js index 703410a..cdb11d9 100644 --- a/i2pcontrol/i2pcontrol.js +++ b/i2pcontrol/i2pcontrol.js @@ -404,7 +404,7 @@ function Done(output) { if (output == hello) { var toopieLinks = document.querySelectorAll(".window-visit-toopie"); unhide(toopieLinks); - }else{ + } else { var toopieLinks = document.querySelectorAll(".window-visit-toopie"); hide(toopieLinks); } diff --git a/i2ppb@eyedeekay.github.io.xpi.torrent b/i2ppb@eyedeekay.github.io.xpi.torrent index 0db1b38cd885507c95596d31331292a23a3c5a96..8cd26301d5e13ae981d5551d81ca87905c858583 100644 GIT binary patch delta 561 zcmV-10?z%l6SWht;07}>G&eCfFl974X>Mk3WHvf%Wo~D5XlXVuH8n6cH)S+BZeeX@ zGc`JCGH`HWEif)IFg25$2^f9MIs}rSQYP+v*p4>83?uE_bRz8TeyF5i{kt? za>zk=2rau%G{&zY?f1}{1NT9G3@pn=3zV-`L9SPVk^K*Cdq8X5qqu-M(_g_I>f3SH zk#Ictb8B*meS=^Dz3b%5B_xHEqc+FtIVw!Qa-~VHAlO+R;248@tY1XLNzv0 zh|Jw63v delta 561 zcmV-10?z%l6SWht;07}=G&ndhG-Wh8X>Mk3WHvf%Wo~D5XlXVvIWjdhIb}3DZeeX@ zGc`JCGH`HWEif)IFf)^!2^f1(wL9IrBeBB1kuc5)5_6bx_nbr%4K;BYB215097DWF)7e0Ku zU$e8c__Smj>^98|Q1W$SAD=HqGbY3A5BlwGI}l9V5T8-X!X~swF_AM9nR|c2E4%Cm z#eS;>N(Xm;)Q7^5|8_a8j{j4RNj*gxm*G{uO}26`!UZ}77_h|saOPB diff --git a/index.html b/index.html index 3a30a18..41bcbd1 100644 --- a/index.html +++ b/index.html @@ -57,7 +57,7 @@ Clearnet Bittorrent network(With a web seed to support it in case one goes dead).

diff --git a/releases.atom b/releases.atom index 1a27f9d..43c75cc 100644 --- a/releases.atom +++ b/releases.atom @@ -4,13 +4,33 @@ Release notes from I2P-in-Private-Browsing-Mode-Firefox - 2021-05-26T16:57:41Z + 2021-05-26T22:32:58Z + + tag:github.com,2008:Repository/169256012/0.105 + 2021-05-27T20:19:35Z + + 0.105 + + <p>Browsing to a single contextual identity, thus creating an I2P in Private<br> +Browsing mode. It requires the use of a pre-installed I2P Router.<br> +i2psetproxy.js (0.105-1) UNRELEASED; urgency=low</p> +<ul> +<li>Add help page for configuring i2pcontrol</li> +<li>Add help page for configuring i2psnark-rpc</li> +<li>Update the icons</li> +</ul> +<p>-- idk <a href="mailto:hankhill19580@gmail.com">hankhill19580@gmail.com</a> Wed, 26 May 2021 12:56:56 -0400</p> +<p>i2psetproxy.js (0.103-1) UNRELEASED; urgency=low</p> + + eyedeekay + + + tag:github.com,2008:Repository/169256012/0.103 2021-05-26T16:59:28Z 0.103 - <p>A simple plugin for configuring a Firefox based web browser to isolate I2P<br> Browsing to a single contextual identity, thus creating an I2P in Private<br> Browsing mode. It requires the use of a pre-installed I2P Router.<br> @@ -180,23 +200,4 @@ i2psetproxy.js (0.87-1) UNRELEASED; urgency=low</p> - - tag:github.com,2008:Repository/169256012/0.85 - 2020-11-11T06:44:44Z - - 0.85 - <p>A simple plugin for configuring a Firefox based web browser to isolate I2P<br> -Browsing to a single contextual identity, thus creating an I2P in Private<br> -Browsing mode. It requires the use of a pre-installed I2P Router.<br> -i2psetproxy.js (0.85-1) UNRELEASED; urgency=low</p> -<ul> -<li>Fix a bug which was causing i2psnark to fail to isolate.</li> -</ul> -<p>-- idk <a href="mailto:hankhill19580@gmail.com">hankhill19580@gmail.com</a> Sat, 10 NOV 2020 1:33:50 -0400</p> -<p>i2psetproxy.js (0.83-1) UNRELEASED; urgency=low</p> - - eyedeekay - - - diff --git a/scrub.js b/scrub.js index 4a162a8..627c639 100644 --- a/scrub.js +++ b/scrub.js @@ -118,143 +118,93 @@ var notMyContextNotMyProblem = async function () { var contextSetup = function (requestDetails) { function onContextError() { - console.log("Context launcher error"); + console.error("Context launcher error"); + } + async function forceIntoIsolation(tabId, contextidentifier, tab) { + console.info( + "(isolate) forcing context for", + tabId, + contextidentifier, + tab + ); + try { + var context = await browser.contextualIdentities.query({ + name: contextidentifier, + }); + if (tabId.cookieStoreId != context[0].cookieStoreId) { + function Create() { + function onCreated(tab) { + function closeOldTab() { + if (tabId.id != tab.id) { + console.log( + "(isolate) Closing un-isolated tab", + tabId.id, + "in favor of", + tab.id, + "with context", + tab.cookieStoreId + ); + browser.tabs.remove(tabId.id); + } + browser.pageAction.setPopup({ + tabId: tabId.id, + popup: "security.html", + }); + browser.pageAction.show(tabId.id); + } + closeOldTab(tab); + } + var created = browser.tabs.create({ + active: true, + cookieStoreId: context[0].cookieStoreId, + url: requestDetails.url, + }); + created.then(onCreated, onContextError); + } + var gettab = browser.tabs.get(tabId.id); + gettab.then(Create, onContextError); + return tabId; + } + } catch (error) { + console.error("(isolate)Context Error", error); + } } - //console.log("(isolate)Forcing I2P requests into context"); try { var i2pTabFind = async function (tabId) { + console.info("(isolate)Context Discovery browser"); try { var context = await browser.contextualIdentities.query({ name: titlepref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - function Create() { - function onCreated(tab) { - function closeOldTab() { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - } - browser.pageAction.setPopup({ - tabId: tabId.id, - popup: "security.html", - }); - browser.pageAction.show(tabId.id); - } - closeOldTab(tab); - } - var created = browser.tabs.create({ - active: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } + return forceIntoIsolation(tabId, titlepref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var routerTabFind = async function (tabId) { + console.info("(isolate)Context Discovery console"); try { var context = await browser.contextualIdentities.query({ name: routerpref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - if (requestDetails.url.endsWith("xhr1.html")) { - hostname = url.split("/")[2]; - let prefix = url.substr(0, url.indexOf("://") + 3); - requestDetails.url = prefix + hostname + "/home"; - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } + return forceIntoIsolation(tabId, routerpref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var i2ptunnelTabFind = async function (tabId) { + console.info("(isolate)Context Discovery browser"); try { var context = await browser.contextualIdentities.query({ name: tunnelpref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - if (requestDetails.url.endsWith("xhr1.html")) { - hostname = url.split("/")[2]; - let prefix = url.substr(0, url.indexOf("://") + 3); - requestDetails.url = prefix + hostname + "/i2ptunnelmgr/"; - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } + return forceIntoIsolation(tabId, tunnelpref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var snarkTabFind = async function (tabId) { + console.info("(isolate)Context Discovery torrents"); try { var context = await browser.contextualIdentities.query({ name: torrentpref, @@ -271,9 +221,14 @@ var contextSetup = function (requestDetails) { function onCreated(tab) { function closeOldTab(tabs) { if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); + console.log( + "(isolate) Closing un-isolated tab", + tabId.id, + "in favor of", + tab.id, + "with context", + tab.cookieStoreId + ); browser.tabs.remove(tabId.id); browser.tabs.move(tab.id, { index: 0 }); } @@ -310,232 +265,58 @@ var contextSetup = function (requestDetails) { } }; var muwireTabFind = async function (tabId) { + console.info("(isolate)Context Discovery muwire"); try { var context = await browser.contextualIdentities.query({ name: muwirepref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - if (requestDetails.url.endsWith("xhr1.html")) { - hostname = url.split("/")[2]; - let prefix = url.substr(0, url.indexOf("://") + 3); - requestDetails.url = prefix + hostname + "/muwire/"; - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } + return forceIntoIsolation(tabId, muwirepref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var i2pboteTabFind = async function (tabId) { + console.info("(isolate)Context Discovery bote"); try { var context = await browser.contextualIdentities.query({ name: botepref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - if (requestDetails.url.endsWith("xhr1.html")) { - hostname = url.split("/")[2]; - let prefix = url.substr(0, url.indexOf("://") + 3); - requestDetails.url = prefix + hostname + "/i2pbote/"; - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } + return forceIntoIsolation(tabId, botepref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var mailTabFind = async function (tabId) { + console.info("(isolate)Context Discovery mail"); try { var context = await browser.contextualIdentities.query({ name: mailpref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - if (requestDetails.url.endsWith("xhr1.html")) { - hostname = url.split("/")[2]; - let prefix = url.substr(0, url.indexOf("://") + 3); - requestDetails.url = prefix + hostname + "/webmail/"; - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } + return forceIntoIsolation(tabId, mailpref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var ircTabFind = async function (tabId) { + console.info("(isolate)Context Discovery irc"); try { var context = await browser.contextualIdentities.query({ name: ircpref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - if (requestDetails.url.includes(":7669")) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } - } + return forceIntoIsolation(tabId, ircpref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var blogTabFind = async function (tabId) { + console.info("(isolate)Context Discovery blog"); try { var context = await browser.contextualIdentities.query({ name: blogpref, }); - if (tabId.cookieStoreId != context[0].cookieStoreId) { - if (requestDetails.url.includes(":8084")) { - function Create() { - function onCreated(tab) { - function closeOldTab(tabs) { - if (tabId.id != tab.id) { - console.log("(isolate) Closing un-isolated tab", tabId.id); - console.log("in favor of", tab.id); - console.log("with context", tab.cookieStoreId); - browser.tabs.remove(tabId.id); - browser.tabs.move(tab.id, { index: 0 }); - } - for (index = 0; index < tabs.length; index++) { - if (index != tabs.length - 1) - browser.tabs.remove(tabs[index].id); - } - } - var pins = browser.tabs.query({ - cookieStoreId: context[0].cookieStoreId, - }); - pins.then(closeOldTab, onError); - } - var created = browser.tabs.create({ - active: true, - pinned: true, - cookieStoreId: context[0].cookieStoreId, - url: requestDetails.url, - }); - created.then(onCreated, onContextError); - } - var gettab = browser.tabs.get(tabId.id); - gettab.then(Create, onContextError); - return tabId; - } - } + return forceIntoIsolation(tabId, blogpref, tab); } catch (error) { - console.log("(isolate)Context Error", error); + console.error("(isolate)Context Error", error); } }; var tabGet = async function (tabId) { diff --git a/torrent/index.html b/torrent/index.html index 7feb109..2f76ba6 100644 --- a/torrent/index.html +++ b/torrent/index.html @@ -6,7 +6,7 @@ -

Acknowledgement

+

Acknowledgementindex

Many, many thanks to the Transmitter webextension.

From 5b51fc2c272d78518435da3e3a140e9679327d8f Mon Sep 17 00:00:00 2001 From: idk Date: Mon, 31 May 2021 15:09:23 -0400 Subject: [PATCH 2/8] add variant extension name --- _locales/en/messages.json | 4 ++++ _locales/es/messages.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f6064da..b233334 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -3,6 +3,10 @@ "message": "I2P In Private Browsing", "description": "Name of the extension." }, + "extensionNameVariant": { + "message": "I2P In Private Browsing - Rhizome Variant", + "description": "Name of the extension." + }, "toopieName": { "message": "toopie.html", "description": "Name of the sidebar." diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 833bf89..9688e49 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -3,6 +3,10 @@ "message": "I2P en navegación privada", "description": "Nombre de la extensión." }, + "extensionNameVariant": { + "message": "I2P en navegación privada - Rhizome", + "description": "Nombre de la extensión." + }, "toopieName": { "message": "toopie.html", "description": "Nombre de la barra lateral." From e013c093d87f44499985c828b0e5d77431fc6e66 Mon Sep 17 00:00:00 2001 From: idk Date: Mon, 31 May 2021 17:19:42 -0400 Subject: [PATCH 3/8] Upgrade the version number to build a rhizome --- Makefile | 6 +++--- _locales/en/messages.json | 2 +- _locales/es/messages.json | 2 +- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d5599e2..a72c74c 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,11 @@ clean: rc clean-artifacts ## EVEN RELEASES are AMO RELEASES ## ODD RELEASES are SELFHOSTED RELEASES -MOZ_VERSION=0.106 -VERSION=0.105 +MOZ_VERSION=0.108 +VERSION=0.107 ## INCREMENT THIS EVERY TIME YOU DO A RELEASE -LAST_VERSION=0.103 +LAST_VERSION=0.105 YELLOW=F7E59A ORANGE=FFC56D diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b233334..a4b2933 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -20,7 +20,7 @@ "description": "Description of the extension." }, "extensionVersion": { - "message": "0.105", + "message": "0.107", "description": "Version of the extension." }, "proxyFailedStatus": { diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 9688e49..780e744 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -20,7 +20,7 @@ "description": "Descripción de la extensión." }, "extensionVersion": { - "message": "0,105", + "message": "0,107", "description": "Versión de la extensión." }, "proxyFailedStatus": { diff --git a/manifest.json b/manifest.json index 36029cc..0a0aba3 100644 --- a/manifest.json +++ b/manifest.json @@ -27,7 +27,7 @@ ], "manifest_version": 2, "name": "__MSG_extensionName__", - "version": "0.105", + "version": "0.107", "description": "__MSG_extensionDescription__", "homepage_url": "https://github.com/eyedeekay/I2P-in-Private-Browsing-Mode-Firefox", "icons": { From 3d39e75ffd2da3993e52606e3ea3b8bc33b9e75c Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 7 Jul 2021 15:12:59 -0400 Subject: [PATCH 4/8] mind our own business re: container tab proxy settings --- proxy.js | 11 ++++++++++- scrub.js | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) 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); } From daaebe027d2f120972a983e988b133e3660c0f84 Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 7 Jul 2021 15:15:45 -0400 Subject: [PATCH 5/8] add missing names to proxy.js --- proxy.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/proxy.js b/proxy.js index fef18e0..687793a 100644 --- a/proxy.js +++ b/proxy.js @@ -1,10 +1,13 @@ var titlepref = chrome.i18n.getMessage("titlePreface"); var webpref = chrome.i18n.getMessage("webPreface"); -var ircpref = chrome.i18n.getMessage("ircPreface"); -var torrentpref = chrome.i18n.getMessage("torrentPreface"); var routerpref = chrome.i18n.getMessage("routerPreface"); -var routerprefpriv = chrome.i18n.getMessage("routerPrefacePrivate"); +var mailpref = chrome.i18n.getMessage("mailPreface"); +var torrentpref = chrome.i18n.getMessage("torrentPreface"); +var tunnelpref = chrome.i18n.getMessage("i2ptunnelPreface"); var ircpref = chrome.i18n.getMessage("ircPreface"); +var extensionpref = chrome.i18n.getMessage("extensionPreface"); +var muwirepref = chrome.i18n.getMessage("muwirePreface"); +var botepref = chrome.i18n.getMessage("botePreface"); var blogpref = chrome.i18n.getMessage("blogPreface"); var blogprefpriv = chrome.i18n.getMessage("blogPrefacePrivate"); From 00fd0aed62f3fdf436dea28a27be2a1788227c90 Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 7 Jul 2021 21:28:06 -0400 Subject: [PATCH 6/8] fmt-prettier --- proxy.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proxy.js b/proxy.js index 687793a..1b5cc16 100644 --- a/proxy.js +++ b/proxy.js @@ -129,13 +129,13 @@ var handleContextProxyRequest = async function (requestDetails) { } else if (context.name == torrentpref) { proxy = btProxy(); return proxy; - }else if (context.name == mailpref) { + } else if (context.name == mailpref) { return proxy; - }else if (context.name == tunnelpref) { + } else if (context.name == tunnelpref) { return proxy; - }else if (context.name == muwirepref) { + } else if (context.name == muwirepref) { return proxy; - }else if (context.name == botepref) { + } else if (context.name == botepref) { return proxy; } } else { @@ -159,7 +159,7 @@ var handleContextProxyRequest = async function (requestDetails) { host: getHost(), port: getPort(), }; - }else{ + } else { proxy = null; } if (requestDetails.url.includes("rpc")) { From 199e6577bb60eb56caf7c687bc939d21930fcb2f Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 7 Jul 2021 21:30:34 -0400 Subject: [PATCH 7/8] bump version --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a72c74c..1f33148 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,11 @@ clean: rc clean-artifacts ## EVEN RELEASES are AMO RELEASES ## ODD RELEASES are SELFHOSTED RELEASES -MOZ_VERSION=0.108 -VERSION=0.107 +MOZ_VERSION=0.110 +VERSION=0.109 ## INCREMENT THIS EVERY TIME YOU DO A RELEASE -LAST_VERSION=0.105 +LAST_VERSION=0.107 YELLOW=F7E59A ORANGE=FFC56D From a7902632bcf870170dfa5d67934f17571a49401b Mon Sep 17 00:00:00 2001 From: idk Date: Wed, 7 Jul 2021 21:40:53 -0400 Subject: [PATCH 8/8] Un-bump version, fix some issues with internationalization on releases --- Makefile | 14 +++++++------- debian/changelog | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1f33148..49dcafb 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,11 @@ clean: rc clean-artifacts ## EVEN RELEASES are AMO RELEASES ## ODD RELEASES are SELFHOSTED RELEASES -MOZ_VERSION=0.110 -VERSION=0.109 +MOZ_VERSION=0.108 +VERSION=0.107 ## INCREMENT THIS EVERY TIME YOU DO A RELEASE -LAST_VERSION=0.107 +LAST_VERSION=0.105 YELLOW=F7E59A ORANGE=FFC56D @@ -98,15 +98,15 @@ version: sed -i 's|7647|7657|g' *.js* torrent/*.js* sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)\",|g' manifest.json # sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(VERSION)\",|g' manifest.json - sed -si 's|$(shell grep $(LAST_VERSION) _locales/en/messages.json)| "message": "$(VERSION)",|g' _locales/en/messages.json; true - sed -si 's|$(shell grep $(MOZ_VERSION) _locales/en/messages.json)| "message": "$(VERSION)",|g' _locales/en/messages.json; true + find . -name 'messages.json' -exec sed -i 's|$(LAST_VERSION)|$(VERSION)|g' {} \; + find . -name 'messages.json' -exec sed -i 's|$(MOZ_VERSION)|$(VERSION)|g' {} \; moz-version: sed -i 's|7647|7657|g' *.js* torrent/*.js* sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(MOZ_VERSION)\",|g' manifest.json # sed -i 's|$(shell grep "\"version_name\": " manifest.json)| \"version_name\": \"$(MOZ_VERSION)\",|g' manifest.json - sed -si 's|$(shell grep $(LAST_VERSION) _locales/en/messages.json)| "message": "$(MOZ_VERSION)",|g' _locales/en/messages.json; true - sed -si 's|$(shell grep $(VERSION) _locales/en/messages.json)| "message": "$(MOZ_VERSION)",|g' _locales/en/messages.json; true + find . -name 'messages.json' -exec sed -i 's|$(LAST_VERSION)|$(MOZ_VERSION)|g' {} \; + find . -name 'messages.json' -exec sed -i 's|$(VERSION)|$(MOZ_VERSION)|g' {} \; rhz-version: sed -i 's|$(shell grep "\"version\": " manifest.json)| \"version\": \"$(VERSION)1\",|g' manifest.json diff --git a/debian/changelog b/debian/changelog index 5bc379c..8ad1a04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +i2psetproxy.js (0.107-1) UNRELEASED; urgency=low + + * Small code fixes + * Fix for interference with non-I2P containers + + -- idk Wed, 26 May 2021 12:56:56 -0400 + i2psetproxy.js (0.105-1) UNRELEASED; urgency=low * Add help page for configuring i2pcontrol