another hack to deal with slightly different tag behavior
This commit is contained in:
31
README.md
31
README.md
@@ -6,8 +6,10 @@ WebExtension that does extended configuration of a dedicated I2P browser. While
|
||||
needing to touch about:config and disables several
|
||||
fingerprinting/de-anonymization vectors on it's own. It is also the easiest way
|
||||
to configure an I2P browser on Android without requiring the user to root their
|
||||
device. It aims to be as similar to a fully-fledged I2P browser as possible and
|
||||
borrows some code from I2P Rhizome(Which it is also compatible with).
|
||||
device, although this support may be somewhat spotty in recent versions it it
|
||||
beginning to improve again. It aims to be as similar to a fully-fledged I2P
|
||||
Rhizome as possible and borrows some code from I2P Rhizome(Which it is also
|
||||
compatible with).
|
||||
|
||||
The Old Version
|
||||
---------------
|
||||
@@ -66,12 +68,7 @@ command:
|
||||
them with the proxy enforced.
|
||||
* [done] **Change** the color of the browser window to indicate that I2P is in
|
||||
use
|
||||
* [done-ish] **Reset** the HTTP Proxy tunnel to generate a new destination
|
||||
on-demand
|
||||
* it does this by working in conjunction with this
|
||||
[standalone HTTP proxy](https://github.com/eyedeekay/httptunnel), currently
|
||||
disabled*.
|
||||
* [ready/broken/wip] **Provide** help in a variety of languages.
|
||||
* [ready/broken/wip] **Provide** help in a variety sof languages.
|
||||
* [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.
|
||||
@@ -84,7 +81,23 @@ command:
|
||||
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.
|
||||
can. Right now instead of talking to snark-rpc, it uses a web-based protocl
|
||||
handler that simply auto-fills the torrent into i2psnark.
|
||||
* [barely started] **Isolate** traffic by contextual identity to it's own HTTP
|
||||
Proxy tunnel, each reflecting it's own pseudonymous identity within I2P. The
|
||||
contextual identities. For now, the contextual identities used to manage
|
||||
browsing are "I2P Browsing" and "Web Browsing" where I2P Browsing is capable
|
||||
of using an outproxy but in the case of traffic destined for the clearnet
|
||||
does not do header rewriting, and Web Browsing falls back to the Proxy
|
||||
configured in Firefox. The I2P Browsing will be expanded to
|
||||
- I2P Amnesiac Browsing: Use for General Browsing, stores no history and
|
||||
uses an HTTP Proxy with a very short tunnel-close timeout and no key-reuse.
|
||||
- I2P Social Networking: Use this for logging into social network accounts,
|
||||
forums, and other interactive asynchronous public communication platforms
|
||||
where your identity is behaviorally linkable. This has a very long
|
||||
tunnel-close timeout and key-reuse until specifically invoked.
|
||||
- I2P Blogging: Use this for posting content to the web interface of your
|
||||
blog or to other similar websites that you create content on.
|
||||
|
||||
### Screenshot
|
||||
|
||||
|
@@ -245,16 +245,15 @@ function setTitle(window) {
|
||||
|
||||
if (window.incognito) {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: titleprefpriv
|
||||
titlePreface: titleprefpriv + ": "
|
||||
});
|
||||
} else {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: titlepref
|
||||
titlePreface: titlepref + ": "
|
||||
});
|
||||
}
|
||||
} else if (context.name == webpref) {
|
||||
console.log("Active in Web window");
|
||||
|
||||
if (window.incognito) {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: ""
|
||||
@@ -268,11 +267,11 @@ function setTitle(window) {
|
||||
console.log("Active in Router Console window");
|
||||
if (window.incognito) {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: routerprefpriv
|
||||
titlePreface: titleprefpriv + " - " + routerprefpriv + ": "
|
||||
});
|
||||
} else {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: routerpref
|
||||
titlePreface: titlepref + " - " + routerpref + ": "
|
||||
});
|
||||
}
|
||||
} else if (context.name == tunnelpref) {
|
||||
@@ -280,11 +279,11 @@ function setTitle(window) {
|
||||
|
||||
if (window.incognito) {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: tunnelprefpriv
|
||||
titlePreface: titleprefpriv + " - " + tunnelprefpriv + ": "
|
||||
});
|
||||
} else {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: tunnelpref
|
||||
titlePreface: titlepref + " - " + tunnelpref + ": "
|
||||
});
|
||||
}
|
||||
} else if (context.name == mailpref) {
|
||||
@@ -292,11 +291,11 @@ function setTitle(window) {
|
||||
|
||||
if (window.incognito) {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: mailprefpriv
|
||||
titlePreface: titleprefpriv + " - " + mailprefpriv + ": "
|
||||
});
|
||||
} else {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: mailpref
|
||||
titlePreface: titlepref + " - " + mailpref + ": "
|
||||
});
|
||||
}
|
||||
} else if (context.name == torrentpref) {
|
||||
@@ -304,11 +303,11 @@ function setTitle(window) {
|
||||
|
||||
if (window.incognito) {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: torrentprefpriv
|
||||
titlePreface: titleprefpriv + " - " + torrentprefpriv + ": "
|
||||
});
|
||||
} else {
|
||||
browser.windows.update(window.id, {
|
||||
titlePreface: torrentpref
|
||||
titlePreface: titlepref + " - " + torrentpref + ": "
|
||||
});
|
||||
}
|
||||
}
|
||||
|
79
scrub.js
79
scrub.js
@@ -100,12 +100,6 @@ var contextSetup = async function(requestDetails) {
|
||||
name: titlepref
|
||||
});
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
console.log(
|
||||
"(isolate) forcing I2P Browsing",
|
||||
requestDetails.url,
|
||||
" context",
|
||||
context[0].cookieStoreId
|
||||
);
|
||||
function Create(window) {
|
||||
function onCreated(tab) {
|
||||
console.log("(isolate) Closing old, un-isolated tab", window);
|
||||
@@ -132,12 +126,6 @@ var contextSetup = async function(requestDetails) {
|
||||
name: routerpref
|
||||
});
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
console.log(
|
||||
"(isolate) forcing Router Console",
|
||||
requestDetails.url,
|
||||
" context",
|
||||
context[0].cookieStoreId
|
||||
);
|
||||
function Create(window) {
|
||||
function onCreated(tab) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
@@ -165,12 +153,6 @@ var contextSetup = async function(requestDetails) {
|
||||
name: tunnelpref
|
||||
});
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
console.log(
|
||||
"(isolate) forcing HSM context",
|
||||
requestDetails.url,
|
||||
" context",
|
||||
context[0].cookieStoreId
|
||||
);
|
||||
function Create(window) {
|
||||
function onCreated(tab) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
@@ -198,12 +180,6 @@ var contextSetup = async function(requestDetails) {
|
||||
name: torrentpref
|
||||
});
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
console.log(
|
||||
"(isolate) forcing Bittorrent",
|
||||
requestDetails.url,
|
||||
" context",
|
||||
context[0].cookieStoreId
|
||||
);
|
||||
function Create(window) {
|
||||
function onCreated(tab) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
@@ -230,12 +206,6 @@ var contextSetup = async function(requestDetails) {
|
||||
name: mailpref
|
||||
});
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
console.log(
|
||||
"(isolate) forcing Web Mail",
|
||||
requestDetails.url,
|
||||
" context",
|
||||
context[0].cookieStoreId
|
||||
);
|
||||
function Create(window) {
|
||||
function onCreated(tab) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
@@ -267,12 +237,6 @@ var contextSetup = async function(requestDetails) {
|
||||
tabId.cookieStoreId == "firefox-private"
|
||||
) {
|
||||
if (tabId.cookieStoreId != context[0].cookieStoreId) {
|
||||
console.log(
|
||||
"(isolate) forcing Web Browsing",
|
||||
requestDetails.url,
|
||||
" context",
|
||||
context[0].cookieStoreId
|
||||
);
|
||||
function Create(window) {
|
||||
function onCreated(tab) {
|
||||
console.log("(isolate) Closing old, un-isolated tab");
|
||||
@@ -303,6 +267,9 @@ var contextSetup = async function(requestDetails) {
|
||||
console.log("(isolate)Tab error", error);
|
||||
}
|
||||
};
|
||||
if (requestDetails == undefined) {
|
||||
return requestDetails;
|
||||
}
|
||||
if (requestDetails.tabId > 0) {
|
||||
if (proxyHost(requestDetails.url)) {
|
||||
setcookie = browser.cookies.set({
|
||||
@@ -313,7 +280,7 @@ var contextSetup = async function(requestDetails) {
|
||||
setcookie.then(onContextGotLog, onError);
|
||||
return requestDetails;
|
||||
}
|
||||
console.log("(isolate)Request Details)", requestDetails);
|
||||
console.log("(isolate)Request Details", requestDetails);
|
||||
if (extensionHost(requestDetails.url)) {
|
||||
var tab = tabGet(requestDetails.tabId);
|
||||
var mtab = tab.then(anyTabFind, onError);
|
||||
@@ -355,15 +322,15 @@ var contextSetup = async function(requestDetails) {
|
||||
return requestDetails;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("(isolate)Request Details)", requestDetails);
|
||||
if (extensionHost(requestDetails.url)) {
|
||||
var tab = tabGet(requestDetails.tabId);
|
||||
var mtab = tab.then(anyTabFind, onError);
|
||||
return requestDetails;
|
||||
if (typeof requestDetails == "number") {
|
||||
tab = tabGet(requestDetails);
|
||||
var mtab = tab.then(anyTabFind);
|
||||
} else if (typeof requestDetails != undefined) {
|
||||
if (typeof requestDetails.tabId > 0) {
|
||||
tab = tabGet(requestDetails.tabId);
|
||||
var mtab = tab.then(anyTabFind);
|
||||
}
|
||||
}
|
||||
//var tab = tabGet(requestDetails.tabId);
|
||||
//var mtab = tab.then(anyTabFind);
|
||||
return requestDetails;
|
||||
} catch (error) {
|
||||
console.log("(isolate)Not an I2P request, blackholing", error);
|
||||
@@ -381,25 +348,3 @@ browser.webRequest.onBeforeSendHeaders.addListener(
|
||||
{ urls: ["<all_urls>"] },
|
||||
["blocking", "requestHeaders"]
|
||||
);
|
||||
|
||||
/*
|
||||
function notify(message) {
|
||||
var response = await fetch('https://proxy.i2p', {
|
||||
credentials: 'include'
|
||||
});
|
||||
const myJson = await response.json();
|
||||
console.log(JSON.stringify(myJson));
|
||||
|
||||
console.log(message);
|
||||
const Http = new XMLHttpRequest();
|
||||
Http.mozAnon = true;
|
||||
Http.withCredentials = true;
|
||||
const url = "http://proxy.i2p";
|
||||
Http.open("GET", url);
|
||||
Http.send();
|
||||
Http.onreadystatechange = e => {
|
||||
console.log(Http.responseText);
|
||||
browser.runtime.sendMessage(Http.responseText);
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user