diff --git a/Makefile b/Makefile index 93af3d0..4bb7063 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.98 -VERSION=0.97 +MOZ_VERSION=0.100 +VERSION=0.99 ## INCREMENT THIS EVERY TIME YOU DO A RELEASE -LAST_VERSION=0.95 +LAST_VERSION=0.97 YELLOW=F7E59A ORANGE=FFC56D diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d2a31df..0475cf3 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -16,7 +16,7 @@ "description": "Description of the extension." }, "extensionVersion": { - "message": "0.77", + "message": "0.99", "description": "Version of the extension." }, "proxyFailedStatus": { diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 0e8a991..f1e0835 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -16,7 +16,7 @@ "description": "Descripción de la extensión." }, "extensionVersion": { - "message": "0,77", + "message": "0,99", "description": "Versión de la extensión." }, "proxyFailedStatus": { diff --git a/background.js b/background.js index c2364e4..43d96d2 100644 --- a/background.js +++ b/background.js @@ -464,20 +464,37 @@ browser.webRequest.onHeadersReceived.addListener( function onClosedWindowCheck() { var getContext = browser.contextualIdentities.query({ name: titlepref }); function checkTabs(ctx) { - function conditionallyDelete(tabs) { - if (tabs.length == 0) { - browser.contextualIdentities.remove(ctx[0].cookieStoreId); - browser.contextualIdentities - .query({}) - .then(onContextsGot, onContextsError); + for (let context in ctx) { + function conditionallyDelete(tabs) { + if (tabs.length == 0) { + browser.contextualIdentities.remove(context.cookieStoreId); + } } + var tabs = browser.tabs.query({ cookieStoreId: context.cookieStoreId }); + tabs.then(conditionallyDelete, onError); } - var tabs = browser.tabs.query({ cookieStoreId: ctx[0].cookieStoreId }); - tabs.then(conditionallyDelete, onError); } getContext.then(checkTabs, onError); } +function onOpenedWindowCheck() { + var getContext = browser.contextualIdentities.query({ name: titlepref }); + function checkTabs(ctx) { + for (let context in ctx) { + function conditionallyDelete(tabs) { + if (tabs.length == 0) { + browser.contextualIdentities.remove(context.cookieStoreId); + } + } + var tabs = browser.tabs.query({ cookieStoreId: context.cookieStoreId }); + tabs.then(conditionallyDelete, onError); + } + } + getContext.then(checkTabs, onError); +} + +onOpenedWindowCheck(); + browser.tabs.onRemoved.addListener(onClosedWindowCheck); browser.windows.onRemoved.addListener(onClosedWindowCheck); -browser.windows.onCreated.addListener(onClosedWindowCheck); +browser.windows.onCreated.addListener(onOpenedWindowCheck); diff --git a/content.js b/content.js index e19c3ba..10f3884 100644 --- a/content.js +++ b/content.js @@ -51,3 +51,28 @@ contentUpdateById("releases", "releases"); fetch("http://proxy.i2p").then((myJson) => { contentUpdateById("proxy-check", "proxySuccessStatus"); }); + +function hide(elements) { + elements = elements.length ? elements : [elements]; + for (var index = 0; index < elements.length; index++) { + elements[index].style.display = "none"; + } +} + +function unhide(elements) { + elements = elements.length ? elements : [elements]; + for (var index = 0; index < elements.length; index++) { + elements[index].style.display = "inline-block"; + } +} + +//TODO: Don't hard-code this. +fetch("http://127.0.0.1:7657/themes/console/light/images/i2plogo.png") + .then((myJson) => { + var consoleLinks = document.querySelectorAll(".application-info"); + unhide(consoleLinks); + }) + .catch((error) => { + var consoleLinks = document.querySelectorAll(".application-info"); + hide(consoleLinks); + }); diff --git a/handler.js b/handler.js index ce2400c..4f90201 100644 --- a/handler.js +++ b/handler.js @@ -19,8 +19,10 @@ function routerHost(url) { console.log("(urlcheck) Torrent application path", final); return "i2psnark"; } else if (final === "webmail" || final === "susimail") { - console.log("(urlcheck) Mail application path", final); - return "webmail"; + if (!url.includes(".css")) { + console.log("(urlcheck) Mail application path", final); + return "webmail"; + } } else if (final.startsWith("MuWire")) { if (!url.includes(".png")) { console.log("(urlcheck) MuWire application path", final); diff --git a/home.css b/home.css index 80bcd90..2eb5b38 100644 --- a/home.css +++ b/home.css @@ -353,5 +353,6 @@ video { } .hidden { + visibility: none; display: none } \ No newline at end of file diff --git a/home.html b/home.html index ec90c62..e69de29 100644 --- a/home.html +++ b/home.html @@ -1,151 +0,0 @@ - - - - - - - - - - - - - -
-
-
-

