From 3ce7ed50cb89447caaa4020c9d1a669fe23c635a Mon Sep 17 00:00:00 2001
From: JGill
Date: Thu, 28 Nov 2019 14:30:32 +1030
Subject: [PATCH 01/25] new configs tree structure
---
.../profile/advance/user-overrides.js | 199 ++++++++++++++++++
.../profile/alternative/alternative-user.js | 27 +++
privacyfighter/profile/basic/my-user.js | 84 ++++++++
privacyfighter/profile/set-homepage.json | 7 +
privacyfighter/profile/set-ui.json | 6 +
5 files changed, 323 insertions(+)
create mode 100644 privacyfighter/profile/advance/user-overrides.js
create mode 100644 privacyfighter/profile/alternative/alternative-user.js
create mode 100644 privacyfighter/profile/basic/my-user.js
create mode 100644 privacyfighter/profile/set-homepage.json
create mode 100644 privacyfighter/profile/set-ui.json
diff --git a/privacyfighter/profile/advance/user-overrides.js b/privacyfighter/profile/advance/user-overrides.js
new file mode 100644
index 0000000..d1b844a
--- /dev/null
+++ b/privacyfighter/profile/advance/user-overrides.js
@@ -0,0 +1,199 @@
+
+
+/* PRIVACY FIGHTHER USER-OVERRIDES.JS START ***/
+user_pref("_user.js.parrot", "overrides section syntax error");
+user_pref("privacyfighter.config.version", 70.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
+
+
+// SECTION 0100: STARTUP
+//// --- comment-out --- 'browser.shell.checkDefaultBrowser'
+//// --- comment-out --- 'browser.startup.homepage'
+//// --- comment-out --- 'browser.startup.page'
+//// --- comment-out --- 'browser.newtabpage.enabled'
+
+
+// [SECTION 0200]: GEOLOCATION
+// [SECTION 0300]: QUIET FOX
+
+//// --- comment-out --- 'app.update.auto'
+//// --- comment-out --- 'extensions.update.autoUpdateDefault' # Keep extensions updated
+
+//// --- comment-out --- 'browser.search.update'
+
+// Don't force disable `Pocket`, as it has large userbase (10M+ installs on Androids alone)
+// pocket is owned by Mozilla, if any organisation can be trusted with our bookmarks, it's got to be it.
+//// --- comment-out --- 'extensions.pocket.enabled'
+
+//// --- comment-out --- 'captivedetect.canonicalURL'
+//// --- comment-out --- 'network.captive-portal-service.enabled'
+
+
+// [SECTION 0500]: SYSTEM ADD-ONS / EXPERIMENTS
+//// --- comment-out --- 'extensions.systemAddon.update.enabled'
+//// --- comment-out --- 'extensions.systemAddon.update.url'
+
+//// --- comment-out --- 'extensions.formautofill.addresses.enabled'
+//// --- comment-out --- 'extensions.formautofill.available'
+//// --- comment-out --- 'extensions.formautofill.heuristics.enabled'
+
+
+// [SECTION 0700]: HTTP* / TCP/IP / DNS / PROXY / SOCKS etc
+//// --- comment-out --- 'network.dns.disableIPv6'
+
+//// --- comment-out --- 'network.http.altsvc.enabled'
+//// --- comment-out --- 'network.http.altsvc.oe'
+
+// //// --- comment-out --- 'network.proxy.socks_remote_dns' // TODO See if problematic
+
+//// --- comment-out --- 'network.file.disable_unc_paths'
+//// --- comment-out --- 'network.gio.supported-protocols'
+
+
+// [SECTION 0800]: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS
+//// --- comment-out --- 'keyword.enabled' // don't block search from urlbar
+
+//// --- comment-out --- 'browser.search.suggest.enabled' // live searches in urlbar
+//// --- comment-out --- 'browser.urlbar.suggest.searches'
+//// --- comment-out --- 'network.file.disable_unc_paths'
+//// --- comment-out --- 'browser.formfill.enable'
+// //// --- comment-out --- 'dom.forms.datetime' // TODO See if problematic
+
+
+// [SECTION 0900]: PASSWORDS
+//// --- comment-out --- 'security.ask_for_password'
+//// --- comment-out --- 'security.password_lifetime'
+
+//// --- comment-out --- 'signon.autofillForms'
+//// --- comment-out --- 'signon.formlessCapture.enabled'
+
+//// --- comment-out --- 'network.auth.subresource-http-auth-allow' // some breakage https://bugzilla.mozilla.org/show_bug.cgi?id=1197944
+//// --- comment-out --- 'signon.formlessCapture.enabled'
+
+
+// [SECTION 1000]: CACHE / SESSION (RE)STORE / FAVICONS
+//// --- comment-out --- 'browser.sessionstore.interval'
+
+
+// [SECTION 1200]: HTTPS (SSL/TLS / OCSP / CERTS / HPKP / CIPHERS)
+//// --- comment-out --- 'security.ssl.require_safe_negotiation'
+//// --- comment-out --- 'security.tls.enable_0rtt_data'
+
+//// --- comment-out --- 'security.OCSP.require'
+//// --- comment-out --- 'security.pki.sha1_enforcement_level' // dont disable SHA-1 certificates
+//// --- comment-out --- 'security.family_safety.mode' // dont disable windows family safety cert
+//// --- comment-out --- 'security.cert_pinning.enforcement_level' // dont inforce cert pinning
+//// --- comment-out --- 'security.mixed_content.block_display_content'
+
+
+// [SECTION 1400]: FONTS
+//// --- comment-out --- 'gfx.font_rendering.opentype_svg.enabled'
+//// --- comment-out --- 'gfx.font_rendering.graphite.enabled'
+
+
+// [SECTION 1600]: HEADERS / REFERERS
+//// --- comment-out --- 'network.http.referer.XOriginPolicy'
+
+
+// [SECTION 1700]: CONTAINERS
+// [SECTION 1800]: PLUGINS
+//// --- comment-out --- 'plugin.sessionPermissionNow.intervalInMinutes'
+
+//// --- comment-out --- 'plugin.state.flash' // dont force disable flash
+
+// dont disable widevine CDM (Content Decryption Module)
+//// --- comment-out --- 'media.gmp-widevinecdm.visible'
+//// --- comment-out --- 'media.gmp-widevinecdm.enabled'
+
+// dont disable all DRM content (EME: Encryption Media Extension)
+//// --- comment-out --- 'media.eme.enabled'
+
+
+// [SECTION 2000]: MEDIA / CAMERA / MIC
+// keep WebRTC but expose only default ip (don't leak)
+//// --- comment-out --- 'media.peerconnection.enabled'
+//// --- comment-out --- 'media.peerconnection.ice.default_address_only'
+//// --- comment-out --- 'media.peerconnection.ice.no_host'
+
+// dont disable webGL
+//// --- comment-out --- 'webgl.disabled'
+//// --- comment-out --- 'webgl.dxgl.enabled'
+//// --- comment-out --- 'webgl.enable-webgl2'
+//// --- comment-out --- 'webgl.min_capability_mode'
+//// --- comment-out --- 'webgl.disable-extensions'
+//// --- comment-out --- 'webgl.disable-fail-if-major-performance-caveat'
+
+// dont disable screensharing
+//// --- comment-out --- 'media.getusermedia.screensharing.enabled'
+//// --- comment-out --- 'media.getusermedia.browser.enabled'
+//// --- comment-out --- 'media.getusermedia.audiocapture.enabled'
+
+
+// [SECTION 2200]: WINDOW MEDDLING & LEAKS / POPUPS
+//// --- comment-out --- 'dom.popup_allowed_events'
+
+// [SECTION 2300]: WEB WORKERS
+// dont disable web workers, webnotifications
+//// --- comment-out --- 'dom.serviceWorkers.enabled'
+
+
+// [SECTION 2400]: DOM (DOCUMENT OBJECT MODEL) & JAVASCRIPT
+//// --- comment-out --- 'dom.event.clipboardevents.enabled'
+
+//// --- comment-out --- 'dom.allow_cut_copy'
+
+// don't disable "Confirm you want to leave" dialog on page close
+//// --- comment-out --- 'dom.disable_beforeunload'
+
+//// --- comment-out --- 'javascript.options.asmjs' // dont disable asm.js
+//// --- comment-out --- 'javascript.options.wasm' // dont disable WebAssembly
+//// --- comment-out --- 'dom.vibrator.enabled'
+
+
+// [SECTION 2500]: HARDWARE FINGERPRINTING
+// [SECTION 2600]: MISCELLANEOUS
+//// --- comment-out --- 'browser.tabs.remote.allowLinkedWebInFileUriProcess'
+//// --- comment-out --- 'browser.pagethumbnails.capturing_disabled'
+//// --- comment-out --- 'browser.uitour.enabled'
+//// --- comment-out --- 'browser.uitour.url'
+//// --- comment-out --- 'devtools.chrome.enabled'
+//// --- comment-out --- 'network.IDN_show_punycode'
+//// --- comment-out --- 'pdfjs.disabled' # don't force enable it, as it doesn't always rendender properly
+
+//// --- comment-out --- 'network.protocol-handler.external.ms-windows-store'
+
+//// --- comment-out --- 'browser.download.manager.addToRecentDocs'
+//// --- comment-out --- 'security.csp.experimentalEnabled'
+
+//// --- comment-out --- 'extensions.enabledScopes'
+//// --- comment-out --- 'extensions.autoDisableScopes'
+
+
+// [SECTION 2700]: PERSISTENT STORAGE
+// allow third party cookies, but session only and "4" exclude known trackers
+//// --- comment-out --- 'network.cookie.cookieBehavior' // ovewrritten to 4 in "user-overrides.js"
+user_pref("network.cookie.cookieBehavior", 4);
+
+// don't enforce history and downloads to clear on shutdown but cache, cookies, offline web data will be cleared
+user_pref("privacy.sanitize.sanitizeOnShutdown", true);
+user_pref("privacy.clearOnShutdown.history", false);
+user_pref("privacy.clearOnShutdown.formdata", false);
+user_pref("privacy.clearOnShutdown.downloads", false);
+user_pref("privacy.clearOnShutdown.openWindows", false);
+
+// // dont set time range to "Everything" as default in "Clear Recent History"
+//// --- comment-out --- 'privacy.sanitize.timeSpan'
+
+
+// [SECTION 4000]: FPI (FIRST PARTY ISOLATION)
+// disable first party isolation, we use temporary_containers
+//// --- comment-out --- 'privacy.firstparty.isolate'
+//// --- comment-out --- 'privacy.firstparty.isolate.restrict_opener_access'
+
+
+// [SECTION 4500]: RFP (RESIST FINGERPRINTING)
+// heard this prevents from reviewing addons on AMO
+//// --- comment-out --- 'privacy.resistFingerprinting.block_mozAddonManager'
+
+//// --- comment-out --- 'privacy.resistFingerprinting.letterboxing'
+
+user_pref("_user.js.parrot", "SUCCESS");
diff --git a/privacyfighter/profile/alternative/alternative-user.js b/privacyfighter/profile/alternative/alternative-user.js
new file mode 100644
index 0000000..970728b
--- /dev/null
+++ b/privacyfighter/profile/alternative/alternative-user.js
@@ -0,0 +1,27 @@
+
+
+/* PRIVACY FIGHTHER 'user.js' FOR 'alternative' PROFILE
+
+This setup only clears all types of persistent storage (cookies, caches, offline data) on shutdown.
+To be used with the 'alternative' profile. Much better option than needing Chrome for rare occations when
+a website breaks in the main profile.
+
+***/
+
+
+user_pref("privacyfighter.config.version", 69.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
+
+
+// enforce caches, cookies, ofline data to clear on shutdown
+user_pref("privacy.sanitize.sanitizeOnShutdown", true);
+
+user_pref("privacy.clearOnShutdown.cache", true);
+user_pref("privacy.clearOnShutdown.cookies", true);
+user_pref("privacy.clearOnShutdown.offlineApps", true); // Offline Website Data
+user_pref("privacy.clearOnShutdown.sessions", true); // Active Logins
+
+user_pref("privacy.clearOnShutdown.siteSettings", false); // Site Preferences
+user_pref("privacy.clearOnShutdown.history", false); // Browsing & Download History
+user_pref("privacy.clearOnShutdown.formdata", false); // Form & Search History
+user_pref("privacy.clearOnShutdown.downloads", false);
+user_pref("privacy.clearOnShutdown.openWindows", false);
diff --git a/privacyfighter/profile/basic/my-user.js b/privacyfighter/profile/basic/my-user.js
new file mode 100644
index 0000000..fc3d95d
--- /dev/null
+++ b/privacyfighter/profile/basic/my-user.js
@@ -0,0 +1,84 @@
+/* PRIVACYFIGHTER user.js
+ *
+ *
+ * ***/
+user_pref("privacyfighter.config.version", 70.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
+
+
+/* 0210: use Mozilla geolocation service instead of Google when geolocation is enabled
+ * Optionally enable logging to the console (defaults to false) ***/
+user_pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
+
+/* 0320: disable about:addons' Recommendations pane (uses Google Analytics) ***/
+user_pref("extensions.getAddons.showPane", false); // [HIDDEN PREF]
+user_pref("extensions.webservice.discoverURL", "");
+
+/* 0321: disable recommendations in about:addons' Extensions and Themes panes [FF68+] ***/
+user_pref("extensions.getAddons.discovery.api_url", "");
+user_pref("extensions.htmlaboutaddons.discover.enabled", false);
+user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
+
+/* 0343: disable personalized Extension Recommendations in about:addons and AMO [FF65+]
+ * [NOTE] This pref has no effect when Health Reports (0340) are disabled
+ * [SETTING] Privacy & Security>Firefox Data Collection & Use>...>Allow Firefox to make personalized extension rec.
+ * [1] https://support.mozilla.org/kb/personalized-extension-recommendations ***/
+user_pref("browser.discovery.enabled", false);
+
+/* 1021: disable storing extra session data [SETUP-CHROME]
+ * extra session data contains contents of forms, scrollbar positions, cookies and POST data
+ * define on which sites to save extra session data:
+ * 0=everywhere, 1=unencrypted sites, 2=nowhere ***/
+user_pref("browser.sessionstore.privacy_level", 2);
+
+/* 1610: ALL: enable the DNT (Do Not Track) HTTP header
+ * [NOTE] DNT is enforced with Tracking Protection regardless of this pref
+ * [SETTING] Privacy & Security>Content Blocking>Send websites a "Do Not Track"... ***/
+user_pref("privacy.donottrackheader.enabled", true);
+
+/* 1701: enable Container Tabs setting in preferences (see 1702) [FF50+]
+ * [1] https://bugzilla.mozilla.org/1279029 ***/
+user_pref("privacy.userContext.ui.enabled", true);
+
+/* 1702: enable Container Tabs [FF50+]
+ * [SETTING] General>Tabs>Enable Container Tabs ***/
+user_pref("privacy.userContext.enabled", true);
+
+/* 2702: set third-party cookies (i.e ALL) (if enabled, see 2701) to session-only
+ and (FF58+) set third-party non-secure (i.e HTTP) cookies to session-only
+ [NOTE] .sessionOnly overrides .nonsecureSessionOnly except when .sessionOnly=false and
+ .nonsecureSessionOnly=true. This allows you to keep HTTPS cookies, but session-only HTTP ones
+ * [1] https://feeding.cloud.geek.nz/posts/tweaking-cookies-for-privacy-in-firefox/
+ * [2] http://kb.mozillazine.org/Network.cookie.thirdparty.sessionOnly ***/
+user_pref("network.cookie.thirdparty.sessionOnly", true);
+user_pref("network.cookie.thirdparty.nonsecureSessionOnly", true); // [FF58+]v
+
+/* 2731: enforce websites to ask to store data for offline use
+ * [1] https://support.mozilla.org/questions/1098540
+ * [2] https://bugzilla.mozilla.org/959985 ***/
+user_pref("offline-apps.allow_by_default", false);
+
+/* 2802: enable Firefox to clear items on shutdown (see 2803)
+ * [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes ***/
+user_pref("privacy.sanitize.sanitizeOnShutdown", true);
+/* 2803: set what items to clear on shutdown (if 2802 is true) [SETUP-CHROME]
+ * [NOTE] If 'history' is true, downloads will also be cleared regardless of the value
+ * but if 'history' is false, downloads can still be cleared independently
+ * However, this may not always be the case. The interface combines and syncs these
+ * prefs when set from there, and the sanitize code may change at any time
+ * [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes>Settings ***/
+user_pref("privacy.clearOnShutdown.cache", true);
+user_pref("privacy.clearOnShutdown.cookies", true);
+user_pref("privacy.clearOnShutdown.downloads", false); // see note above
+user_pref("privacy.clearOnShutdown.formdata", false); // Form & Search History
+user_pref("privacy.clearOnShutdown.history", false); // Browsing & Download History
+user_pref("privacy.clearOnShutdown.offlineApps", true); // Offline Website Data
+user_pref("privacy.clearOnShutdown.sessions", true); // Active Logins
+user_pref("privacy.clearOnShutdown.siteSettings", false); // Site Preferences
+user_pref("privacy.clearOnShutdown.openWindows", false);
+
+/* 4501: enable privacy.resistFingerprinting [FF41+]
+ * This pref is the master switch for all other privacy.resist* prefs unless stated
+ * [SETUP-WEB] RFP can cause the odd website to break in strange ways, and has a few side affects,
+ * but is largely robust nowadays. Give it a try. Your choice. Also see 4504 (letterboxing).
+ * [1] https://bugzilla.mozilla.org/418986 ***/
+user_pref("privacy.resistFingerprinting", true);
diff --git a/privacyfighter/profile/set-homepage.json b/privacyfighter/profile/set-homepage.json
new file mode 100644
index 0000000..34d9eb7
--- /dev/null
+++ b/privacyfighter/profile/set-homepage.json
@@ -0,0 +1,7 @@
+{
+ "prefs":
+ [
+ {"pref": "\"browser.startup.homepage\"", "value": "\"https://duckduckgo.com/?kak=-1&kax=-1\"", "exists": false},
+ {"pref": "\"browser.startup.page\"", "value": "\"https://duckduckgo.com/?kak=-1&kax=-1\"", "exists": false}
+ ]
+}
diff --git a/privacyfighter/profile/set-ui.json b/privacyfighter/profile/set-ui.json
new file mode 100644
index 0000000..434dc94
--- /dev/null
+++ b/privacyfighter/profile/set-ui.json
@@ -0,0 +1,6 @@
+{
+ "prefs":
+ [
+ {"pref": "\"browser.uiCustomization.state\"", "value": "\"{\\\"placements\\\":{\\\"widget-overflow-fixed-list\\\":[],\\\"nav-bar\\\":[\\\"back-button\\\",\\\"forward-button\\\",\\\"stop-reload-button\\\",\\\"home-button\\\",\\\"urlbar-container\\\",\\\"downloads-button\\\",\\\"library-button\\\",\\\"sidebar-button\\\",\\\"fxa-toolbar-menu-button\\\",\\\"canvasblocker_kkapsner_de-browser-action\\\",\\\"https-everywhere_eff_org-browser-action\\\",\\\"jid1-bofifl9vbdl2zq_jetpack-browser-action\\\",\\\"ublock0_raymondhill_net-browser-action\\\",\\\"_74145f27-f039-47ce-a470-a662b129930a_-browser-action\\\",\\\"_83e08b00-32de-44e7-97bb-1bab84d1350f_-browser-action\\\"],\\\"toolbar-menubar\\\":[\\\"menubar-items\\\"],\\\"TabsToolbar\\\":[\\\"tabbrowser-tabs\\\",\\\"new-tab-button\\\",\\\"alltabs-button\\\",\\\"_c607c8df-14a7-4f28-894f-29e8722976af_-browser-action\\\"],\\\"PersonalToolbar\\\":[\\\"personal-bookmarks\\\"]},\\\"seen\\\":[\\\"developer-button\\\",\\\"_c607c8df-14a7-4f28-894f-29e8722976af_-browser-action\\\",\\\"canvasblocker_kkapsner_de-browser-action\\\",\\\"https-everywhere_eff_org-browser-action\\\",\\\"jid1-bofifl9vbdl2zq_jetpack-browser-action\\\",\\\"ublock0_raymondhill_net-browser-action\\\",\\\"_74145f27-f039-47ce-a470-a662b129930a_-browser-action\\\",\\\"_83e08b00-32de-44e7-97bb-1bab84d1350f_-browser-action\\\"],\\\"dirtyAreaCache\\\":[\\\"nav-bar\\\",\\\"TabsToolbar\\\"],\\\"currentVersion\\\":16,\\\"newElementCount\\\":5}\"", "exists": false}
+ ]
+}
From 2c6595d9f1ce42efadea50d1c023f149ab133efb Mon Sep 17 00:00:00 2001
From: JGill
Date: Thu, 28 Nov 2019 14:47:10 +1030
Subject: [PATCH 02/25] File rename
---
privacyfighter/profile/basic/{my-user.js => basic-user.js} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename privacyfighter/profile/basic/{my-user.js => basic-user.js} (100%)
diff --git a/privacyfighter/profile/basic/my-user.js b/privacyfighter/profile/basic/basic-user.js
similarity index 100%
rename from privacyfighter/profile/basic/my-user.js
rename to privacyfighter/profile/basic/basic-user.js
From a6e129263016ab63458461bb031935b04b43b1a3 Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 29 Nov 2019 11:53:43 +1030
Subject: [PATCH 03/25] Options to skip setting homepage or UI customizations,
paths restructure
---
privacyfighter/pf.py | 154 ++++++++++++++++++++++++++++---------------
1 file changed, 102 insertions(+), 52 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index b66cb43..39235b0 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -20,9 +20,11 @@
# To produce gui installer with pyinstaller. also uncomment @Gooey decorator
gui_mode = False
-__version__ = "1.3.0.dev1"
+__version__ = "1.3.0"
__basefilepath__ = os.path.dirname(os.path.abspath(__file__))
+repo_location = "https://raw.githubusercontent.com/jotyGill/privacy-fighter/develop/privacyfighter"
+
# temporary folder to download files in
temp_folder = tempfile.mkdtemp()
@@ -38,10 +40,29 @@
# @Gooey(
# progress_regex=r"^progress: (?P\d+)/(?P\d+)$",
# progress_expr="current / total * 100",
+# hide_progress_msg=True,
# program_name="Privacy Fighter",
# requires_shell=False,
# tabbed_groups=True,
# default_size=(900, 530),
+# menu=[
+# {
+# "name": "About",
+# "items": [
+# {
+# "type": "AboutDialog",
+# "menuTitle": "About",
+# "name": "Privacy Fighter",
+# "description": "A Browser Setup To Protect Your Privacy",
+# "version": __version__,
+# "website": "https://github.com/jotyGill/privacy-fighter",
+# "developer": "https://github.com/jotyGill",
+# "license": "GNU General Public License v3 or later (GPLv3+)",
+# },
+# {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"},
+# ],
+# }
+# ],
# )
def main():
parser = argparse.ArgumentParser(description="Privacy-Fighter: A Browser Setup To Protect Your Privacy")
@@ -53,21 +74,14 @@ def main():
"1. Firefox is installed but not running at the moment\n"
"2. After this setup finishes, Remember to follow post installation instructions",
)
- install_tab.add_argument(
- "--show-post-installation-instructions",
- dest="post_installation_instructions",
- default="https://github.com/jotyGill/privacy-fighter/#70-post-installation",
- help="You can copy this link and open it after installation",
- type=str,
- )
- install_tab.add_argument(
- "-m",
- "--setup-main",
- dest="setup_main",
- default=gui_mode, # True if in gui_mode
- help="Setup the main Firefox profile for day-to-day browsing",
- action="store_true",
- )
+ if gui_mode:
+ install_tab.add_argument(
+ "--show-post-installation-instructions",
+ dest="post_installation_instructions",
+ default="https://github.com/jotyGill/privacy-fighter/#70-post-installation",
+ help="You can copy this link and open it after installation",
+ type=str,
+ )
advance_options = parser.add_argument_group("Advance Options", "Advance Options for the geekz")
advance_options.add_argument(
@@ -75,8 +89,16 @@ def main():
"--advance-setup",
dest="advance_setup",
default=False,
- help="Configure better protection with ghacksuserjs,\n"
- "It is recommneded to install 'alternative' profile with it",
+ help="Configure better protection with ghacksuserjs for the main profile.\n"
+ "When using this, it is recommneded to setup 'alternative' profile as well",
+ action="store_true",
+ )
+ advance_options.add_argument(
+ "-m",
+ "--setup-main",
+ dest="setup_main",
+ default=gui_mode, # True if in gui_mode
+ help="Setup the main Firefox profile for day-to-day browsing",
action="store_true",
)
advance_options.add_argument(
@@ -99,8 +121,8 @@ def main():
"-u",
"--user-overrides-url",
dest="user_overrides_url",
- default="https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter/profile/user-overrides.js",
- help="You can use your fork of user-overrides.js",
+ default=repo_location + "/profile/advance/user-overrides.js",
+ help="You can use your own user-overrides.js",
type=str,
)
advance_options.add_argument(
@@ -111,6 +133,36 @@ def main():
action="store_true",
)
+ if gui_mode:
+ install_tab.add_argument(
+ "--set-homepage",
+ dest="set_homepage",
+ default=True,
+ help="Set homepage to privacy respecting search engine (DuckDuckGo)",
+ action="store_false",
+ )
+ install_tab.add_argument(
+ "--set-ui",
+ dest="set_ui",
+ default=True,
+ help="Customize Firefox UI elements to better fit Addons (Recommended)",
+ action="store_false",
+ )
+ else:
+ install_tab.add_argument(
+ "--no-homepage",
+ dest="set_homepage",
+ default=False,
+ help="Don't change the homepage to duckduckgo",
+ action="store_true",
+ )
+ install_tab.add_argument(
+ "--no-set-ui", dest="set_ui", default=False, help="Don't change Firefox UI elements", action="store_true",
+ )
+
+ set_homepage = not parser.parse_args().set_homepage
+ set_ui = not parser.parse_args().set_ui
+
args = parser.parse_args()
run(
args.profile_name,
@@ -119,10 +171,12 @@ def main():
args.setup_main,
args.setup_alt,
args.advance_setup,
+ set_homepage,
+ set_ui,
)
-def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt, advance_setup):
+def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt, advance_setup, set_homepage, set_ui):
if not setup_main and not setup_alt:
if gui_mode:
print("ERROR: At Least One of the two, 'setup_main' or 'setup_alt' Option Is Required")
@@ -142,14 +196,16 @@ def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt
firefox_path = get_firefox_path()
if setup_main:
- setup_main_profile(firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup)
+ setup_main_profile(
+ firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
+ )
if setup_alt:
setup_alt_profile(firefox_path)
# cleanup
shutil.rmtree(temp_folder)
- print("------------------DONE-------------------\n")
+ print("\n------------------DONE-------------------\n")
# here subprocess.run("firefox -p -no-remote"), ask user to create another profile TEMP, https://github.com/mhammond/pywin32
print(
"You can now close this and run Firefox :)\n\n"
@@ -159,7 +215,9 @@ def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt
# The actual setup: if unless specified, the 'default' firefox profile will be setup with privacyfighter configs.
-def setup_main_profile(firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup):
+def setup_main_profile(
+ firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
+):
# list of profile_dir names under "firefox_path"
profile_dirs = [d for d in os.listdir(firefox_path) if os.path.isdir(os.path.join(firefox_path, d))]
@@ -186,11 +244,11 @@ def setup_main_profile(firefox_path, profile_name, user_overrides_url, skip_exte
profiles = [os.path.join(firefox_path, d) for d in matches]
print("Firefox Profile to be secured/modified : ", profiles, "\n")
- # only setup ghacksuserjs, is specified in advance configs, otherwise simpler "my-user.js"
+ # only setup ghacks-user.js, in advance mode, otherwise setup the "basic-user.js"
if advance_setup:
- setup_ghacksuserjs(user_overrides_url)
+ setup_ghacks_userjs(user_overrides_url)
else:
- setup_myuserjs()
+ setup_basic_userjs()
if not skip_extensions:
setup_extensions(advance_setup)
@@ -200,7 +258,12 @@ def setup_main_profile(firefox_path, profile_name, user_overrides_url, skip_exte
backup_prefsjs(firefox_p_path)
print("\nModified Preferences (user.js) and Extensions will now be copied to {}".format(profile))
recusive_copy(temp_folder, firefox_p_path) # copies modified user.js, extensions
- apply_one_time_prefs(profile) # modifies "prefs.js"
+ if set_homepage:
+ # set homepage to duckduckgo.com
+ apply_one_time_prefs(profile, repo_location + "/profile/set-homepage.json")
+ if set_ui:
+ # Customize Firefox UI to better fit all addons
+ apply_one_time_prefs(profile, repo_location + "/profile/set-ui.json")
# The 'alternative' firefox profile.
@@ -224,8 +287,7 @@ def setup_alt_profile(firefox_path, profile_name="alternative"):
print("Firefox Profile to be configured as an alternative : ", profile, "\n")
alt_userjs_path = os.path.join(firefox_path, profile, "user.js")
download_file(
- "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter/profile/alternative-user.js",
- alt_userjs_path,
+ repo_location + "/profile/alternative/alternative-user.js", alt_userjs_path,
)
@@ -240,9 +302,7 @@ def resource_path(relative_path):
def setup_extensions(advance_setup):
# Download the extensions list with their download links from the repo
- ext_list = get_file(
- "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter/profile/extensions.json"
- )
+ ext_list = get_file(repo_location + "/profile/extensions.json")
extensions = ext_list.json()["extensions"]
for index, ext in enumerate(extensions):
@@ -258,9 +318,7 @@ def setup_extensions(advance_setup):
sys.stdout.flush()
# Download the "browser-extensions-data". these are extension's configuration files
- extensions_configs = get_file(
- "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter/profile/browser-extension-data.zip"
- )
+ extensions_configs = get_file(repo_location + "/profile/browser-extension-data.zip")
with zipfile.ZipFile(io.BytesIO(extensions_configs.content)) as thezip:
thezip.extractall(temp_folder)
@@ -289,17 +347,14 @@ def download_file(url, dest):
sys.exit(1)
-# Installs the default mininal userjs
-def setup_myuserjs():
- # Download the simpler my-user.js
- download_file(
- "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter/profile/my-user.js",
- os.path.join(temp_folder, "user.js"),
- )
+# Installs the default basic userjs
+def setup_basic_userjs():
+ # Download the simpler basic-user.js
+ download_file(repo_location + "/profile/basic/basic-user.js", os.path.join(temp_folder, "user.js"))
# Installs the ghacks-user.js and applies the user_overrides
-def setup_ghacksuserjs(user_overrides_url):
+def setup_ghacks_userjs(user_overrides_url):
# Download the ghacks user.js
download_file(
"https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/user.js",
@@ -355,17 +410,13 @@ def extract_user_overrides():
# apply some prefs directly to "pref.js", users can change these later.
-def apply_one_time_prefs(profile):
- print("\nApplying onetime preferences to 'prefs.js'")
-
+def apply_one_time_prefs(profile, prefjs):
# prefs to be applied directly to 'prefs.js' instead of 'user.js' so end users can change these
# contains 'exists' to change if found and turn 'exists' True. the ones not found will be later added
# keep this in profile loop, so 'exists' True resets for next profile
- # Download the "one time prefs" from the repo
- r = get_file(
- "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter/profile/one-time-prefs.json"
- )
+ # Download the config file containing preferences from the location
+ r = get_file(prefjs)
one_time_prefs = r.json()["prefs"]
prefsjs_file = os.path.join(profile, "prefs.js")
@@ -413,7 +464,6 @@ def get_firefox_path():
def latest_version():
- # https://github.com/jotyGill/privacy-fighter/releases/latest/download/version.txt
latest_version = get_file(
"https://github.com/jotyGill/privacy-fighter/releases/latest/download/version.txt"
).text.strip()
From cc0bd7f44828c301ddd15e90404078987c29b5af Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 29 Nov 2019 14:05:54 +1030
Subject: [PATCH 04/25] Auto create 'alternative' profile and don't auto select
profiles
---
privacyfighter/pf.py | 54 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index 39235b0..d51542c 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import argparse
+import configparser
import datetime
import fileinput
import fnmatch
@@ -195,13 +196,21 @@ def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt
firefox_path = get_firefox_path()
+ firefox_ini_path = os.path.join(firefox_path, "profiles.ini")
+ firefox_ini_config = parse_firefox_ini_config(firefox_ini_path)
+
if setup_main:
setup_main_profile(
firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
)
if setup_alt:
+ if not alternative_profile_exists(firefox_ini_config):
+ create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config)
setup_alt_profile(firefox_path)
+ # set firefox config to ask which profile to choose everytime you run firefox
+ dont_autoselect_profiles(firefox_ini_path, firefox_ini_config)
+
# cleanup
shutil.rmtree(temp_folder)
@@ -266,6 +275,37 @@ def setup_main_profile(
apply_one_time_prefs(profile, repo_location + "/profile/set-ui.json")
+def parse_firefox_ini_config(firefox_ini_path):
+ config = configparser.ConfigParser()
+ config.optionxform = str # preserve string case
+
+ config.read(firefox_ini_path)
+ return config
+
+
+def alternative_profile_exists(firefox_ini_config):
+ for section in firefox_ini_config.sections():
+ try:
+ if firefox_ini_config.get(section, "Name") == "alternative":
+ return True
+ except configparser.NoOptionError:
+ pass
+ return False
+
+
+def create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config):
+ all_sections = firefox_ini_config.sections()
+ # print(config.sections())
+
+ alt_profile_path = os.path.join(firefox_path, "alternative")
+ os.makedirs(alt_profile_path, exist_ok=True)
+
+ total_profiles = len([p for p in all_sections if "Profile" in p])
+ new_profile = "Profile{!s}".format(total_profiles)
+ firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "alternative"}
+ firefox_ini_config.write(open(firefox_ini_path, "w"), space_around_delimiters=False)
+
+
# The 'alternative' firefox profile.
def setup_alt_profile(firefox_path, profile_name="alternative"):
# list of profile_dir names under "firefox_path"
@@ -535,5 +575,19 @@ def firefox_is_running():
return False
+# set firefox config to ask which profile to choose everytime you run firefox
+def dont_autoselect_profiles(firefox_ini_path, firefox_ini_config):
+
+ try:
+ firefox_ini_config.get("General", "StartWithLastProfile")
+ firefox_ini_config["General"]["StartWithLastProfile"] = "0"
+ except configparser.NoSectionError:
+ firefox_ini_config["General"] = {"StartWithLastProfile": "0"}
+ except configparser.NoOptionError:
+ firefox_ini_config["General"]["StartWithLastProfile"] = "0"
+
+ firefox_ini_config.write(open(firefox_ini_path, "w"), space_around_delimiters=False)
+
+
if __name__ == "__main__":
main()
From 2aad5754808e0f0b365a11ace95c7746895923cc Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 29 Nov 2019 14:17:20 +1030
Subject: [PATCH 05/25] Always setup 'alternative' profile as well
---
privacyfighter/pf.py | 54 ++++++++------------------------------------
1 file changed, 9 insertions(+), 45 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index d51542c..16b24c5 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -90,24 +90,7 @@ def main():
"--advance-setup",
dest="advance_setup",
default=False,
- help="Configure better protection with ghacksuserjs for the main profile.\n"
- "When using this, it is recommneded to setup 'alternative' profile as well",
- action="store_true",
- )
- advance_options.add_argument(
- "-m",
- "--setup-main",
- dest="setup_main",
- default=gui_mode, # True if in gui_mode
- help="Setup the main Firefox profile for day-to-day browsing",
- action="store_true",
- )
- advance_options.add_argument(
- "-a",
- "--setup-alt",
- dest="setup_alt",
- default=False,
- help="Setup the 'alternative' Firefox profile. (to get around any issues)",
+ help="Configure better protection with ghacks-user.js for the main profile.",
action="store_true",
)
advance_options.add_argument(
@@ -166,28 +149,11 @@ def main():
args = parser.parse_args()
run(
- args.profile_name,
- args.user_overrides_url,
- args.skip_extensions,
- args.setup_main,
- args.setup_alt,
- args.advance_setup,
- set_homepage,
- set_ui,
+ args.profile_name, args.user_overrides_url, args.skip_extensions, args.advance_setup, set_homepage, set_ui,
)
-def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt, advance_setup, set_homepage, set_ui):
- if not setup_main and not setup_alt:
- if gui_mode:
- print("ERROR: At Least One of the two, 'setup_main' or 'setup_alt' Option Is Required")
- else:
- print(
- "ERROR: At Least One of the two, '--setup-main' or '--setup-alt' \n"
- "Option Is Required. See 'privacyfighter -h' for help"
- )
- sys.exit(1)
-
+def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui):
if not latest_version():
sys.exit(1)
if firefox_is_running():
@@ -199,14 +165,12 @@ def run(profile_name, user_overrides_url, skip_extensions, setup_main, setup_alt
firefox_ini_path = os.path.join(firefox_path, "profiles.ini")
firefox_ini_config = parse_firefox_ini_config(firefox_ini_path)
- if setup_main:
- setup_main_profile(
- firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
- )
- if setup_alt:
- if not alternative_profile_exists(firefox_ini_config):
- create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config)
- setup_alt_profile(firefox_path)
+ setup_main_profile(
+ firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
+ )
+ if not alternative_profile_exists(firefox_ini_config):
+ create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config)
+ setup_alt_profile(firefox_path)
# set firefox config to ask which profile to choose everytime you run firefox
dont_autoselect_profiles(firefox_ini_path, firefox_ini_config)
From 424c521c5426bdb05a2bcb14db46302c681c5d2f Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 29 Nov 2019 16:16:07 +1030
Subject: [PATCH 06/25] Locate profiles.ini in all OS's
---
privacyfighter/pf.py | 92 ++++++++++++++++++++++++++------------------
1 file changed, 54 insertions(+), 38 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index 16b24c5..0463ce7 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -15,11 +15,10 @@
import psutil
import requests
-
-# from gooey import Gooey # comment out when producing cli version
+from gooey import Gooey # comment out when producing cli version
# To produce gui installer with pyinstaller. also uncomment @Gooey decorator
-gui_mode = False
+gui_mode = True
__version__ = "1.3.0"
__basefilepath__ = os.path.dirname(os.path.abspath(__file__))
@@ -38,33 +37,33 @@
# comment out the decorator @Gooey when in cli-mode
-# @Gooey(
-# progress_regex=r"^progress: (?P\d+)/(?P\d+)$",
-# progress_expr="current / total * 100",
-# hide_progress_msg=True,
-# program_name="Privacy Fighter",
-# requires_shell=False,
-# tabbed_groups=True,
-# default_size=(900, 530),
-# menu=[
-# {
-# "name": "About",
-# "items": [
-# {
-# "type": "AboutDialog",
-# "menuTitle": "About",
-# "name": "Privacy Fighter",
-# "description": "A Browser Setup To Protect Your Privacy",
-# "version": __version__,
-# "website": "https://github.com/jotyGill/privacy-fighter",
-# "developer": "https://github.com/jotyGill",
-# "license": "GNU General Public License v3 or later (GPLv3+)",
-# },
-# {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"},
-# ],
-# }
-# ],
-# )
+@Gooey(
+ progress_regex=r"^progress: (?P\d+)/(?P\d+)$",
+ progress_expr="current / total * 100",
+ hide_progress_msg=True,
+ program_name="Privacy Fighter",
+ requires_shell=False,
+ tabbed_groups=True,
+ default_size=(900, 530),
+ menu=[
+ {
+ "name": "About",
+ "items": [
+ {
+ "type": "AboutDialog",
+ "menuTitle": "About",
+ "name": "Privacy Fighter",
+ "description": "A Browser Setup To Protect Your Privacy",
+ "version": __version__,
+ "website": "https://github.com/jotyGill/privacy-fighter",
+ "developer": "https://github.com/jotyGill",
+ "license": "GNU General Public License v3 or later (GPLv3+)",
+ },
+ {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"},
+ ],
+ }
+ ],
+)
def main():
parser = argparse.ArgumentParser(description="Privacy-Fighter: A Browser Setup To Protect Your Privacy")
if not gui_mode:
@@ -160,16 +159,19 @@ def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_ho
print("Firefox is currently running, please close firefox first then run Privacy Fighter again")
sys.exit(1)
- firefox_path = get_firefox_path()
+ detected_os = sys.platform
+
+ # path to firefox profiles
+ firefox_path = get_firefox_profiles_path(detected_os)
- firefox_ini_path = os.path.join(firefox_path, "profiles.ini")
+ firefox_ini_path = get_firefox_ini_path(detected_os)
firefox_ini_config = parse_firefox_ini_config(firefox_ini_path)
setup_main_profile(
firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
)
if not alternative_profile_exists(firefox_ini_config):
- create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config)
+ create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config, detected_os)
setup_alt_profile(firefox_path)
# set firefox config to ask which profile to choose everytime you run firefox
@@ -257,7 +259,7 @@ def alternative_profile_exists(firefox_ini_config):
return False
-def create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config):
+def create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config, detected_os):
all_sections = firefox_ini_config.sections()
# print(config.sections())
@@ -266,7 +268,12 @@ def create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config):
total_profiles = len([p for p in all_sections if "Profile" in p])
new_profile = "Profile{!s}".format(total_profiles)
- firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "alternative"}
+ if detected_os == "linux":
+ firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "alternative"}
+ elif detected_os == "win32":
+ firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "Profiles/alternative"}
+ elif detected_os == "darwin":
+ firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "Profiles/alternative"}
firefox_ini_config.write(open(firefox_ini_path, "w"), space_around_delimiters=False)
@@ -449,9 +456,7 @@ def apply_one_time_prefs(profile, prefjs):
prefsjs.write(line)
-def get_firefox_path():
- detected_os = sys.platform
-
+def get_firefox_profiles_path(detected_os):
if detected_os == "linux":
firefox_path = os.path.join(Path.home(), ".mozilla/firefox/")
elif detected_os == "win32":
@@ -467,6 +472,17 @@ def get_firefox_path():
return firefox_path
+def get_firefox_ini_path(detected_os):
+ if detected_os == "linux":
+ firefox_ini_path = os.path.join(Path.home(), ".mozilla/firefox/profiles.ini")
+ elif detected_os == "win32":
+ firefox_ini_path = os.path.join(os.getenv("APPDATA"), "Mozilla\Firefox\profiles.ini")
+ elif detected_os == "darwin":
+ firefox_ini_path = os.path.join(Path.home(), "Library/Application Support/Firefox/profiles.ini")
+
+ return firefox_ini_path
+
+
def latest_version():
latest_version = get_file(
"https://github.com/jotyGill/privacy-fighter/releases/latest/download/version.txt"
From f707952e12fae6691fda273c6f75ba6bd44ac178 Mon Sep 17 00:00:00 2001
From: JGill
Date: Sat, 30 Nov 2019 14:38:25 +1030
Subject: [PATCH 07/25] Organised options
---
privacyfighter/pf.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index 0463ce7..2c313cc 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -20,7 +20,7 @@
# To produce gui installer with pyinstaller. also uncomment @Gooey decorator
gui_mode = True
-__version__ = "1.3.0"
+__version__ = "2.0.0"
__basefilepath__ = os.path.dirname(os.path.abspath(__file__))
repo_location = "https://raw.githubusercontent.com/jotyGill/privacy-fighter/develop/privacyfighter"
@@ -29,7 +29,7 @@
temp_folder = tempfile.mkdtemp()
# progress bar steps
-total_steps = 8
+total_steps = 9
# Create folders
extensions_folder = os.path.join(temp_folder, "extensions")
@@ -69,7 +69,7 @@ def main():
if not gui_mode:
parser.add_argument("-v", "--version", action="version", version="Privacy-Fighter " + __version__)
install_tab = parser.add_argument_group(
- "Install",
+ "Installation Info",
"Please make sure:\n"
"1. Firefox is installed but not running at the moment\n"
"2. After this setup finishes, Remember to follow post installation instructions",
@@ -124,11 +124,11 @@ def main():
help="Set homepage to privacy respecting search engine (DuckDuckGo)",
action="store_false",
)
- install_tab.add_argument(
+ advance_options.add_argument(
"--set-ui",
dest="set_ui",
default=True,
- help="Customize Firefox UI elements to better fit Addons (Recommended)",
+ help="Customise Firefox UI elements to better fit Addons (Recommended)",
action="store_false",
)
else:
@@ -139,8 +139,8 @@ def main():
help="Don't change the homepage to duckduckgo",
action="store_true",
)
- install_tab.add_argument(
- "--no-set-ui", dest="set_ui", default=False, help="Don't change Firefox UI elements", action="store_true",
+ advance_options.add_argument(
+ "--no-ui", dest="set_ui", default=False, help="Don't customise firefox UI elements", action="store_true",
)
set_homepage = not parser.parse_args().set_homepage
From 1e4258e911c1a7d3df61c202dcc9462e34f5566c Mon Sep 17 00:00:00 2001
From: JGill
Date: Wed, 4 Dec 2019 13:47:47 +1030
Subject: [PATCH 08/25] Proper setup of new profile structure
---
privacyfighter/pf.py | 178 +++++++++++++++++++------------------------
1 file changed, 79 insertions(+), 99 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index 2c313cc..af30b5c 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -11,14 +11,16 @@
import sys
import tempfile
import zipfile
-from pathlib import Path, PurePath
+from pathlib import Path
import psutil
import requests
-from gooey import Gooey # comment out when producing cli version
-# To produce gui installer with pyinstaller. also uncomment @Gooey decorator
-gui_mode = True
+# GUI-SETUP, is a tag used to find lines to change, to produce the gui-version
+
+# from gooey import Gooey # GUI-SETUP, comment out when producing cli version
+
+gui_mode = False # GUI-SETUP, change to 'True' in gui-version
__version__ = "2.0.0"
__basefilepath__ = os.path.dirname(os.path.abspath(__file__))
@@ -36,34 +38,34 @@
os.makedirs(extensions_folder, exist_ok=True)
-# comment out the decorator @Gooey when in cli-mode
-@Gooey(
- progress_regex=r"^progress: (?P\d+)/(?P\d+)$",
- progress_expr="current / total * 100",
- hide_progress_msg=True,
- program_name="Privacy Fighter",
- requires_shell=False,
- tabbed_groups=True,
- default_size=(900, 530),
- menu=[
- {
- "name": "About",
- "items": [
- {
- "type": "AboutDialog",
- "menuTitle": "About",
- "name": "Privacy Fighter",
- "description": "A Browser Setup To Protect Your Privacy",
- "version": __version__,
- "website": "https://github.com/jotyGill/privacy-fighter",
- "developer": "https://github.com/jotyGill",
- "license": "GNU General Public License v3 or later (GPLv3+)",
- },
- {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"},
- ],
- }
- ],
-)
+# GUI-SETUP, comment out the decorator @Gooey when in cli-mode
+# @Gooey(
+# progress_regex=r"^progress: (?P\d+)/(?P\d+)$",
+# progress_expr="current / total * 100",
+# hide_progress_msg=True,
+# program_name="Privacy Fighter",
+# requires_shell=False,
+# tabbed_groups=True,
+# default_size=(900, 530),
+# menu=[
+# {
+# "name": "About",
+# "items": [
+# {
+# "type": "AboutDialog",
+# "menuTitle": "About",
+# "name": "Privacy Fighter",
+# "description": "A Browser Setup To Protect Your Privacy",
+# "version": __version__,
+# "website": "https://github.com/jotyGill/privacy-fighter",
+# "developer": "https://github.com/jotyGill",
+# "license": "GNU General Public License v3 or later (GPLv3+)",
+# },
+# {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"},
+# ],
+# }
+# ],
+# )
def main():
parser = argparse.ArgumentParser(description="Privacy-Fighter: A Browser Setup To Protect Your Privacy")
if not gui_mode:
@@ -84,28 +86,29 @@ def main():
)
advance_options = parser.add_argument_group("Advance Options", "Advance Options for the geekz")
+ advance_options.add_argument(
+ "-p",
+ "--profile",
+ dest="profile_name",
+ default="privacy-fighter",
+ help="Firefox Profile to be configured with PF, default 'privacy-fighter'",
+ type=str,
+ )
advance_options.add_argument(
"-A",
+ "-a",
"--advance-setup",
dest="advance_setup",
default=False,
- help="Configure better protection with ghacks-user.js for the main profile.",
+ help="Configure better protection with ghacks-user.js instead",
action="store_true",
)
- advance_options.add_argument(
- "-p",
- "--profile",
- dest="profile_name",
- default="default",
- help="Firefox Profile to be configured with PF",
- type=str,
- )
advance_options.add_argument(
"-u",
"--user-overrides-url",
dest="user_overrides_url",
default=repo_location + "/profile/advance/user-overrides.js",
- help="You can use your own user-overrides.js",
+ help="user-overrides.js to be applied over ghacks-user.js",
type=str,
)
advance_options.add_argument(
@@ -167,12 +170,11 @@ def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_ho
firefox_ini_path = get_firefox_ini_path(detected_os)
firefox_ini_config = parse_firefox_ini_config(firefox_ini_path)
- setup_main_profile(
- firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
+ if not pf_profile_exists(profile_name, firefox_ini_config):
+ create_pf_profile(profile_name, firefox_path, firefox_ini_path, firefox_ini_config, detected_os)
+ setup_pf_profile(
+ profile_name, firefox_path, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
)
- if not alternative_profile_exists(firefox_ini_config):
- create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config, detected_os)
- setup_alt_profile(firefox_path)
# set firefox config to ask which profile to choose everytime you run firefox
dont_autoselect_profiles(firefox_ini_path, firefox_ini_config)
@@ -189,30 +191,22 @@ def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_ho
)
-# The actual setup: if unless specified, the 'default' firefox profile will be setup with privacyfighter configs.
-def setup_main_profile(
- firefox_path, profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
+# The actual setup: unless specified, a firefox profile with the name 'privacy-fighter' will be created and configured.
+def setup_pf_profile(
+ profile_name, firefox_path, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
):
# list of profile_dir names under "firefox_path"
profile_dirs = [d for d in os.listdir(firefox_path) if os.path.isdir(os.path.join(firefox_path, d))]
# Firefox sometimes creates profile "default-release", or after reset "default-release-1231212"
- # When profile_name == "default" install PF in all profiles with "default" in their names
- if profile_name == "default":
- matches = fnmatch.filter(profile_dirs, "*{}*".format(profile_name))
- else:
- matches = fnmatch.filter(profile_dirs, "*{}".format(profile_name))
- matches.extend(fnmatch.filter(profile_dirs, "*{}-*".format(profile_name)))
+ matches = fnmatch.filter(profile_dirs, "{}".format(profile_name))
+ matches.extend(fnmatch.filter(profile_dirs, "{}-*".format(profile_name)))
if not matches:
- print("ERROR: No Firefox Profile Found With The Name of '{}'. If Unsure Keep it 'default'".format(profile_name))
- sys.exit(1)
- elif len(matches) > 1 and profile_name != "default":
print(
- "ERROR: 'Profile Name' string matches more than one profile folders, ",
- "please provide the full name with -p : ",
- matches,
- "\n",
+ "ERROR: No Firefox Profile Found With The Name of '{}'. If Unsure Keep it 'privacy-fighter'".format(
+ profile_name
+ )
)
sys.exit(1)
else:
@@ -249,59 +243,42 @@ def parse_firefox_ini_config(firefox_ini_path):
return config
-def alternative_profile_exists(firefox_ini_config):
+def pf_profile_exists(profile_name, firefox_ini_config):
for section in firefox_ini_config.sections():
try:
- if firefox_ini_config.get(section, "Name") == "alternative":
+ if firefox_ini_config.get(section, "Name") == profile_name:
return True
except configparser.NoOptionError:
pass
return False
-def create_alt_profile(firefox_path, firefox_ini_path, firefox_ini_config, detected_os):
+def create_pf_profile(profile_name, firefox_path, firefox_ini_path, firefox_ini_config, detected_os):
all_sections = firefox_ini_config.sections()
# print(config.sections())
- alt_profile_path = os.path.join(firefox_path, "alternative")
- os.makedirs(alt_profile_path, exist_ok=True)
+ pf_profile_path = os.path.join(firefox_path, profile_name)
+ os.makedirs(pf_profile_path, exist_ok=True)
total_profiles = len([p for p in all_sections if "Profile" in p])
new_profile = "Profile{!s}".format(total_profiles)
if detected_os == "linux":
- firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "alternative"}
+ firefox_ini_config[new_profile] = {"Name": "privacy-fighter", "IsRelative": "1", "Path": "privacy-fighter"}
elif detected_os == "win32":
- firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "Profiles/alternative"}
+ firefox_ini_config[new_profile] = {
+ "Name": "privacy-fighter",
+ "IsRelative": "1",
+ "Path": "Profiles/privacy-fighter",
+ }
elif detected_os == "darwin":
- firefox_ini_config[new_profile] = {"Name": "alternative", "IsRelative": "1", "Path": "Profiles/alternative"}
+ firefox_ini_config[new_profile] = {
+ "Name": "privacy-fighter",
+ "IsRelative": "1",
+ "Path": "Profiles/privacy-fighter",
+ }
firefox_ini_config.write(open(firefox_ini_path, "w"), space_around_delimiters=False)
-# The 'alternative' firefox profile.
-def setup_alt_profile(firefox_path, profile_name="alternative"):
- # list of profile_dir names under "firefox_path"
- profile_dirs = [d for d in os.listdir(firefox_path) if os.path.isdir(os.path.join(firefox_path, d))]
-
- # find *alternative and *alternative-*
- matches = fnmatch.filter(profile_dirs, "*{}".format(profile_name))
- matches.extend(fnmatch.filter(profile_dirs, "*{}-*".format(profile_name)))
-
- profiles = [os.path.join(firefox_path, d) for d in matches]
-
- if not profiles:
- print(
- "\nERROR: No Firefox Profile Found With The Name of '{}'.\n".format(profile_name),
- "First Create It (visit 'about:profiles' in Firefox) Then Run This Again\n",
- )
- else:
- for profile in profiles:
- print("Firefox Profile to be configured as an alternative : ", profile, "\n")
- alt_userjs_path = os.path.join(firefox_path, profile, "user.js")
- download_file(
- repo_location + "/profile/alternative/alternative-user.js", alt_userjs_path,
- )
-
-
def resource_path(relative_path):
try:
base_path = sys._MEIPASS
@@ -491,9 +468,12 @@ def latest_version():
return True
print("Newer Privacy Fighter version = {} is available.".format(latest_version))
if gui_mode:
- print("please download the latest version from https://github.com/jotyGill/privacy-fighter/releases/latest/")
+ print("Please download the latest version from https://github.com/jotyGill/privacy-fighter/releases/latest/")
else:
- print("please install the latest version with 'python3 -m pip install --user -U privacyfighter'")
+ print(
+ "Please download the latest version from "
+ "https://github.com/jotyGill/privacy-fighter/releases/latest/ or upgrade via pip"
+ )
return False
@@ -506,8 +486,8 @@ def backup_prefsjs(firefox_p_path):
# create directory to store "prefs.js" backups
# Changed in version 3.6: Accepts a path-like object.
os.makedirs(prefsjs_backups_folder, exist_ok=True)
- print("\nBacking up the current 'prefs.js' to '{}'".format(prefsjs_backup_name))
if os.path.exists(prefsjs_path):
+ print("\nBacking up the current 'prefs.js' to '{}'".format(prefsjs_backup_name))
shutil.move(prefsjs_path, prefsjs_backup_name)
From 455c1240ee9073870d54ed158eadf7de73901de7 Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 6 Dec 2019 15:10:42 +1030
Subject: [PATCH 09/25] Set default name of advance profile to
"privacy-fighter-advance"
---
privacyfighter/pf.py | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index af30b5c..06db873 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -162,6 +162,10 @@ def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_ho
print("Firefox is currently running, please close firefox first then run Privacy Fighter again")
sys.exit(1)
+ # if advance_setup is used and no profile name is given, name it "privacy-fighter-advance"
+ if advance_setup and profile_name == "privacy-fighter":
+ profile_name = "privacy-fighter-advance"
+
detected_os = sys.platform
# path to firefox profiles
@@ -260,21 +264,26 @@ def create_pf_profile(profile_name, firefox_path, firefox_ini_path, firefox_ini_
pf_profile_path = os.path.join(firefox_path, profile_name)
os.makedirs(pf_profile_path, exist_ok=True)
- total_profiles = len([p for p in all_sections if "Profile" in p])
- new_profile = "Profile{!s}".format(total_profiles)
+ # find the number of profiles setup in profiles.ini
+ existing_no_of_profiles = len([p for p in all_sections if "Profile" in p])
+
+ # choose new_profile's index to be same as len(existing profiles)
+ # as existing profiles start from index 0 to len, excluding len
+ new_profile = "Profile{!s}".format(existing_no_of_profiles)
+
if detected_os == "linux":
- firefox_ini_config[new_profile] = {"Name": "privacy-fighter", "IsRelative": "1", "Path": "privacy-fighter"}
+ firefox_ini_config[new_profile] = {"Name": profile_name, "IsRelative": "1", "Path": profile_name}
elif detected_os == "win32":
firefox_ini_config[new_profile] = {
- "Name": "privacy-fighter",
+ "Name": profile_name,
"IsRelative": "1",
- "Path": "Profiles/privacy-fighter",
+ "Path": "Profiles/{}".format(profile_name),
}
elif detected_os == "darwin":
firefox_ini_config[new_profile] = {
- "Name": "privacy-fighter",
+ "Name": profile_name,
"IsRelative": "1",
- "Path": "Profiles/privacy-fighter",
+ "Path": "Profiles/{}".format(profile_name),
}
firefox_ini_config.write(open(firefox_ini_path, "w"), space_around_delimiters=False)
From 726820edb6ddaf8d45c667b1e51ac32f4e729b1c Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 14:37:41 +1030
Subject: [PATCH 10/25] Added cli version build file
---
privacyfighter/build-cli.spec | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 privacyfighter/build-cli.spec
diff --git a/privacyfighter/build-cli.spec b/privacyfighter/build-cli.spec
new file mode 100644
index 0000000..46c3900
--- /dev/null
+++ b/privacyfighter/build-cli.spec
@@ -0,0 +1,22 @@
+
+a = Analysis(['pf.py'],
+ pathex=[''],
+ hiddenimports=[],
+ hookspath=None,
+ runtime_hooks=None,
+ )
+pyz = PYZ(a.pure)
+
+options = [('u', None, 'OPTION')]
+
+exe = EXE(pyz,
+ a.scripts,
+ a.binaries,
+ a.zipfiles,
+ a.datas,
+ options,
+ name='privacy-fighter-linux',
+ debug=False,
+ strip=None,
+ upx=True,
+ console=False)
From aed5f12d79e8a62ab0f26d1472e031a286b69b84 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 14:39:07 +1030
Subject: [PATCH 11/25] Added docs
---
docs/build.md | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 docs/build.md
diff --git a/docs/build.md b/docs/build.md
new file mode 100644
index 0000000..33ace65
--- /dev/null
+++ b/docs/build.md
@@ -0,0 +1,31 @@
+The project can be directly installed using pip without needing to build any binaries.
+
+`sudo pip3 install -U privacyfighter`
+
+OR
+
+`python3 -m pip install --user -U privacyfighter`
+
+
+## GNU/Linux
+Building binary in GNU/Linux.
+
+```bash
+sudo apt install python3-pip
+sudo pip3 install pyinstaller psutil requests
+git clone https://github.com/jotyGill/privacy-fighter
+cd privacy-fighter/privacyfighter
+pyinstaller build-cli.spec --clean
+```
+
+## Windows with GUI
+Uncomment lines in pf.py to 1. import 'gooey', 2. set gui_mode='True', 3. uncomment the gooey decorator
+
+Building binary in windows.
+
+```bash
+pip3 install Gooey pyinstaller psutil requests
+git clone https://github.com/jotyGill/privacy-fighter
+cd privacy-fighter\privacyfighter
+pyinstaller build.spec --clean
+```
From 48d6b0e1aa596a46a9592bda6d8c4b06292db468 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 14:52:10 +1030
Subject: [PATCH 12/25] readme changes
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index e13d7af..e4dad5f 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
Easy to install, privacy protection browser setup.
-A collection of best browser extensions and configurations to help you fight for your privacy.
+A collection of best browser extensions and some configurations to help you fight for your privacy.
**To install it, see the [Installation](#installation) section.**
The deeper you dig, more you find that we're [loosing privacy from corporations](https://github.com/jotyGill/privacy). You might even start to believe that there's nothing you can do about it. You can!. With the right information, tools and dedication, you can do a lot to protect your privacy and stand up for your basic human right.
@@ -36,7 +36,7 @@ The goals of this project are following:
**Requirement: Latest stable version of [Firefox](https://www.mozilla.org/en-US/firefox/new/): Currently 69**
If you are using Chrome (even Chromium) or Edge with default settings, not only they don't provide any privacy protection from third parties on the web.
-**These browsers themselves collect detailed stats about your online behaviour, including every single webpage you have ever visited, every single search query you have ever made.**
+**These browsers themselves collect detailed stats about your online behaviour.**
**The predominant browser Chrome tracks every webpage visit and periodically sends user location coordinates to Google. It also collects personal information(e.g. when a user completes online forms) and sends it to Google as part of the data synchronisation process. [c page 5, Google Data Collection Paper](https://digitalcontentnext.org/wp-content/uploads/2018/08/DCN-Google-Data-Collection-Paper.pdf)**
When you are logged into Chrome, all your browsing activity is without question linked to you. Even if you haven't logged in Chrome, Google still knows who you are with an extremely high precision.
@@ -89,7 +89,7 @@ If you are an advance user see [Advance Options](#advance), otherwise continue.
### 6.1 Installation Steps for Windows OS
2. Close Firefox then download and run [Privacy Fighter.exe](https://github.com/jotyGill/privacy-fighter/releases/latest/download/Privacy-Fighter.exe).
-3. Now follow the ["Post Installation"](#post-installation) section.
+3. **Then follow the ["Post Installation"](#post-installation) section.**
### 6.2 Installation Steps for GNU/Linux or MacOS
@@ -105,7 +105,7 @@ wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privac
chmod +x ./privacyfighter-linux-amd64
```
-3. Close Firefox then run `privacyfighter -m -a` or `~/.local/bin/privacyfighter -m -a` . (Note: shortcut `pf` instead of `privacyfighter` also works. eg. `pf -m -a`)
+3. Close Firefox then run `privacyfighter -m -a` or `~/.local/bin/privacyfighter -m -a`
### 7.0 Post Installation
1. After installation is done, open Firefox then "addons" (press Ctr+Shift+A) and enable all of them and allow them in private windows.
From 3a621f11a9f791a6c4199cab104d8ee6400c1451 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 14:58:32 +1030
Subject: [PATCH 13/25] Version 2.0
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index a3f5d29..9dfac2d 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@
# pf_location = os.path.join(os.path.abspath(os.path.dirname(__file__)), "privacyfighter")
# exec(open(os.path.join(pf_location, "version.py")).read())
-__version__ = "1.3.0.dev1"
+__version__ = "2.0.0"
if sys.version_info < (3, 5):
sys.stderr.write("ERROR: requires Python 3.5 or above." + "Install using 'pip3' instead of just 'pip' \n")
From 2275571d2445aabecc88d1abbfc81677c306b044 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 14:59:50 +1030
Subject: [PATCH 14/25] Moved main readme.md
---
README.md => docs/README.md | 0
privacyfighter/profile/alternative-user.js | 27 ---
.../profile/alternative/alternative-user.js | 27 ---
privacyfighter/profile/my-user.js | 84 --------
privacyfighter/profile/one-time-prefs.json | 8 -
privacyfighter/profile/user-overrides.js | 199 ------------------
6 files changed, 345 deletions(-)
rename README.md => docs/README.md (100%)
delete mode 100644 privacyfighter/profile/alternative-user.js
delete mode 100644 privacyfighter/profile/alternative/alternative-user.js
delete mode 100644 privacyfighter/profile/my-user.js
delete mode 100644 privacyfighter/profile/one-time-prefs.json
delete mode 100644 privacyfighter/profile/user-overrides.js
diff --git a/README.md b/docs/README.md
similarity index 100%
rename from README.md
rename to docs/README.md
diff --git a/privacyfighter/profile/alternative-user.js b/privacyfighter/profile/alternative-user.js
deleted file mode 100644
index 970728b..0000000
--- a/privacyfighter/profile/alternative-user.js
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-/* PRIVACY FIGHTHER 'user.js' FOR 'alternative' PROFILE
-
-This setup only clears all types of persistent storage (cookies, caches, offline data) on shutdown.
-To be used with the 'alternative' profile. Much better option than needing Chrome for rare occations when
-a website breaks in the main profile.
-
-***/
-
-
-user_pref("privacyfighter.config.version", 69.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
-
-
-// enforce caches, cookies, ofline data to clear on shutdown
-user_pref("privacy.sanitize.sanitizeOnShutdown", true);
-
-user_pref("privacy.clearOnShutdown.cache", true);
-user_pref("privacy.clearOnShutdown.cookies", true);
-user_pref("privacy.clearOnShutdown.offlineApps", true); // Offline Website Data
-user_pref("privacy.clearOnShutdown.sessions", true); // Active Logins
-
-user_pref("privacy.clearOnShutdown.siteSettings", false); // Site Preferences
-user_pref("privacy.clearOnShutdown.history", false); // Browsing & Download History
-user_pref("privacy.clearOnShutdown.formdata", false); // Form & Search History
-user_pref("privacy.clearOnShutdown.downloads", false);
-user_pref("privacy.clearOnShutdown.openWindows", false);
diff --git a/privacyfighter/profile/alternative/alternative-user.js b/privacyfighter/profile/alternative/alternative-user.js
deleted file mode 100644
index 970728b..0000000
--- a/privacyfighter/profile/alternative/alternative-user.js
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-/* PRIVACY FIGHTHER 'user.js' FOR 'alternative' PROFILE
-
-This setup only clears all types of persistent storage (cookies, caches, offline data) on shutdown.
-To be used with the 'alternative' profile. Much better option than needing Chrome for rare occations when
-a website breaks in the main profile.
-
-***/
-
-
-user_pref("privacyfighter.config.version", 69.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
-
-
-// enforce caches, cookies, ofline data to clear on shutdown
-user_pref("privacy.sanitize.sanitizeOnShutdown", true);
-
-user_pref("privacy.clearOnShutdown.cache", true);
-user_pref("privacy.clearOnShutdown.cookies", true);
-user_pref("privacy.clearOnShutdown.offlineApps", true); // Offline Website Data
-user_pref("privacy.clearOnShutdown.sessions", true); // Active Logins
-
-user_pref("privacy.clearOnShutdown.siteSettings", false); // Site Preferences
-user_pref("privacy.clearOnShutdown.history", false); // Browsing & Download History
-user_pref("privacy.clearOnShutdown.formdata", false); // Form & Search History
-user_pref("privacy.clearOnShutdown.downloads", false);
-user_pref("privacy.clearOnShutdown.openWindows", false);
diff --git a/privacyfighter/profile/my-user.js b/privacyfighter/profile/my-user.js
deleted file mode 100644
index fc3d95d..0000000
--- a/privacyfighter/profile/my-user.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/* PRIVACYFIGHTER user.js
- *
- *
- * ***/
-user_pref("privacyfighter.config.version", 70.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
-
-
-/* 0210: use Mozilla geolocation service instead of Google when geolocation is enabled
- * Optionally enable logging to the console (defaults to false) ***/
-user_pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
-
-/* 0320: disable about:addons' Recommendations pane (uses Google Analytics) ***/
-user_pref("extensions.getAddons.showPane", false); // [HIDDEN PREF]
-user_pref("extensions.webservice.discoverURL", "");
-
-/* 0321: disable recommendations in about:addons' Extensions and Themes panes [FF68+] ***/
-user_pref("extensions.getAddons.discovery.api_url", "");
-user_pref("extensions.htmlaboutaddons.discover.enabled", false);
-user_pref("extensions.htmlaboutaddons.recommendations.enabled", false);
-
-/* 0343: disable personalized Extension Recommendations in about:addons and AMO [FF65+]
- * [NOTE] This pref has no effect when Health Reports (0340) are disabled
- * [SETTING] Privacy & Security>Firefox Data Collection & Use>...>Allow Firefox to make personalized extension rec.
- * [1] https://support.mozilla.org/kb/personalized-extension-recommendations ***/
-user_pref("browser.discovery.enabled", false);
-
-/* 1021: disable storing extra session data [SETUP-CHROME]
- * extra session data contains contents of forms, scrollbar positions, cookies and POST data
- * define on which sites to save extra session data:
- * 0=everywhere, 1=unencrypted sites, 2=nowhere ***/
-user_pref("browser.sessionstore.privacy_level", 2);
-
-/* 1610: ALL: enable the DNT (Do Not Track) HTTP header
- * [NOTE] DNT is enforced with Tracking Protection regardless of this pref
- * [SETTING] Privacy & Security>Content Blocking>Send websites a "Do Not Track"... ***/
-user_pref("privacy.donottrackheader.enabled", true);
-
-/* 1701: enable Container Tabs setting in preferences (see 1702) [FF50+]
- * [1] https://bugzilla.mozilla.org/1279029 ***/
-user_pref("privacy.userContext.ui.enabled", true);
-
-/* 1702: enable Container Tabs [FF50+]
- * [SETTING] General>Tabs>Enable Container Tabs ***/
-user_pref("privacy.userContext.enabled", true);
-
-/* 2702: set third-party cookies (i.e ALL) (if enabled, see 2701) to session-only
- and (FF58+) set third-party non-secure (i.e HTTP) cookies to session-only
- [NOTE] .sessionOnly overrides .nonsecureSessionOnly except when .sessionOnly=false and
- .nonsecureSessionOnly=true. This allows you to keep HTTPS cookies, but session-only HTTP ones
- * [1] https://feeding.cloud.geek.nz/posts/tweaking-cookies-for-privacy-in-firefox/
- * [2] http://kb.mozillazine.org/Network.cookie.thirdparty.sessionOnly ***/
-user_pref("network.cookie.thirdparty.sessionOnly", true);
-user_pref("network.cookie.thirdparty.nonsecureSessionOnly", true); // [FF58+]v
-
-/* 2731: enforce websites to ask to store data for offline use
- * [1] https://support.mozilla.org/questions/1098540
- * [2] https://bugzilla.mozilla.org/959985 ***/
-user_pref("offline-apps.allow_by_default", false);
-
-/* 2802: enable Firefox to clear items on shutdown (see 2803)
- * [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes ***/
-user_pref("privacy.sanitize.sanitizeOnShutdown", true);
-/* 2803: set what items to clear on shutdown (if 2802 is true) [SETUP-CHROME]
- * [NOTE] If 'history' is true, downloads will also be cleared regardless of the value
- * but if 'history' is false, downloads can still be cleared independently
- * However, this may not always be the case. The interface combines and syncs these
- * prefs when set from there, and the sanitize code may change at any time
- * [SETTING] Privacy & Security>History>Custom Settings>Clear history when Firefox closes>Settings ***/
-user_pref("privacy.clearOnShutdown.cache", true);
-user_pref("privacy.clearOnShutdown.cookies", true);
-user_pref("privacy.clearOnShutdown.downloads", false); // see note above
-user_pref("privacy.clearOnShutdown.formdata", false); // Form & Search History
-user_pref("privacy.clearOnShutdown.history", false); // Browsing & Download History
-user_pref("privacy.clearOnShutdown.offlineApps", true); // Offline Website Data
-user_pref("privacy.clearOnShutdown.sessions", true); // Active Logins
-user_pref("privacy.clearOnShutdown.siteSettings", false); // Site Preferences
-user_pref("privacy.clearOnShutdown.openWindows", false);
-
-/* 4501: enable privacy.resistFingerprinting [FF41+]
- * This pref is the master switch for all other privacy.resist* prefs unless stated
- * [SETUP-WEB] RFP can cause the odd website to break in strange ways, and has a few side affects,
- * but is largely robust nowadays. Give it a try. Your choice. Also see 4504 (letterboxing).
- * [1] https://bugzilla.mozilla.org/418986 ***/
-user_pref("privacy.resistFingerprinting", true);
diff --git a/privacyfighter/profile/one-time-prefs.json b/privacyfighter/profile/one-time-prefs.json
deleted file mode 100644
index 72de4ab..0000000
--- a/privacyfighter/profile/one-time-prefs.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "prefs":
- [
- {"pref": "\"browser.uiCustomization.state\"", "value": "\"{\\\"placements\\\":{\\\"widget-overflow-fixed-list\\\":[],\\\"nav-bar\\\":[\\\"back-button\\\",\\\"forward-button\\\",\\\"stop-reload-button\\\",\\\"home-button\\\",\\\"urlbar-container\\\",\\\"downloads-button\\\",\\\"library-button\\\",\\\"sidebar-button\\\",\\\"fxa-toolbar-menu-button\\\",\\\"canvasblocker_kkapsner_de-browser-action\\\",\\\"https-everywhere_eff_org-browser-action\\\",\\\"jid1-bofifl9vbdl2zq_jetpack-browser-action\\\",\\\"ublock0_raymondhill_net-browser-action\\\",\\\"_74145f27-f039-47ce-a470-a662b129930a_-browser-action\\\",\\\"_83e08b00-32de-44e7-97bb-1bab84d1350f_-browser-action\\\"],\\\"toolbar-menubar\\\":[\\\"menubar-items\\\"],\\\"TabsToolbar\\\":[\\\"tabbrowser-tabs\\\",\\\"new-tab-button\\\",\\\"alltabs-button\\\",\\\"_c607c8df-14a7-4f28-894f-29e8722976af_-browser-action\\\"],\\\"PersonalToolbar\\\":[\\\"personal-bookmarks\\\"]},\\\"seen\\\":[\\\"developer-button\\\",\\\"_c607c8df-14a7-4f28-894f-29e8722976af_-browser-action\\\",\\\"canvasblocker_kkapsner_de-browser-action\\\",\\\"https-everywhere_eff_org-browser-action\\\",\\\"jid1-bofifl9vbdl2zq_jetpack-browser-action\\\",\\\"ublock0_raymondhill_net-browser-action\\\",\\\"_74145f27-f039-47ce-a470-a662b129930a_-browser-action\\\",\\\"_83e08b00-32de-44e7-97bb-1bab84d1350f_-browser-action\\\"],\\\"dirtyAreaCache\\\":[\\\"nav-bar\\\",\\\"TabsToolbar\\\"],\\\"currentVersion\\\":16,\\\"newElementCount\\\":5}\"", "exists": false},
- {"pref": "\"browser.startup.homepage\"", "value": "\"https://duckduckgo.com/?kak=-1&kax=-1\"", "exists": false},
- {"pref": "\"browser.startup.page\"", "value": "\"https://duckduckgo.com/?kak=-1&kax=-1\"", "exists": false}
- ]
-}
diff --git a/privacyfighter/profile/user-overrides.js b/privacyfighter/profile/user-overrides.js
deleted file mode 100644
index d1b844a..0000000
--- a/privacyfighter/profile/user-overrides.js
+++ /dev/null
@@ -1,199 +0,0 @@
-
-
-/* PRIVACY FIGHTHER USER-OVERRIDES.JS START ***/
-user_pref("_user.js.parrot", "overrides section syntax error");
-user_pref("privacyfighter.config.version", 70.0.0); // corresponds to firefox version, run PF again to fetch latest configuration sets
-
-
-// SECTION 0100: STARTUP
-//// --- comment-out --- 'browser.shell.checkDefaultBrowser'
-//// --- comment-out --- 'browser.startup.homepage'
-//// --- comment-out --- 'browser.startup.page'
-//// --- comment-out --- 'browser.newtabpage.enabled'
-
-
-// [SECTION 0200]: GEOLOCATION
-// [SECTION 0300]: QUIET FOX
-
-//// --- comment-out --- 'app.update.auto'
-//// --- comment-out --- 'extensions.update.autoUpdateDefault' # Keep extensions updated
-
-//// --- comment-out --- 'browser.search.update'
-
-// Don't force disable `Pocket`, as it has large userbase (10M+ installs on Androids alone)
-// pocket is owned by Mozilla, if any organisation can be trusted with our bookmarks, it's got to be it.
-//// --- comment-out --- 'extensions.pocket.enabled'
-
-//// --- comment-out --- 'captivedetect.canonicalURL'
-//// --- comment-out --- 'network.captive-portal-service.enabled'
-
-
-// [SECTION 0500]: SYSTEM ADD-ONS / EXPERIMENTS
-//// --- comment-out --- 'extensions.systemAddon.update.enabled'
-//// --- comment-out --- 'extensions.systemAddon.update.url'
-
-//// --- comment-out --- 'extensions.formautofill.addresses.enabled'
-//// --- comment-out --- 'extensions.formautofill.available'
-//// --- comment-out --- 'extensions.formautofill.heuristics.enabled'
-
-
-// [SECTION 0700]: HTTP* / TCP/IP / DNS / PROXY / SOCKS etc
-//// --- comment-out --- 'network.dns.disableIPv6'
-
-//// --- comment-out --- 'network.http.altsvc.enabled'
-//// --- comment-out --- 'network.http.altsvc.oe'
-
-// //// --- comment-out --- 'network.proxy.socks_remote_dns' // TODO See if problematic
-
-//// --- comment-out --- 'network.file.disable_unc_paths'
-//// --- comment-out --- 'network.gio.supported-protocols'
-
-
-// [SECTION 0800]: LOCATION BAR / SEARCH BAR / SUGGESTIONS / HISTORY / FORMS
-//// --- comment-out --- 'keyword.enabled' // don't block search from urlbar
-
-//// --- comment-out --- 'browser.search.suggest.enabled' // live searches in urlbar
-//// --- comment-out --- 'browser.urlbar.suggest.searches'
-//// --- comment-out --- 'network.file.disable_unc_paths'
-//// --- comment-out --- 'browser.formfill.enable'
-// //// --- comment-out --- 'dom.forms.datetime' // TODO See if problematic
-
-
-// [SECTION 0900]: PASSWORDS
-//// --- comment-out --- 'security.ask_for_password'
-//// --- comment-out --- 'security.password_lifetime'
-
-//// --- comment-out --- 'signon.autofillForms'
-//// --- comment-out --- 'signon.formlessCapture.enabled'
-
-//// --- comment-out --- 'network.auth.subresource-http-auth-allow' // some breakage https://bugzilla.mozilla.org/show_bug.cgi?id=1197944
-//// --- comment-out --- 'signon.formlessCapture.enabled'
-
-
-// [SECTION 1000]: CACHE / SESSION (RE)STORE / FAVICONS
-//// --- comment-out --- 'browser.sessionstore.interval'
-
-
-// [SECTION 1200]: HTTPS (SSL/TLS / OCSP / CERTS / HPKP / CIPHERS)
-//// --- comment-out --- 'security.ssl.require_safe_negotiation'
-//// --- comment-out --- 'security.tls.enable_0rtt_data'
-
-//// --- comment-out --- 'security.OCSP.require'
-//// --- comment-out --- 'security.pki.sha1_enforcement_level' // dont disable SHA-1 certificates
-//// --- comment-out --- 'security.family_safety.mode' // dont disable windows family safety cert
-//// --- comment-out --- 'security.cert_pinning.enforcement_level' // dont inforce cert pinning
-//// --- comment-out --- 'security.mixed_content.block_display_content'
-
-
-// [SECTION 1400]: FONTS
-//// --- comment-out --- 'gfx.font_rendering.opentype_svg.enabled'
-//// --- comment-out --- 'gfx.font_rendering.graphite.enabled'
-
-
-// [SECTION 1600]: HEADERS / REFERERS
-//// --- comment-out --- 'network.http.referer.XOriginPolicy'
-
-
-// [SECTION 1700]: CONTAINERS
-// [SECTION 1800]: PLUGINS
-//// --- comment-out --- 'plugin.sessionPermissionNow.intervalInMinutes'
-
-//// --- comment-out --- 'plugin.state.flash' // dont force disable flash
-
-// dont disable widevine CDM (Content Decryption Module)
-//// --- comment-out --- 'media.gmp-widevinecdm.visible'
-//// --- comment-out --- 'media.gmp-widevinecdm.enabled'
-
-// dont disable all DRM content (EME: Encryption Media Extension)
-//// --- comment-out --- 'media.eme.enabled'
-
-
-// [SECTION 2000]: MEDIA / CAMERA / MIC
-// keep WebRTC but expose only default ip (don't leak)
-//// --- comment-out --- 'media.peerconnection.enabled'
-//// --- comment-out --- 'media.peerconnection.ice.default_address_only'
-//// --- comment-out --- 'media.peerconnection.ice.no_host'
-
-// dont disable webGL
-//// --- comment-out --- 'webgl.disabled'
-//// --- comment-out --- 'webgl.dxgl.enabled'
-//// --- comment-out --- 'webgl.enable-webgl2'
-//// --- comment-out --- 'webgl.min_capability_mode'
-//// --- comment-out --- 'webgl.disable-extensions'
-//// --- comment-out --- 'webgl.disable-fail-if-major-performance-caveat'
-
-// dont disable screensharing
-//// --- comment-out --- 'media.getusermedia.screensharing.enabled'
-//// --- comment-out --- 'media.getusermedia.browser.enabled'
-//// --- comment-out --- 'media.getusermedia.audiocapture.enabled'
-
-
-// [SECTION 2200]: WINDOW MEDDLING & LEAKS / POPUPS
-//// --- comment-out --- 'dom.popup_allowed_events'
-
-// [SECTION 2300]: WEB WORKERS
-// dont disable web workers, webnotifications
-//// --- comment-out --- 'dom.serviceWorkers.enabled'
-
-
-// [SECTION 2400]: DOM (DOCUMENT OBJECT MODEL) & JAVASCRIPT
-//// --- comment-out --- 'dom.event.clipboardevents.enabled'
-
-//// --- comment-out --- 'dom.allow_cut_copy'
-
-// don't disable "Confirm you want to leave" dialog on page close
-//// --- comment-out --- 'dom.disable_beforeunload'
-
-//// --- comment-out --- 'javascript.options.asmjs' // dont disable asm.js
-//// --- comment-out --- 'javascript.options.wasm' // dont disable WebAssembly
-//// --- comment-out --- 'dom.vibrator.enabled'
-
-
-// [SECTION 2500]: HARDWARE FINGERPRINTING
-// [SECTION 2600]: MISCELLANEOUS
-//// --- comment-out --- 'browser.tabs.remote.allowLinkedWebInFileUriProcess'
-//// --- comment-out --- 'browser.pagethumbnails.capturing_disabled'
-//// --- comment-out --- 'browser.uitour.enabled'
-//// --- comment-out --- 'browser.uitour.url'
-//// --- comment-out --- 'devtools.chrome.enabled'
-//// --- comment-out --- 'network.IDN_show_punycode'
-//// --- comment-out --- 'pdfjs.disabled' # don't force enable it, as it doesn't always rendender properly
-
-//// --- comment-out --- 'network.protocol-handler.external.ms-windows-store'
-
-//// --- comment-out --- 'browser.download.manager.addToRecentDocs'
-//// --- comment-out --- 'security.csp.experimentalEnabled'
-
-//// --- comment-out --- 'extensions.enabledScopes'
-//// --- comment-out --- 'extensions.autoDisableScopes'
-
-
-// [SECTION 2700]: PERSISTENT STORAGE
-// allow third party cookies, but session only and "4" exclude known trackers
-//// --- comment-out --- 'network.cookie.cookieBehavior' // ovewrritten to 4 in "user-overrides.js"
-user_pref("network.cookie.cookieBehavior", 4);
-
-// don't enforce history and downloads to clear on shutdown but cache, cookies, offline web data will be cleared
-user_pref("privacy.sanitize.sanitizeOnShutdown", true);
-user_pref("privacy.clearOnShutdown.history", false);
-user_pref("privacy.clearOnShutdown.formdata", false);
-user_pref("privacy.clearOnShutdown.downloads", false);
-user_pref("privacy.clearOnShutdown.openWindows", false);
-
-// // dont set time range to "Everything" as default in "Clear Recent History"
-//// --- comment-out --- 'privacy.sanitize.timeSpan'
-
-
-// [SECTION 4000]: FPI (FIRST PARTY ISOLATION)
-// disable first party isolation, we use temporary_containers
-//// --- comment-out --- 'privacy.firstparty.isolate'
-//// --- comment-out --- 'privacy.firstparty.isolate.restrict_opener_access'
-
-
-// [SECTION 4500]: RFP (RESIST FINGERPRINTING)
-// heard this prevents from reviewing addons on AMO
-//// --- comment-out --- 'privacy.resistFingerprinting.block_mozAddonManager'
-
-//// --- comment-out --- 'privacy.resistFingerprinting.letterboxing'
-
-user_pref("_user.js.parrot", "SUCCESS");
From 97b371f445338e52a02a408f125ca7b9c8abf961 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 15:30:06 +1030
Subject: [PATCH 15/25] Installation Steps
---
privacyfighter/README.md | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 privacyfighter/README.md
diff --git a/privacyfighter/README.md b/privacyfighter/README.md
new file mode 100644
index 0000000..823b88d
--- /dev/null
+++ b/privacyfighter/README.md
@@ -0,0 +1,37 @@
+# Privacy-Fighter
+
+
+
+
+Easy to install, privacy protection browser setup.
+A collection of best browser extensions and some configurations to help you fight for your privacy.
+**To install it, see the [Installation](#installation) section.**
+
+The deeper you dig, more you find that we're [loosing privacy from corporations](https://github.com/jotyGill/privacy). You might even start to believe that there's nothing you can do about it. You can!. With the right information, tools and dedication, you can do a lot to protect your privacy and stand up for your basic human right.
+There are brilliant, hard working people who spend countless hours to make these privacy protecting tools. This project is a collection and setup of the best privacy protecting browser tools that exist today. (if you have any suggestions, please create a github 'issue')
+
+
+### 6.2 Installation Steps for GNU/Linux and MacOS
+
+1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
+2. Close Firefox.
+3. ON GNU/LINUX: Download and run the [privacyfighter-linux-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64).
+``` bash
+wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64
+chmod +x ./privacyfighter-linux-amd64
+./privacyfighter-linux-amd64
+```
+3. ON MACOS: Download and run the [privacyfighter-macos-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64).
+``` bash
+wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64
+chmod +x ./privacyfighter-macos-amd64
+./privacyfighter-macos-amd64
+```
+4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
+
+
+### 7.0 Post Installation
+1. After installation is done, open Firefox then "addons" (press Ctr+Shift+A) and enable all of them and allow them in private windows.
+2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
+3. You can change the default search engine from Google to DuckDuckGo.
+ (Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
From 01662f9f11f809d8c670f886d09f0e640ad41a9c Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 15:41:50 +1030
Subject: [PATCH 16/25] Installation instructions change
---
docs/README.md | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/docs/README.md b/docs/README.md
index e4dad5f..afff862 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -80,37 +80,38 @@ security improvement. There are other security benefits of this setup. HttpsEver
### 6.0 Installation
-The installation procedure.
-
-1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
-
-If you are an advance user see [Advance Options](#advance), otherwise continue.
+If you are an advance user check out the [Advance Options](#advance), otherwise continue.
### 6.1 Installation Steps for Windows OS
-2. Close Firefox then download and run [Privacy Fighter.exe](https://github.com/jotyGill/privacy-fighter/releases/latest/download/Privacy-Fighter.exe).
-3. **Then follow the ["Post Installation"](#post-installation) section.**
-
-### 6.2 Installation Steps for GNU/Linux or MacOS
+1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
+2. Download [Privacy-Fighter.exe](https://github.com/jotyGill/privacy-fighter/releases/latest/download/Privacy-Fighter.exe).
+3. Close Firefox and run the downloaded file Privacy-Fighter.exe
+4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
-2. If you have python3 with pip, The best option is to install it using pip.
-``` bash
-python3 -m pip install --user -U privacyfighter
-```
-**Alternatively**
+### 6.2 Installation Steps for GNU/Linux and MacOS
-2. You can download and run the [privacyfighter-linux-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64) executable for GNU/Linux systems.
+1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
+2. Close Firefox.
+3. ON GNU/LINUX: Download and run the [privacyfighter-linux-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64).
``` bash
wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64
chmod +x ./privacyfighter-linux-amd64
+./privacyfighter-linux-amd64
+```
+3. ON MACOS: Download and run the [privacyfighter-macos-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64).
+``` bash
+wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64
+chmod +x ./privacyfighter-macos-amd64
+./privacyfighter-macos-amd64
```
+4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
-3. Close Firefox then run `privacyfighter -m -a` or `~/.local/bin/privacyfighter -m -a`
### 7.0 Post Installation
1. After installation is done, open Firefox then "addons" (press Ctr+Shift+A) and enable all of them and allow them in private windows.
2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
-3. I recommend changing the default search engine from Google to DuckDuckGo or Startpage.
+3. You can change the default search engine from Google to DuckDuckGo.
(Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
### 8.0 Known Inconveniences
From a79fffa7c65b6c416d8203ca1f0dae5ebe0f315e Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 15:50:07 +1030
Subject: [PATCH 17/25] readme
---
privacyfighter/README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/privacyfighter/README.md b/privacyfighter/README.md
index 823b88d..e1abb17 100644
--- a/privacyfighter/README.md
+++ b/privacyfighter/README.md
@@ -35,3 +35,7 @@ chmod +x ./privacyfighter-macos-amd64
2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
3. You can change the default search engine from Google to DuckDuckGo.
(Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
+
+
+### 3.0 Disclaimer
+This project is a collection of configurations to setup Firefox preferences and to setup and install third party extensions/addons. These extensions have been carefully chosen. They are downloaded straight from the "Firefox Add-ons store". Each addon is fully open source and anyone can view the code. Each of the addon's developer has high reputation and multi thousand downloads in the addons store. Because these addons are not developed by me, use them at your own risk.
From fba4562b83bc6e9001ea5f42ec9197b7554a3555 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 15:51:57 +1030
Subject: [PATCH 18/25] moved readme
---
privacyfighter/README.md | 41 ----------------------------------------
1 file changed, 41 deletions(-)
delete mode 100644 privacyfighter/README.md
diff --git a/privacyfighter/README.md b/privacyfighter/README.md
deleted file mode 100644
index e1abb17..0000000
--- a/privacyfighter/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# Privacy-Fighter
-
-
-
-
-Easy to install, privacy protection browser setup.
-A collection of best browser extensions and some configurations to help you fight for your privacy.
-**To install it, see the [Installation](#installation) section.**
-
-The deeper you dig, more you find that we're [loosing privacy from corporations](https://github.com/jotyGill/privacy). You might even start to believe that there's nothing you can do about it. You can!. With the right information, tools and dedication, you can do a lot to protect your privacy and stand up for your basic human right.
-There are brilliant, hard working people who spend countless hours to make these privacy protecting tools. This project is a collection and setup of the best privacy protecting browser tools that exist today. (if you have any suggestions, please create a github 'issue')
-
-
-### 6.2 Installation Steps for GNU/Linux and MacOS
-
-1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
-2. Close Firefox.
-3. ON GNU/LINUX: Download and run the [privacyfighter-linux-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64).
-``` bash
-wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64
-chmod +x ./privacyfighter-linux-amd64
-./privacyfighter-linux-amd64
-```
-3. ON MACOS: Download and run the [privacyfighter-macos-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64).
-``` bash
-wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64
-chmod +x ./privacyfighter-macos-amd64
-./privacyfighter-macos-amd64
-```
-4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
-
-
-### 7.0 Post Installation
-1. After installation is done, open Firefox then "addons" (press Ctr+Shift+A) and enable all of them and allow them in private windows.
-2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
-3. You can change the default search engine from Google to DuckDuckGo.
- (Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
-
-
-### 3.0 Disclaimer
-This project is a collection of configurations to setup Firefox preferences and to setup and install third party extensions/addons. These extensions have been carefully chosen. They are downloaded straight from the "Firefox Add-ons store". Each addon is fully open source and anyone can view the code. Each of the addon's developer has high reputation and multi thousand downloads in the addons store. Because these addons are not developed by me, use them at your own risk.
From 7f9751fb42fa3e66c9700edc63e1ea57cfe8424f Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 15:52:36 +1030
Subject: [PATCH 19/25] moved readme
---
README.md | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e1abb17
--- /dev/null
+++ b/README.md
@@ -0,0 +1,41 @@
+# Privacy-Fighter
+
+
+
+
+Easy to install, privacy protection browser setup.
+A collection of best browser extensions and some configurations to help you fight for your privacy.
+**To install it, see the [Installation](#installation) section.**
+
+The deeper you dig, more you find that we're [loosing privacy from corporations](https://github.com/jotyGill/privacy). You might even start to believe that there's nothing you can do about it. You can!. With the right information, tools and dedication, you can do a lot to protect your privacy and stand up for your basic human right.
+There are brilliant, hard working people who spend countless hours to make these privacy protecting tools. This project is a collection and setup of the best privacy protecting browser tools that exist today. (if you have any suggestions, please create a github 'issue')
+
+
+### 6.2 Installation Steps for GNU/Linux and MacOS
+
+1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
+2. Close Firefox.
+3. ON GNU/LINUX: Download and run the [privacyfighter-linux-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64).
+``` bash
+wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-linux-amd64
+chmod +x ./privacyfighter-linux-amd64
+./privacyfighter-linux-amd64
+```
+3. ON MACOS: Download and run the [privacyfighter-macos-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64).
+``` bash
+wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64
+chmod +x ./privacyfighter-macos-amd64
+./privacyfighter-macos-amd64
+```
+4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
+
+
+### 7.0 Post Installation
+1. After installation is done, open Firefox then "addons" (press Ctr+Shift+A) and enable all of them and allow them in private windows.
+2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
+3. You can change the default search engine from Google to DuckDuckGo.
+ (Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
+
+
+### 3.0 Disclaimer
+This project is a collection of configurations to setup Firefox preferences and to setup and install third party extensions/addons. These extensions have been carefully chosen. They are downloaded straight from the "Firefox Add-ons store". Each addon is fully open source and anyone can view the code. Each of the addon's developer has high reputation and multi thousand downloads in the addons store. Because these addons are not developed by me, use them at your own risk.
From 37e24be36fd81f49b2305a73876f19692d6c68b4 Mon Sep 17 00:00:00 2001
From: JGill
Date: Mon, 9 Dec 2019 16:13:57 +1030
Subject: [PATCH 20/25] Windows installation
---
README.md | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index e1abb17..cddc32c 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,16 @@ The deeper you dig, more you find that we're [loosing privacy from corporations]
There are brilliant, hard working people who spend countless hours to make these privacy protecting tools. This project is a collection and setup of the best privacy protecting browser tools that exist today. (if you have any suggestions, please create a github 'issue')
+### 6.0 Installation
+If you are an advance user check out the [Advance Options](#advance), otherwise continue.
+
+### 6.1 Installation Steps for Windows OS
+
+1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
+2. Download [Privacy-Fighter.exe](https://github.com/jotyGill/privacy-fighter/releases/latest/download/Privacy-Fighter.exe).
+3. Close Firefox and run the downloaded file Privacy-Fighter.exe
+4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
+
### 6.2 Installation Steps for GNU/Linux and MacOS
1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
@@ -35,7 +45,3 @@ chmod +x ./privacyfighter-macos-amd64
2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
3. You can change the default search engine from Google to DuckDuckGo.
(Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
-
-
-### 3.0 Disclaimer
-This project is a collection of configurations to setup Firefox preferences and to setup and install third party extensions/addons. These extensions have been carefully chosen. They are downloaded straight from the "Firefox Add-ons store". Each addon is fully open source and anyone can view the code. Each of the addon's developer has high reputation and multi thousand downloads in the addons store. Because these addons are not developed by me, use them at your own risk.
From 472f48af979268df5b57cc0cd7323781b415d5c1 Mon Sep 17 00:00:00 2001
From: JGill
Date: Thu, 19 Dec 2019 12:59:52 +1030
Subject: [PATCH 21/25] Auto import bookmarks,history,passwords from 'default'
profile
---
privacyfighter/pf.py | 117 ++++++++++++++++++++++++++++---------------
1 file changed, 76 insertions(+), 41 deletions(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index 06db873..734da6d 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -4,7 +4,6 @@
import configparser
import datetime
import fileinput
-import fnmatch
import io
import os
import shutil
@@ -17,7 +16,6 @@
import requests
# GUI-SETUP, is a tag used to find lines to change, to produce the gui-version
-
# from gooey import Gooey # GUI-SETUP, comment out when producing cli version
gui_mode = False # GUI-SETUP, change to 'True' in gui-version
@@ -118,6 +116,14 @@ def main():
help="Skip the installation/setup of extensions (NOT Recommended)",
action="store_true",
)
+ advance_options.add_argument(
+ "-i",
+ "--import",
+ dest="import_profile",
+ default="default",
+ help="Import history, bookmarks, saved passwords from old firefox profile",
+ type=str,
+ )
if gui_mode:
install_tab.add_argument(
@@ -151,16 +157,22 @@ def main():
args = parser.parse_args()
run(
- args.profile_name, args.user_overrides_url, args.skip_extensions, args.advance_setup, set_homepage, set_ui,
+ args.profile_name,
+ args.user_overrides_url,
+ args.skip_extensions,
+ args.import_profile,
+ args.advance_setup,
+ set_homepage,
+ set_ui,
)
-def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui):
- if not latest_version():
- sys.exit(1)
+def run(profile_name, user_overrides_url, skip_extensions, import_profile, advance_setup, set_homepage, set_ui):
if firefox_is_running():
print("Firefox is currently running, please close firefox first then run Privacy Fighter again")
sys.exit(1)
+ if not latest_version():
+ sys.exit(1)
# if advance_setup is used and no profile name is given, name it "privacy-fighter-advance"
if advance_setup and profile_name == "privacy-fighter":
@@ -176,6 +188,7 @@ def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_ho
if not pf_profile_exists(profile_name, firefox_ini_config):
create_pf_profile(profile_name, firefox_path, firefox_ini_path, firefox_ini_config, detected_os)
+ import_profile_data(import_profile, profile_name, firefox_path, firefox_ini_config)
setup_pf_profile(
profile_name, firefox_path, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
)
@@ -199,23 +212,7 @@ def run(profile_name, user_overrides_url, skip_extensions, advance_setup, set_ho
def setup_pf_profile(
profile_name, firefox_path, user_overrides_url, skip_extensions, advance_setup, set_homepage, set_ui
):
- # list of profile_dir names under "firefox_path"
- profile_dirs = [d for d in os.listdir(firefox_path) if os.path.isdir(os.path.join(firefox_path, d))]
-
- # Firefox sometimes creates profile "default-release", or after reset "default-release-1231212"
- matches = fnmatch.filter(profile_dirs, "{}".format(profile_name))
- matches.extend(fnmatch.filter(profile_dirs, "{}-*".format(profile_name)))
-
- if not matches:
- print(
- "ERROR: No Firefox Profile Found With The Name of '{}'. If Unsure Keep it 'privacy-fighter'".format(
- profile_name
- )
- )
- sys.exit(1)
- else:
- profiles = [os.path.join(firefox_path, d) for d in matches]
- print("Firefox Profile to be secured/modified : ", profiles, "\n")
+ print("Setting up Firefox Profile '", profile_name, "'\n")
# only setup ghacks-user.js, in advance mode, otherwise setup the "basic-user.js"
if advance_setup:
@@ -225,18 +222,18 @@ def setup_pf_profile(
if not skip_extensions:
setup_extensions(advance_setup)
- for profile in profiles:
- # firefox profile path on the os
- firefox_p_path = os.path.join(firefox_path, profile)
- backup_prefsjs(firefox_p_path)
- print("\nModified Preferences (user.js) and Extensions will now be copied to {}".format(profile))
- recusive_copy(temp_folder, firefox_p_path) # copies modified user.js, extensions
- if set_homepage:
- # set homepage to duckduckgo.com
- apply_one_time_prefs(profile, repo_location + "/profile/set-homepage.json")
- if set_ui:
- # Customize Firefox UI to better fit all addons
- apply_one_time_prefs(profile, repo_location + "/profile/set-ui.json")
+
+ # privacy-fighter profile path on the os
+ pf_profile_path = os.path.join(firefox_path, profile_name)
+ backup_prefsjs(pf_profile_path)
+ print("\nModified Preferences (user.js) and Extensions will now be copied to {}".format(pf_profile_path))
+ recusive_copy(temp_folder, pf_profile_path) # copies modified user.js, extensions
+ if set_homepage:
+ # set homepage to duckduckgo.com
+ apply_one_time_prefs(pf_profile_path, repo_location + "/profile/set-homepage.json")
+ if set_ui:
+ # Customize Firefox UI to better fit all addons
+ apply_one_time_prefs(pf_profile_path, repo_location + "/profile/set-ui.json")
def parse_firefox_ini_config(firefox_ini_path):
@@ -288,6 +285,44 @@ def create_pf_profile(profile_name, firefox_path, firefox_ini_path, firefox_ini_
firefox_ini_config.write(open(firefox_ini_path, "w"), space_around_delimiters=False)
+def import_profile_data(import_profile, profile_name, firefox_path, firefox_ini_config):
+ all_sections = firefox_ini_config.sections()
+ # print(all_sections)
+
+ import_profile_release = import_profile + "-release"
+ import_profile_path = ""
+
+ # Files to copy that store bookmarks, passwords db, site prefs etc.
+ data_files = [
+ "places.sqlite",
+ "favicons.sqlite",
+ "key4.db",
+ "logins.json",
+ "permissions.sqlite",
+ "formhistory.sqlite",
+ ]
+
+ for section in all_sections:
+ try:
+ if import_profile_release in firefox_ini_config.get(section, "Name"):
+ import_profile_path = os.path.join(firefox_path, firefox_ini_config.get(section, "Path"))
+ except configparser.NoOptionError:
+ pass
+ # If "default-release" doesn't exist, find "default"
+ if not import_profile_path:
+ for section in all_sections:
+ try:
+ if firefox_ini_config.get(section, "Name") == import_profile:
+ # print(section)
+ import_profile_path = os.path.join(firefox_path, firefox_ini_config.get(section, "Path"))
+ # print(import_profile_path)
+ except configparser.NoOptionError:
+ pass
+
+ for file in data_files:
+ shutil.copy2(os.path.join(import_profile_path, file), os.path.join(firefox_path, profile_name))
+
+
def resource_path(relative_path):
try:
base_path = sys._MEIPASS
@@ -310,8 +345,8 @@ def setup_extensions(advance_setup):
# Download and save extension.xpi files
extension_xpi = get_file(ext["url"])
open(os.path.join(extensions_folder, ext["id"]), "wb").write(extension_xpi.content)
-
- print("progress: {}/{}".format(index + 1, total_steps))
+ if gui_mode:
+ print("progress: {}/{}".format(index + 1, total_steps))
sys.stdout.flush()
# Download the "browser-extensions-data". these are extension's configuration files
@@ -486,9 +521,9 @@ def latest_version():
return False
-def backup_prefsjs(firefox_p_path):
- prefsjs_path = os.path.join(firefox_p_path, "prefs.js")
- prefsjs_backups_folder = os.path.join(firefox_p_path, "prefs-backups")
+def backup_prefsjs(pf_profile_path):
+ prefsjs_path = os.path.join(pf_profile_path, "prefs.js")
+ prefsjs_backups_folder = os.path.join(pf_profile_path, "prefs-backups")
prefsjs_backup_name = os.path.join(
prefsjs_backups_folder, ("prefs-" + str(datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") + ".js"))
)
@@ -527,7 +562,7 @@ def recusive_copy(source_path, destination_path):
# print("Copying: ", src_file)
# create parent directory
os.makedirs(os.path.dirname(dst_file_path), exist_ok=True)
- shutil.copy(src_file_path, dst_file_path)
+ shutil.copy2(src_file_path, dst_file_path)
def firefox_is_running():
From d91345a1c5e554aedd86b5c4013cd0ae0f8edb22 Mon Sep 17 00:00:00 2001
From: JGill
Date: Thu, 19 Dec 2019 13:00:51 +1030
Subject: [PATCH 22/25] New versions, better names display
---
privacyfighter/profile/extensions.json | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/privacyfighter/profile/extensions.json b/privacyfighter/profile/extensions.json
index 772f35c..bf1da7b 100644
--- a/privacyfighter/profile/extensions.json
+++ b/privacyfighter/profile/extensions.json
@@ -1,14 +1,14 @@
{
"extensions":
[
- {"name": "decentraleyes", "id": "jid1-BoFifL9Vbdl2zQ@jetpack.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3423038/decentraleyes-2.0.13-an+fx.xpi"},
- {"name": "https_everywhere", "id": "https-everywhere@eff.org.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3060290/https_everywhere-2019.6.27-an+fx.xpi"},
- {"name": "ublock_origin", "id": "uBlock0@raymondhill.net.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3412681/ublock_origin-1.22.4-an+fx.xpi"},
- {"name": "canvas_blocker", "id": "CanvasBlocker@kkapsner.de.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3410720/canvasblocker-0.5.14-an+fx.xpi"},
- {"name": "clear_urls", "id": "{74145f27-f039-47ce-a470-a662b129930a}.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3429897/clearurls-1.9.0-an+fx.xpi"},
- {"name": "temporary_containers", "id": "{c607c8df-14a7-4f28-894f-29e8722976af}.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3366287/temporary_containers-1.2-fx.xpi"},
- {"name": "terms_of_service_didnt_read", "id": "jid0-3GUEt1r69sQNSrca5p8kx9Ezc3U@jetpack.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/1050617/terms_of_service_didnt_read-2.0.0-an+fx.xpi"},
- {"name": "enforce_browser_fonts", "id": "{83e08b00-32de-44e7-97bb-1bab84d1350f}.xpi", "advance_setup": "True", "url": "https://addons.mozilla.org/firefox/downloads/file/3364323/enforce_browser_fonts-0.3-fx.xpi"},
- {"name": "privacybadger", "id": "jid1-MnnxcxisBPnSXQ@jetpack.xpi", "advance_setup": "True", "url": "https://addons.mozilla.org/firefox/downloads/file/3420722/privacy_badger-2019.10.8-an+fx.xpi"}
+ {"name": "Decentraleyes", "id": "jid1-BoFifL9Vbdl2zQ@jetpack.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3423038/decentraleyes-2.0.13-an+fx.xpi"},
+ {"name": "HTTPS Everywhere", "id": "https-everywhere@eff.org.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3442258/https_everywhere-2019.11.7-an+fx.xpi"},
+ {"name": "uBlock Origin", "id": "uBlock0@raymondhill.net.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3452970/ublock_origin-1.24.2-an+fx.xpi"},
+ {"name": "CanvasBlocker", "id": "CanvasBlocker@kkapsner.de.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3410720/canvasblocker-0.5.14-an+fx.xpi"},
+ {"name": "ClearURLs", "id": "{74145f27-f039-47ce-a470-a662b129930a}.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3453790/clearurls-1.9.4-an+fx.xpi"},
+ {"name": "Temporary Containers", "id": "{c607c8df-14a7-4f28-894f-29e8722976af}.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/3366287/temporary_containers-1.2-fx.xpi"},
+ {"name": "Terms of Service; Didn’t Read", "id": "jid0-3GUEt1r69sQNSrca5p8kx9Ezc3U@jetpack.xpi", "advance_setup": "False", "url": "https://addons.mozilla.org/firefox/downloads/file/1050617/terms_of_service_didnt_read-2.0.0-an+fx.xpi"},
+ {"name": "Enforce Browser Fonts", "id": "{83e08b00-32de-44e7-97bb-1bab84d1350f}.xpi", "advance_setup": "True", "url": "https://addons.mozilla.org/firefox/downloads/file/3364323/enforce_browser_fonts-0.3-fx.xpi"},
+ {"name": "Privacy Badger", "id": "jid1-MnnxcxisBPnSXQ@jetpack.xpi", "advance_setup": "True", "url": "https://addons.mozilla.org/firefox/downloads/file/3448925/privacy_badger-2019.11.18-an+fx.xpi"}
]
}
From 31f3ddb905f66f8eb0e60a9b900de81a12245202 Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 27 Dec 2019 21:37:13 +1030
Subject: [PATCH 23/25] Readme update
---
README.md | 41 +++++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index cddc32c..7bd114e 100644
--- a/README.md
+++ b/README.md
@@ -5,23 +5,35 @@
Easy to install, privacy protection browser setup.
A collection of best browser extensions and some configurations to help you fight for your privacy.
-**To install it, see the [Installation](#installation) section.**
The deeper you dig, more you find that we're [loosing privacy from corporations](https://github.com/jotyGill/privacy). You might even start to believe that there's nothing you can do about it. You can!. With the right information, tools and dedication, you can do a lot to protect your privacy and stand up for your basic human right.
-There are brilliant, hard working people who spend countless hours to make these privacy protecting tools. This project is a collection and setup of the best privacy protecting browser tools that exist today. (if you have any suggestions, please create a github 'issue')
+There are brilliant, hard working people who spend countless hours to make these privacy protecting tools. This project is a collection and setup of the best privacy protecting browser tools that exist today.
+The basic setup installs the following addons and some [user.js configurations](https://github.com/jotyGill/privacy-fighter/blob/master/privacyfighter/profile/basic/basic-user.js)
+1. [uBlock Origin](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/)
+2. [Temporary Containers](https://addons.mozilla.org/en-US/firefox/addon/temporary-containers/)
+3. [HTTPS Everywhere](https://addons.mozilla.org/en-US/firefox/addon/https-everywhere/)
+4. [Canvas Blocker](https://addons.mozilla.org/en-US/firefox/addon/canvasblocker/)
+5. [Decentraleyes](https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/)
+6. [ClearURLs](https://addons.mozilla.org/en-US/firefox/addon/clearurls/)
+7. [Terms of Service; Didn't Read](https://addons.mozilla.org/en-US/firefox/addon/terms-of-service-didnt-read/)
-### 6.0 Installation
-If you are an advance user check out the [Advance Options](#advance), otherwise continue.
+**For further details about the project see [DOCS](https://github.com/jotyGill/privacy-fighter/tree/master/docs)**
-### 6.1 Installation Steps for Windows OS
+**NOTE: From version 2.0 Privacy-Fighter is installed in a separate Firefox profile called "privacy-fighter". When upgrading from version 1.x to 2.x I recommend that you refresh your 'default' Firefox profile.
+visit `about:support` and click "Refresh Firefox" (right corner)**
+
+### 1.0 Installation
+Advance users can check out the [Advance Options](https://github.com/jotyGill/privacy-fighter/tree/master/docs#advance). For the basic setup just follow the following instructions.
+
+### 1.1 Installation Steps for Windows OS
1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
2. Download [Privacy-Fighter.exe](https://github.com/jotyGill/privacy-fighter/releases/latest/download/Privacy-Fighter.exe).
3. Close Firefox and run the downloaded file Privacy-Fighter.exe
4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
-### 6.2 Installation Steps for GNU/Linux and MacOS
+### 1.2 Installation Steps for GNU/Linux and MacOS
1. If you don't have Firefox installed, First download and install [Firefox](https://www.mozilla.org/en-US/firefox/new/).
2. Close Firefox.
@@ -31,17 +43,22 @@ wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privac
chmod +x ./privacyfighter-linux-amd64
./privacyfighter-linux-amd64
```
-3. ON MACOS: Download and run the [privacyfighter-macos-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64).
+3. ON MACOS: Download and run the [privacyfighter-macos-amd64](https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos).
``` bash
-wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos-amd64
-chmod +x ./privacyfighter-macos-amd64
-./privacyfighter-macos-amd64
+wget https://github.com/jotyGill/privacy-fighter/releases/latest/download/privacyfighter-macos
+chmod +x ./privacyfighter-macos
+./privacyfighter-macos
```
4. **After the installation finishes, follow the ["Post Installation"](#post-installation) section.**
-### 7.0 Post Installation
+### 2.0 Post Installation
1. After installation is done, open Firefox then "addons" (press Ctr+Shift+A) and enable all of them and allow them in private windows.
-2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
+2. Open **Bookmarks Manager (press Ctr+Shift+O)** > **"Import and Backup"** (top menu item) > **Import Data from Another Browser**, follow wizard to import your bookmarks and history from your existing browser (Chrome/Edge/Safari).
3. You can change the default search engine from Google to DuckDuckGo.
(Menu > Preferences > Search > Default Search Engine > DuckDuckGo)
+
+
+### 3.0 Usage And Troubleshooting
+After installing and following post installation setups. Every time you open Firefox, it will ask you to choose a profile.
+Select "privacy-fighter" profile. If you ever encounter a webpage breakage simple copy the link, close Firefox then open the link in "default-release" profile.
From acf37d4bcf881b92bfb3e84d22aa19ecf986da7a Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 27 Dec 2019 21:37:41 +1030
Subject: [PATCH 24/25] Link to master branch
---
privacyfighter/pf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py
index 734da6d..35837f2 100755
--- a/privacyfighter/pf.py
+++ b/privacyfighter/pf.py
@@ -23,7 +23,7 @@
__version__ = "2.0.0"
__basefilepath__ = os.path.dirname(os.path.abspath(__file__))
-repo_location = "https://raw.githubusercontent.com/jotyGill/privacy-fighter/develop/privacyfighter"
+repo_location = "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter"
# temporary folder to download files in
temp_folder = tempfile.mkdtemp()
From 2fcff8da36bd78562865c0f476467218824375c7 Mon Sep 17 00:00:00 2001
From: JGill
Date: Fri, 27 Dec 2019 21:45:40 +1030
Subject: [PATCH 25/25] Version 2.0.0
---
privacyfighter/version.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/privacyfighter/version.txt b/privacyfighter/version.txt
index 26aaba0..227cea2 100644
--- a/privacyfighter/version.txt
+++ b/privacyfighter/version.txt
@@ -1 +1 @@
-1.2.0
+2.0.0