4
Makefile
4
Makefile
@@ -34,8 +34,8 @@ clean:
|
||||
## EVEN RELEASES are AMO RELEASES
|
||||
## ODD RELEASES are SELFHOSTED RELEASES
|
||||
|
||||
MOZ_VERSION=0.32
|
||||
VERSION=0.32
|
||||
MOZ_VERSION=0.34
|
||||
VERSION=0.35
|
||||
#VERSION=1.27
|
||||
|
||||
xpi:
|
||||
|
||||
23
README.md
23
README.md
@@ -53,3 +53,26 @@ submission to AMO.
|
||||
### Screenshot
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||
* https://wiki.mozilla.org/Security/Tor_Uplift
|
||||
* https://wiki.mozilla.org/Security/FirstPartyIsolation
|
||||
* https://wiki.mozilla.org/Security/Fingerprinting
|
||||
* https://wiki.mozilla.org/Security/Fennec%2BTor_Project
|
||||
* https://wiki.mozilla.org/Security/Tor_Uplift/Tracking
|
||||
|
||||
Project uplift seems to have largely been accomplished?
|
||||
|
||||
### Links about Project Fusion
|
||||
|
||||
* https://wiki.mozilla.org/Security/Fusion
|
||||
* https://trac.torproject.org/projects/tor/wiki/org/meetings/2018Rome/Notes/FusionProject
|
||||
* https://blog.torproject.org/tor-heart-firefox
|
||||
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -1,3 +1,10 @@
|
||||
i2psetproxy.js (0.35-1) UNRELEASED; urgency=low
|
||||
|
||||
* Automatically activate contexts
|
||||
|
||||
-- idk <hankhill19580@gmail.com> Thu, 01 Aug 2019 00:32:39 -0400
|
||||
|
||||
|
||||
i2psetproxy.js (0.31-1) UNRELEASED; urgency=low
|
||||
|
||||
* Initial release. Closes: #nnnn
|
||||
|
||||
2
info.js
2
info.js
@@ -42,6 +42,8 @@ document.addEventListener("click", e => {
|
||||
});
|
||||
} else if (e.target.id === "clear-browser-data") {
|
||||
forgetBrowsingData();
|
||||
} else if (e.target.id === "check-i2p-control") {
|
||||
echo("I2P Router Detected", "panel-section-i2pcontrol-check");
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
"webRequestBlocking",
|
||||
"contextualIdentities",
|
||||
"cookies",
|
||||
"history",
|
||||
"tabs",
|
||||
"<all_urls>"
|
||||
],
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_extensionName__",
|
||||
"version": "0.32",
|
||||
"version": "0.35",
|
||||
"description": "__MSG_extensionDescription__",
|
||||
"homepage_url": "https://github.com/eyedeekay/i2psetproxy.js",
|
||||
"icons": {
|
||||
@@ -44,6 +45,7 @@
|
||||
"background.js",
|
||||
"proxy.js",
|
||||
"info.js",
|
||||
"i2pcontrol.js",
|
||||
"scrub.js"
|
||||
]
|
||||
},
|
||||
|
||||
118
privacy.js
118
privacy.js
@@ -198,16 +198,7 @@ function EnableSavePasswords() {
|
||||
|
||||
var defaultSettings = {
|
||||
since: "forever",
|
||||
dataTypes: [
|
||||
"history",
|
||||
"downloads",
|
||||
"cache",
|
||||
"cookies",
|
||||
"passwords",
|
||||
"pluginData",
|
||||
"formData",
|
||||
"serviceWorkers"
|
||||
]
|
||||
dataTypes: ["downloads", "passwords", "formData", "localStorage", "history"]
|
||||
};
|
||||
|
||||
var appSettings = {
|
||||
@@ -269,26 +260,111 @@ function forgetBrowsingData(storedSettings) {
|
||||
browser.notifications.create({
|
||||
type: "basic",
|
||||
title: "Removed browsing data",
|
||||
message: `Removed ${dataTypesString}\nsince ${sinceString}`
|
||||
message: `Removed ${dataTypesString}\n for i2pbrowser`
|
||||
});
|
||||
}
|
||||
|
||||
browser.browsingData
|
||||
.remove(
|
||||
{
|
||||
since
|
||||
},
|
||||
dataTypes
|
||||
)
|
||||
.then(notify);
|
||||
function deepCleanHistory(historyItems) {
|
||||
console.log("Deep cleaning history");
|
||||
for (item of historyItems) {
|
||||
if (i2pHost(item.url)) {
|
||||
browser.history.deleteUrl({
|
||||
url: item.url
|
||||
});
|
||||
browser.browsingData.removeCache({});
|
||||
console.log("cleared Cache");
|
||||
browser.browsingData
|
||||
.removePasswords({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since: since
|
||||
})
|
||||
.then(onGot);
|
||||
console.log("cleared Passwords");
|
||||
browser.browsingData
|
||||
.removeDownloads({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since: since
|
||||
})
|
||||
.then(onGot);
|
||||
console.log("cleared Downloads");
|
||||
browser.browsingData
|
||||
.removeFormData({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since: since
|
||||
})
|
||||
.then(onGot);
|
||||
console.log("cleared Form Data");
|
||||
browser.browsingData
|
||||
.removeLocalStorage({
|
||||
hostnames: [i2pHostName(item.url)],
|
||||
since: since
|
||||
})
|
||||
.then(onGot);
|
||||
console.log("cleared Local Storage");
|
||||
|
||||
contexts = browser.contextualIdentities.query({
|
||||
name: "i2pbrowser"
|
||||
});
|
||||
|
||||
function deepCleanCookies(cookies) {
|
||||
for (cookie of cookies) {
|
||||
var removing = browser.cookies.remove({
|
||||
firstPartyDomain: cookie.firstPartyDomain,
|
||||
name: cookie.name,
|
||||
url: item.url
|
||||
});
|
||||
removing.then(onGot, onError);
|
||||
}
|
||||
console.log("Cleared cookies")
|
||||
}
|
||||
|
||||
function deepCleanContext(cookieStoreIds) {
|
||||
for (cookieStoreId of cookieStoreIds) {
|
||||
var removing = browser.cookies.getAll({
|
||||
firstPartyDomain: null,
|
||||
storeId: cookieStoreId.cookieStoreId
|
||||
});
|
||||
removing.then(deepCleanCookies, onError);
|
||||
}
|
||||
}
|
||||
|
||||
contexts.then(deepCleanContext, onError);
|
||||
}
|
||||
}
|
||||
notify();
|
||||
}
|
||||
|
||||
var searching = browser.history.search({
|
||||
text: "i2p",
|
||||
startTime: 0
|
||||
});
|
||||
|
||||
searching.then(deepCleanHistory);
|
||||
|
||||
setAllPrivacy();
|
||||
ResetPeerConnection();
|
||||
}
|
||||
|
||||
function i2pHostName(url) {
|
||||
let hostname = "";
|
||||
if (url.indexOf("://") > -1) {
|
||||
hostname = url.split("/")[2];
|
||||
} else {
|
||||
hostname = url.split("/")[0];
|
||||
}
|
||||
return hostname;
|
||||
}
|
||||
|
||||
function i2pHost(url) {
|
||||
let hostname = i2pHostName(url);
|
||||
return hostname.endsWith(".i2p");
|
||||
}
|
||||
|
||||
function onGot(contexts) {
|
||||
for (let context of contexts) {
|
||||
console.log(context);
|
||||
if (contexts != null) {
|
||||
for (let context of contexts) {
|
||||
console.log(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
17
scrub.js
17
scrub.js
@@ -7,10 +7,12 @@ var contextScrub = async function(requestDetails) {
|
||||
} else {
|
||||
if ((context.name = "i2pbrowser")) {
|
||||
var ua = "MYOB/6.66 (AN/ON)";
|
||||
for (var header of requestDetails.requestHeaders) {
|
||||
if (header.name.toLowerCase() === "user-agent") {
|
||||
header.value = ua;
|
||||
console.log("(scrub)User-Agent header modified", header.value);
|
||||
if (i2pHost(requestUrl.url)) {
|
||||
for (var header of requestDetails.requestHeaders) {
|
||||
if (header.name.toLowerCase() === "user-agent") {
|
||||
header.value = ua;
|
||||
console.log("(scrub)User-Agent header modified", header.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
@@ -180,13 +182,18 @@ var contextSetup = async function(requestDetails) {
|
||||
}
|
||||
};
|
||||
|
||||
function i2pHost(url) {
|
||||
function i2pHostName(url) {
|
||||
let hostname = "";
|
||||
if (url.indexOf("://") > -1) {
|
||||
hostname = url.split("/")[2];
|
||||
} else {
|
||||
hostname = url.split("/")[0];
|
||||
}
|
||||
return hostname;
|
||||
}
|
||||
|
||||
function i2pHost(url) {
|
||||
let hostname = i2pHostName(url);
|
||||
return hostname.endsWith(".i2p");
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
<a href="http://i2pforum.i2p" id="window-create-forum-panel">Visit the I2P Forums</a><br>
|
||||
<a href="http://i2p-projekt.i2p/blog" id="window-create-news-panel">Get the latest I2P News</a><br>
|
||||
<div class="panel-section-separator"></div>
|
||||
<a href="#" id="check-i2p-control">Check I2P Router Health</a><div id="panel-section-i2pcontrol-check"></div>
|
||||
<div class="panel-section-separator"></div>
|
||||
|
||||
<div class="panel-section-identity">
|
||||
<div id="identity-list"></div>
|
||||
@@ -44,6 +46,7 @@
|
||||
<script src="privacy.js"></script>
|
||||
<script src="info.js"></script>
|
||||
<script src="content.js"></script>
|
||||
<script src="i2pcontrol.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user