Skip to content

Commit

Permalink
first commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCreeper committed May 21, 2015
0 parents commit a5636a1
Show file tree
Hide file tree
Showing 6 changed files with 830 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = tab
indent_size = 8
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.xpi
675 changes: 675 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions README.md
@@ -0,0 +1,7 @@
# PrivacyFox
PrivacyFox attemts to disable/enable various features in firefox in order to enhance privacy. A list of all settings can be found in [bootstrap.js](bootstrap.js) along with a description of each one.

## building the XPI
```
zip privacyfox.xpi bootstrap.js install.rdf
```
110 changes: 110 additions & 0 deletions bootstrap.js
@@ -0,0 +1,110 @@
const {classes : Cc, interfaces : Ci, utils : Cu} = Components;
Cu.import('resource://gre/modules/Services.jsm');

var privacyPrefs =
[

// Disable referrer headers.
{pref : "network.http.sendRefererHeader", set : 0, type : "int"},

// Disable referrer headers between https websites.
{
pref : "network.http.sendSecureXSiteReferrer",
set : false,
type : "bool"
},

// This is Mozilla’s new built in tracking protection.
{pref : "privacy.trackingprotection.enabled", set : true, type : "bool"},

// Disables geolocation.
{pref : "geo.enabled", set : false, type : "bool"},

// Disable Google Safe Browsing and phishing protection. Security risk,
// but privacy improvement.
{pref : "browser.safebrowsing.enabled", set : false, type : "bool"},

// Disable Google Safe Browsing malware checks. Security risk, but privacy
// improvement.
{
pref : "browser.safebrowsing.malware.enabled",
set : false,
type : "bool"
},

// Disable that websites can get notifications if you copy, paste, or cut
// something from a web page, and it lets them know which part of the page
// had been selected.
{pref : "dom.event.clipboardevents.enabled", set : false, type : "bool"},

// Disables website control over rightclick context menu.
{pref : "dom.event.contextmenu.enabled", set : false, type : "bool"},

// Disables firefox logging geolocation requests.
{pref : "geo.wifi.logging.enabled ", set : false, type : "bool"},

// Number of cached DNS entries. Lower number = More requests but less
// data stored.
{pref : "network.dnsCacheEntries", set : 100, type : "int"},

// Time DNS entries are cached in seconds.
{pref : "network.dnsCacheExpiration", set : 60, type : "int"},

// Disables saving of formdata.
{pref : "browser.formfill.enable", set : false, type : "bool"},

// The attribute would be useful for letting websites track visitors’
// clicks.
{pref : "browser.send_pings", set : false, type : "bool"},

// WebSockets is a technology that makes it possible to open an
// interactive communication session between the user's browser and a
// server.
{pref : "network.websocket.enabled", set : false, type : "bool"},

// WebGL is a potential security risk.
{pref : "webgl.disabled", set : false, type : "bool"}
];

function startup(data, reason) { setPrivacyPrefs(); }

function shutdown(data, reason) { resetPrivacyPrefs(); }

function install(data, reason) { setPrivacyPrefs(); }

function uninstall(data, reason) { resetPrivacyPrefs(); }

function setPrivacyPrefs()
{
for (i = 0; i < privacyPrefs.length; i++) {

switch (privacyPrefs[i]["type"]) {

case "int":
Services.prefs.setIntPref(
privacyPrefs[i]["pref"],
privacyPrefs[i]["set"]);
break;
case "bool":
Services.prefs.setBoolPref(
privacyPrefs[i]["pref"],
privacyPrefs[i]["set"]);
break;
case "char":
Services.prefs.setCharPref(
privacyPrefs[i]["pref"],
privacyPrefs[i]["set"]);
break;
default:
break;
}
}
}

function resetPrivacyPrefs()
{
for (i = 0; i < privacyPrefs.length; i++) {

Services.prefs.clearUserPref(privacyPrefs[i]["pref"]);
}
}
25 changes: 25 additions & 0 deletions install.rdf
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>{a9dbd5c7-1de8-4526-80f3-a296e6b0e7af}</em:id>
<em:version>0.1</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>

<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>7.0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
</Description>
</em:targetApplication>

<!-- Front End MetaData -->
<em:name>PrivacyFox</em:name>
<em:description>PrivacyFox attemts to disable/enable various features in firefox in order to enhance privacy.</em:description>
<em:creator>TheCreeper</em:creator>
</Description>
</RDF>

0 comments on commit a5636a1

Please sign in to comment.