" >> index.html
@echo " I2P in Private Browsing Mode" >> index.html
@echo " " >> index.html
+ @echo " " >> index.html
@echo "" >> index.html
@echo "" >> index.html
sed "s|magnetsub|[Magnet Link]($(MAGNET))|g" README.md | markdown >> index.html
@@ -238,14 +239,20 @@ fmt:
cleancss -O1 all -O2 all --format beautify home.css -o .home.css && mv .home.css home.css
cleancss -O1 all -O2 all --format beautify info.css -o .info.css && mv .info.css info.css
cleancss -O1 all -O2 all --format beautify search.css -o .search.css && mv .search.css search.css
+ cleancss -O1 all -O2 all --format beautify sidebar.css -o .sidebar.css && mv .sidebar.css sidebar.css
+ cleancss -O1 all -O2 all --format beautify options/options.css -o options/.options.css && mv options/.options.css options/options.css
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes index.html > .index.html; mv .index.html index.html
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes window.html > .window.html; mv .window.html window.html
tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes home.html > .home.html; mv .home.html home.html
+ tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes toopie.html > .toopie.html; mv .toopie.html toopie.html
+ tidy --as-xhtml --drop-empty-elements no --input-xml --tidy-mark no -indent --indent-spaces 4 -wrap 0 --new-blocklevel-tags article,header,footer --new-inline-tags video,audio,canvas,ruby,rt,rp --break-before-br yes --sort-attributes alpha --vertical-space yes options/options.html > options/.options.html; mv options/.options.html options/options.html
find . -path ./node_modules -prune -o -name '*.js' -exec prettier --write {} \;
find . -path ./node_modules -prune -o -name '*.json' -exec prettier --write {} \;
lint:
- eslint --color *.js
+ fixjsstyle *.js
+ gjslint *.js; true
+ #eslint --color *.js
deborig: fmt version
rm -rf ../i2psetproxy.js-$(VERSION)
@@ -283,3 +290,4 @@ rss: torrent
upload-rss:
gothub upload -R -u eyedeekay -r I2P-in-Private-Browsing-Mode-Firefox -t docs -n "releases.atom" -f releases.atom
+
diff --git a/README.md b/README.md
index 872db61..46f2456 100644
--- a/README.md
+++ b/README.md
@@ -81,11 +81,12 @@ Usage:
use
* 
* [ready] **Provide** help in a variety of languages.
- * [wip] **Monitor** the health and readiness of the I2P router it is
+ * [done] **Monitor** the health and readiness of the I2P router it is
instructed to use. Currently the plugin checks whether the HTTP Proxy is
working by fetching an image from "http://proxy.i2p" and displaying a result.
A work-in-progress binding to i2pcontrol is available in ./i2pcontrol, it is
inert at this time.
+ * 
* [Done] **Handle** router console applications under their own origins and
within their own contextual identity. (1) The router console is automatically
confined to it's own container tab. (2) Use a custom protocol handler to
@@ -196,3 +197,5 @@ for updates, you can download the identical plugin from this repository's
releases page. The latest AMO Plugin will always be identical to the latest
github release, except for the version number, which must be incremented for
submission to AMO.
+
+moz-extension://d63582fc-09fc-445a-b8aa-1c888ee2ffc0/toopie.html
\ No newline at end of file
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index cec1b52..7e8a3dc 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."
},
+ "toopieName": {
+ "message": "toopie.html",
+ "description": "Name of the sidebar."
+ },
"extensionDescription": {
"message": "Your browser is now set up to use I2P.",
"description": "Description of the extension."
@@ -131,6 +135,10 @@
"message": "I2P Browser (Private)",
"description": "Preface for the browser titlebar"
},
+ "extensionPreface": {
+ "message": "I2P Management",
+ "description": "Preface for the browser titlebar"
+ },
"webPreface": {
"message": "Web Browser",
"description": "Preface for the browser titlebar"
@@ -203,6 +211,10 @@
"message": "Visit the I2P Forum to learn more or ask for assistance",
"description": "Help Message"
},
+ "proxyHelpText": {
+ "message": "Configure your I2P proxy here.",
+ "description": "Help for configuring the options for the Reset Tunnel button"
+ },
"hostText": {
"message": "Host: ",
"description": "Host for the HTTP or SOCKS5 Proxy"
@@ -212,7 +224,7 @@
"description": "Port for the HTTP or SOCKS5 Proxy"
},
"controlHelpText": {
- "message": "These options will be inert if used with the default i2p HTTP or SOCKS proxy.",
+ "message": "Configure your router console here.",
"description": "Help for configuring the options for the Reset Tunnel button"
},
"controlHostText": {
diff --git a/background.js b/background.js
index 42366c4..7734558 100644
--- a/background.js
+++ b/background.js
@@ -12,11 +12,12 @@ var tunnelpref = chrome.i18n.getMessage("i2ptunnelPreface");
var tunnelprefpriv = chrome.i18n.getMessage("i2ptunnelPrefacePrivate");
var localpref = chrome.i18n.getMessage("localPreface");
var localprefpriv = chrome.i18n.getMessage("localPrefacePrivate");
+var extensionpref = chrome.i18n.getMessage("extensionPreface");
function onContextsGot(contexts) {
var ids = [];
for (let context of contexts) {
- console.log(`Name: ${context.name}`);
+ console.log(`Name : ${context.name}`);
ids.push(context.name);
}
console.log("Checking new contexts");
@@ -90,11 +91,11 @@ function onContextsError() {
}
function onCreated(context) {
- console.log(`New identity's ID: ${context.cookieStoreId}.`);
+ console.log(" ID:", context.cookieStoreId, "created.");
}
function onNotCreated(context) {
- console.log(`identity ID: ${context.cookieStoreId} not created`);
+ console.log("ID:", context.cookieStoreId, "not created.");
}
browser.contextualIdentities.query({}).then(onContextsGot, onContextsError);
@@ -402,11 +403,6 @@ gettingListenerInfo.then(got => {
console.log("Error finding platform info");
}
if (got.os != "android") {
- browser.windows.onCreated.addListener(() => {
- chrome.storage.local.get(function() {
- setupProxy();
- });
- });
browser.tabs.onCreated.addListener(() => {
var getting = browser.windows.getCurrent({
populate: true
@@ -421,30 +417,7 @@ gettingListenerInfo.then(got => {
});
}
});
-/*
-var gettingInfo = browser.runtime.getPlatformInfo();
-gettingInfo.then(got => {
- if (got.os != "android") {
- browser.tabs.onCreated.addListener(() => {
- var getting = browser.windows.getCurrent({
- populate: true
- });
- getting.then(setTitle, onError);
- });
- }
-});
-var gettingInfo = browser.runtime.getPlatformInfo();
-gettingInfo.then(got => {
- if (got.os != "android") {
- browser.tabs.onActivated.addListener(() => {
- var getting = browser.windows.getCurrent({
- populate: true
- });
- getting.then(setTitle, onError);
- });
- }
-});
-*/
+
function handleUpdated(updateInfo) {
if (updateInfo.theme) {
console.log(`Theme was applied: ${updateInfo.theme}`);
diff --git a/bookmarks.js b/bookmarks.js
index 572e89a..3705f53 100644
--- a/bookmarks.js
+++ b/bookmarks.js
@@ -122,7 +122,7 @@ gettingInfo.then(got => {
}
function onRejected(error) {
- console.log(`An error: ${error}`);
+ console.log(`An error : ${error}`);
}
function onCreated(node) {
console.log("Bookmarked", node);
diff --git a/config.js b/config.js
new file mode 100644
index 0000000..0b8ff55
--- /dev/null
+++ b/config.js
@@ -0,0 +1,18 @@
+var proxy_scheme = "HTTP";
+var proxy_host = "127.0.0.1";
+var proxy_port = "4444";
+
+var control_host = "127.0.0.1";
+var control_port = "7657";
+
+var rpc_host = "127.0.0.1";
+var rpc_port = "7657";
+var rpc_path = "jsonrpc";
+var rpc_pass = "itoopie";
+
+var bt_rpc_host = "127.0.0.1";
+var bt_rpc_port = "7657";
+var bt_rpc_path = "transmission/rpc";
+var bt_rpc_pass = "transmission";
+
+var disable_history = false;
diff --git a/context.js b/context.js
index 2fd7a15..49f4bce 100644
--- a/context.js
+++ b/context.js
@@ -2,12 +2,12 @@
var titlepref = chrome.i18n.getMessage("titlePreface");
function onError(error) {
- console.log(`Error: ${error}`);
+ console.log(`Error : ${error}`);
}
function eventHandler(event) {
function onCreated(windowInfo) {
- console.log(`Created window: ${windowInfo.id}`);
+ console.log(`Created window : ${windowInfo.id}`);
browser.tabs.create({
windowId: windowInfo.id,
url: "about:blank",
diff --git a/handler.js b/handler.js
index 0a06d39..d48f7b5 100644
--- a/handler.js
+++ b/handler.js
@@ -1,3 +1,56 @@
+function routerHost(url) {
+ let hostname = "";
+ let path = "";
+ function pathcheck(str) {
+ if (str != undefined) {
+ let final = str.split("/")[0];
+ if (final === "i2ptunnelmgr" || final === "i2ptunnel") {
+ console.log("(urlcheck) application path", final);
+ return "i2ptunnelmgr";
+ } else if (final === "i2psnark" || final === "torrents") {
+ console.log("(urlcheck) application path", final);
+ return "i2psnark";
+ } else if (final === "webmail" || final === "susimail") {
+ console.log("(urlcheck) application path", final);
+ return "webmail";
+ } else if (
+ final === "home" ||
+ final === "console" ||
+ final === "dns" ||
+ final.startsWith("config")
+ ) {
+ console.log("(urlcheck) application path", final);
+ return "routerconsole";
+ }
+ }
+ return true;
+ }
+ if (url.indexOf("://") > -1) {
+ hostname = url.split("/")[2];
+ let prefix = url.substr(0, url.indexOf("://") + 3);
+ path = url.replace(prefix + hostname + "/", "");
+ } else if (identifyProtocolHandler(url)) {
+ let newurl = identifyProtocolHandler(url);
+ return routerHost(newurl);
+ } else {
+ hostname = url.split("/")[0];
+ path = url.replace(hostname + "/", "");
+ }
+ if (hostname === control_host + ":" + control_port) {
+ //console.log("(hostcheck) router console found on configured ports");
+ return pathcheck(path);
+ }
+ if (hostname === "localhost" + ":" + control_port) {
+ //console.log("(hostcheck) router console found on configured ports");
+ return pathcheck(path);
+ }
+ if (hostname === "127.0.0.1" + ":" + control_port) {
+ return pathcheck(path);
+ }
+
+ return false;
+}
+
function identifyProtocolHandler(url) {
//console.log("looking for handler-able requests")
if (routerHost(url)) {
diff --git a/home.css b/home.css
index e4f5a53..5750d7c 100644
--- a/home.css
+++ b/home.css
@@ -100,7 +100,6 @@ h1 {
color: #41465f;
border: 1px solid #dee2e6;
border-radius: 2px 2px 0 0;
- width: 90%;
padding-left: 5%
}
h2,
@@ -111,7 +110,6 @@ h3 {
font-size: 25px;
text-transform: uppercase;
color: #41465f;
- border: 1px solid #dee2e6;
border-radius: 2px 2px 0 0;
width: 90%;
padding-left: 5%
@@ -167,9 +165,10 @@ li {
margin: .5rem .5rem .5rem 32%
}
#readyness {
- min-height: 5rem;
- padding: .5rem;
- margin: .5rem;
+ float: left;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+ margin: 1rem;
width: 42%;
min-width: 42%;
background: #dee2e6;
@@ -182,6 +181,7 @@ li {
min-height: 5rem;
padding: .5rem;
margin: .5rem;
+ margin-top: 4rem;
width: 42%;
min-width: 42%;
font-size: 2rem;
@@ -192,13 +192,12 @@ li {
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
}
#i2pbrowser-description {
+ padding-top: 1rem;
+ padding-bottom: 1rem;
width: 50%;
min-width: 50%;
- min-height: 5rem;
- padding: .5rem;
- display: inline;
+ display: inline-block;
background: #dee2e6;
- float: right;
border: 1px solid #dee2e6;
border-radius: 2px;
box-shadow: inset 0 0 0 1px #fff,0 0 1px #ccc
@@ -224,7 +223,7 @@ li {
margin: .2rem;
width: 38%;
min-width: 38%;
- display: inline;
+ display: inline-block;
background: #d9d9d6;
float: right;
text-align: center!important;
@@ -238,7 +237,7 @@ li {
margin: .2rem;
width: 38%;
min-width: 38%;
- display: inline;
+ display: inline-block;
float: right;
text-align: center!important;
border: 1px solid #ffc56d;
@@ -252,7 +251,7 @@ li {
margin: .2rem;
width: 38%;
min-width: 38%;
- display: inline;
+ display: inline-block;
float: left;
text-align: center!important;
border: 1px solid #f7e59a;
diff --git a/home.html b/home.html
index cab50f9..ad555c6 100644
--- a/home.html
+++ b/home.html
@@ -4,6 +4,7 @@
+
@@ -41,27 +42,27 @@
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.
@@ -77,12 +78,17 @@
These applications use I2P to provide them with security and privacy.
-
+
+
+
+ ToopieFor information about your I2P router status, go here:
[wip] Monitor the health and readiness of the I2P router it is instructed to use. Currently the plugin checks whether the HTTP Proxy is working by fetching an image from "http://proxy.i2p" and displaying a result. A work-in-progress binding to i2pcontrol is available in ./i2pcontrol, it is inert at this time.
+
[done] Monitor the health and readiness of the I2P router it is instructed to use. Currently the plugin checks whether the HTTP Proxy is working by fetching an image from "http://proxy.i2p" and displaying a result. A work-in-progress binding to i2pcontrol is available in ./i2pcontrol, it is inert at this time.
+
+
+
[Done] Handle router console applications under their own origins and within their own contextual identity. (1) The router console is automatically confined to it's own container tab. (2) Use a custom protocol handler to place each i2p application/plugin under it's own origin, shortening router console URL's and placing applications under their own origin.
-
[wip] Handle Torrents by talking to i2psnark-rpc plugin and then adding them directly into the Firefox downloads drop-downs, menus, etc. If I can. Right now instead of talking to snark-rpc, it uses a web-based protocl handler that simply auto-fills the torrent into i2psnark.
+
[wip] Handle Torrents by talking to i2psnark-rpc plugin and then adding them directly into the Firefox downloads drop-downs, menus, etc. If I can. Right now instead of talking to snark-rpc, it uses a web-based protocol handler that simply auto-fills the torrent into i2psnark.
@@ -191,5 +195,7 @@
Android addons.mozilla.org(Temporarily Disabled)
If you would prefer to recieve automatic updates from AMO, the correct product page for this plugin is I2P In Private Browsing. This absolutely requires a working outproxy. If you want to avoid the use of AMO for updates, you can download the identical plugin from this repository's releases page. The latest AMO Plugin will always be identical to the latest github release, except for the version number, which must be incremented for submission to AMO.