I2P Browsing

-
- -
-
- -
-

I2P in Private Browsing is a webextension to secure and enhance your I2P use in the browser.

- -

This is an experimental product.

-
- -
- - - -
- Proxy is not ready. Proxy is ready. -
-
- -
-

New to I2P? Learn more here.

- -

-

- -

I2P Browser allows you to surf the internet using the private and secure I2P network. When using it, you are protected against tracking, surveillance, and censorship as a first-class participant in the I2P network. I2P Browser isolates cookies and deletes your browser history after your session. These modifications ensure your privacy and security are protected in the browser.

- -

-

- -

We also provide you with additional settings for bumping up your browser security. Our Security Settings allow you to block elements that could be used to attack your computer. Click below to see what the different options do. Note: By default, NoScript and HTTPS Everywhere are not included on the toolbar, but you can customize your toolbar to add them. With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.

- -

-

- -

I2P is capable of using peer-to-peer applications like BitTorrent, protecting your identity when you share files. Our anonymous bittorrent client is available in the browser.

- -

-

- -

There is also an anonymous e-mail service available inside of I2P, which is accessible from our browser via the menu directly below.

- -

-

- -

With all the security and privacy features provided by I2P, your experience while browsing the internet may be a little different. Things may be a bit slower, and depending on your security level, some elements may not work or load. You may also be asked to prove you are a human and not a robot.

-
- - -
-

-

- -

Applications

- -

These applications use I2P to provide them with security and privacy.

- -
    - - -
  • - Toopie For information about your I2P router status, go here: -
  • - -
  • - Router Console The entrypoint for all other I2P applications is the I2P Router Console. To visit it, click here. -
  • - -
  • - Hidden Services Manager I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here: -
  • - -
  • - E-Mail I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here: -
  • - -
  • - BitTorrent I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here: -
  • -
- -

-

-
- -
- - -
-

If you want to get more information about I2P, you can visit these links.

- -

-

- - - -

-

-
-
-
-
- - - - diff --git a/host.js b/host.js index 8759d3c..bb9f25e 100644 --- a/host.js +++ b/host.js @@ -34,14 +34,28 @@ function localHost(url) { } function extensionHost(url) { + var prefix = browser.runtime + .getURL("") + .replace("moz-extension://", "") + .replace("/", ""); if (url.originUrl !== undefined) { - var res = url.originUrl.startsWith(browser.runtime.getURL("")); + var originUrl = url.originUrl + .replace("moz-extension://", "") + .replace("/", ""); + // console.log("(urlcheck) Extension application path", originUrl); + // console.log("(urlcheck) Extension application path", prefix); + var res = originUrl.startsWith(prefix); + // console.log("(urlcheck) Extension application path", res); if (res) return res; } - if (url.url !== undefined) { - var res = url.url.startsWith(browser.runtime.getURL("")); + if (url.documentUrl !== undefined) { + // console.log("(urlcheck) Extension application path", originUrl); + // console.log("(urlcheck) Extension application path", prefix); + var res = originUrl.startsWith(prefix); + // console.log("(urlcheck) Extension application path", res); if (res) return res; } + console.log("(urlcheck) Extension application path", url); } function i2pHostName(url) { @@ -100,8 +114,10 @@ function routerHost(url) { console.log("(urlcheck) Torrent application path", final); return "i2psnark"; } else if (final === "webmail" || final === "susimail") { - console.log("(urlcheck) Mail application path", final); - return "webmail"; + if (!url.includes(".css")) { + console.log("(urlcheck) Mail application path", final); + return "webmail"; + } } else if (final.startsWith("MuWire")) { if (!url.includes(".png")) { console.log("(urlcheck) MuWire application path", final); diff --git a/index.html b/index.html index 1d6e117..e69de29 100644 --- a/index.html +++ b/index.html @@ -1,222 +0,0 @@ - - - - I2P in Private Browsing Mode - - - - -

I2P in Private Browsing Mode(Firefox-Only)

- -

This is an webextension which introduces a set of new "Private Browsing" modes to Firefox-based browsers(Supporting webextensions) that makes it easier to configure a browser to use I2P securely and adds features for making I2P applications easier to use. It does this by isolating I2P-specific settings to Contextual Identities within Firefox, then loading them automatically when the user requests them. It also adds convenience and management features, like an embedded I2P console and Bittorrent integration with clients using the transmission-rpc API.

- -

Privacy Policy

- -

This browser extension does not collect any personal information. It requires access to local storage and browsing data permissions in order to delete them when directed to by the user. This browser extension does not transmit any information to any third party, nor will it, ever.

- -

This browser extension cannot influence telemetry carried out by browser vendors to determine performance in their distribution channels, nor can it mitigate any other browser vendor telemetry.

- -

This browser extension is entirely Free, Open-Source software.

- -

Installation(Cross-Platform):

- -

For desktop users this addon is available from addons.mozilla.org, where you will be able to recive automatic updates: I2P in Private Browsing.

- -

Debian Installation:

- -

Should you prefer, it is possible to install this extension system-wide by side-loading it into Debian. You can generate your own deb file by running the command:

- -
    make deb
-
-

and then you can install it with:

- -
    sudo apt install ../i2psetproxy.js_*.deb
-
-

Bittorrent Download:

- -

The self-hosted plugin is available from bittorrent both within the I2P and Clearnet Bittorrent network(With a web seed to support it in case one goes dead).

- - - -

Usage:

- - - -

Features

- - - -

Video

- - - -

Documents

- - - -

Super Extra Important Background Info:

- -

This plugin's viability is directly related to the viability of Mozilla and Tor's work on hardening Firefox itself and of particular interest are the "Uplift" and "Fusion(Firefox Using Onions)" projects.

- -

Links about Project Uplift

- - - -

Project uplift seems to have largely been accomplished?

- -

Links about Project Fusion

- - - -

The Other Version

- -

New versions of this extension create an I2P in Private Browsing mode instead, using container tabs.

- -

Since this is a drastic change to the behavior of the old plugin, and since there is no UI a new entry for the new plugin has been made at a new location on addons.mozilla.org.

- - - -

Android usage:

- -

Use the old version, on either an old version of Firefox(pre-68) or by enabling this custom collection: [Recommended Plugins] https://addons.mozilla.org/en-US/firefox/collections/14614396/I2P-Browser-Fork/

- - diff --git a/options/options.html b/options/options.html index fd2ad92..e69de29 100644 --- a/options/options.html +++ b/options/options.html @@ -1,95 +0,0 @@ - - - - - - - - - - -
- Proxy Scheme: -
- -
- Bookmarks Status: -
- -
- -
- -
- -

-

- -
- - -
-
-
- Router Console Options -
- -

Configure your router console options here.

- -
- -
-
- -
-
-
- I2PControl RPC Client Options -
- -

Configure your I2PControl options here.

- -
- -
- -
- -
-
- -
-
-
- Bittorrent RPC Client Options -
- -

Configure your Bittorrent options here.

- -
- -
- -
- -
-
- - - - - diff --git a/proxy.js b/proxy.js index dffd372..b0f2c01 100644 --- a/proxy.js +++ b/proxy.js @@ -188,7 +188,7 @@ var handleContextProxyRequest = async function (requestDetails) { port: getPort(), }; return proxy; - } else if (extensionHost(requestDetails.url)) { + } else if (extensionHost(requestDetails)) { return; } else if (i2pHost(requestDetails.url)) { var tab = tabGet(requestDetails.tabId); diff --git a/security.html b/security.html index 1786196..e69de29 100644 --- a/security.html +++ b/security.html @@ -1,55 +0,0 @@ - - - - - - - - - - - -
-
-
-
-

I2P Site Properties

-
-
-
- -
- -
-
- - - diff --git a/toopie.html b/toopie.html index 949d49f..e69de29 100644 --- a/toopie.html +++ b/toopie.html @@ -1,86 +0,0 @@ - - - - I2P Router Information - - - - - - - -

I2P Router Information

- - - - - - - - - - - - - - - - - - -
-
- - diff --git a/window.html b/window.html index 50929b3..e69de29 100644 --- a/window.html +++ b/window.html @@ -1,159 +0,0 @@ - - - - - - - - - - - - -
- - Browse Download -
- -
-
-
-
-

The Invisible Internet Browser

-
-
- -
-
-
- -
- Home Page -
- -
-
- -
- Proxy is ready. -
- -
-

You are now able to use I2P in this browser.

- -
-
- -
-

-

- -

Controls

- -

These controls are used to tailor your I2P Browsing Experience

- -
    - - -
  • -
    -
    - -
    -
    -
    -
    -
  • - -
  • History is automatically cleared when your I2P tabs are closed. If you want to clear history as you go, check this box.
  • -
-
- - -
-

-

- -

Applications

- -

These applications use I2P to provide them with security and privacy.

- -
    -
  • For more information about this extension, go here:
  • - -
  • For information about your I2P router status, go here:
  • - -
  • I2P has a web-based interface for configuring .i2p services like web sites, to set up your own web sites, go here:
  • - -
  • I2P also bundles a webmail client which can be used to access in-I2P e-mail. To use it, go here:
  • - -
  • I2P is capable of anonymous Peer-to-Peer file sharing, to use the built-in bittorrent client go here:
  • -
-
-
-
- -
- -
-
-
-
-

Torrent Downloads

-
-
- -
- Torrent RPC Configuration -
- The server address is not set yet. -
- Open the settings to continue. -
- -
-
-

Torrent Controls

- Open Web UI -
- - - -
    -
- -
-
-
-
-
- - - - - - - - -