Git Product home page Git Product logo

eyedeekay / i2p-in-private-browsing-mode-firefox Goto Github PK

View Code? Open in Web Editor NEW
56.0 8.0 10.0 21.08 MB

I2P in Private Browsing mode for Firefox, built using Webextensions and Contextual Identities

Home Page: https://eyedeekay.github.io/I2P-in-Private-Browsing-Mode-Firefox/

License: MIT License

JavaScript 59.72% Makefile 6.42% CSS 3.99% HTML 29.59% Shell 0.28%
i2p-browsing i2p-browser i2p-sites i2p-domains contextual-identities router-console firefox i2p-proxies webextensions i2p

i2p-in-private-browsing-mode-firefox's Introduction

I2P in Private Browsing Mode(Firefox-Only)

This is an webextension which introduces a set of new "Private Browsing" modes to Firefox-based browsers(Supporting webextensions, must be current ESR or greater) that makes it easier to configure a browser to use I2P securely and adds features for making I2P applications easier to use. It does this by isolating I2P-specific settings to Contextual Identities within Firefox, then loading them automatically when the user requests them. It also adds convenience and management features, like an embedded I2P console and Bittorrent integration with clients using the transmission-rpc API and via in-browser protocol handling integrations.

Privacy Policy

This browser extension does not collect any personal information. It requires access to local storage and browsing data permissions in order to delete them when directed to by the user. This browser extension does not transmit any information to any third party, nor will it, ever.

This browser extension cannot influence telemetry carried out by browser vendors to determine performance in their distribution channels, nor can it mitigate any other browser vendor telemetry.

This browser extension is entirely Free, Open-Source software.

Installation(Cross-Platform):

For desktop users this addon is available from addons.mozilla.org, where you will be able to recive automatic updates: I2P in Private Browsing.

Setting the Homepage

The first time you run the extension, Firefox will offer you the option of setting your homepage and new tab page to the homepage contained within the extension. You can decline this or edit it later and it will not affect your anonymity. Enabling this feature allows the extension to set your homepage to a local document with a number of useful I2P links.

Debian Installation:

Should you prefer, it is possible to install this extension system-wide by side-loading it into Debian. You can generate your own deb file by running the command:

    make deb

and then you can install it with:

    sudo apt install ../i2psetproxy.js_*.deb

Bittorrent Download:

The self-hosted plugin is available from bittorrent both within the I2P and Clearnet Bittorrent network(With a web seed to support it in case one goes dead).

Usage:

  • Basically, it "Just Works." After you install the plugin, browsing to an I2P domain will automatically stop the current tab and re-open the I2P site in an I2P Browser tab.
  • Besides that, four bookmarks are added to the "Bookmarks Toolbar," which will take you to visit your Java I2P applications, or the "Simplified I2P Landing Page" embedded in the plugin:
  • Landing page
  • Also, there's a menu for accessing I2P functionality while you're browsing. It lets you control a few settings in a granular way.
  • Menu
  • You can re-enable WebRTC but force it to always use the proxy that is enforced by the tab.
  • You can either force the browser to delete all history for I2P sites immediately, or you can close all your I2P Browser tabs at once and delete the history for I2P browsing when you're done.
  • That's all there is to it! Your browser is configured to safely use and administer I2P.
  • Optionally, you can add I2PSnark-RPC and use Bittorrent-over-I2P via the transmission-rpc interface. To do this, have a look at the torrent guide: Torrent guide

Features

  • [done] Provide a way to launch into an I2P-Specific contextual identity (container). Intercept requests to .i2p domains and automatically route them to the I2P container. Isolate the router console from other local applications by automatically intercepting requests to the router console to another container.
  • Visiting i2p-projekt.i2p
  • [done] Indicate the I2P browser is in use visually. Find an acceptable way to indicate it on Android.
  • Visiting webmail
  • [done] Set the http proxy to use the local I2P proxy automatically. Provide specific configuration for other types of I2P proxies(SOCKS, isolating HTTP)
  • [done] Disable risky webRTC features/offer the option to re-enable them with the proxy enforced.
  • [done] Change the color of the browser window to indicate that I2P is in use
  • Visiting i2ptunnel
  • [ready] Provide help in a variety of languages.
  • [done] Monitor the health and readiness of the I2P router it is instructed to use. Currently the plugin checks whether the HTTP Proxy is working by fetching an image from "http://proxy.i2p" and displaying a result. A work-in-progress binding to i2pcontrol is available in ./i2pcontrol, it is inert at this time.
  • Visiting toopie.html
  • [Done] Handle router console applications under their own origins and within their own contextual identity. (1) The router console is automatically confined to it's own container tab. (2) Use a custom protocol handler to place each i2p application/plugin under it's own origin, shortening router console URL's and placing applications under their own origin.
  • Visiting routerconsole
  • [Done] Handle Torrents by talking to i2psnark-rpc plugin and then adding them directly into the Firefox downloads drop-downs, menus, etc. Enable the use of I2PSnark as a peer-to-peer delivery mechanism for media files.
  • Visiting i2psnark
  • Monitoring torrents
  • [Done] Enhance the I2P browsing experience by allowing site developers distribute some or all of their resources as torrents, allowing the torrents to be treated effectively as a CDN.
  • Distribute your site as a torrent.
  • [Done] Indicate the level of authenticity provided by TLS. TLS is optional on I2P for now, but some sites offer it anyway. TLS support is experimental and in the works.
  • Use HTTPS with your I2P Site.
  • [Done] Provide alternate, in-I2P destinations for web sites that want to mirror their content within I2P.
  • [barely started] Isolate traffic by contextual identity to it's own HTTP Proxy tunnel, each reflecting it's own pseudonymous identity within I2P. The contextual identities. For now, the contextual identities used to manage browsing are "I2P Browsing" and "Web Browsing" where I2P Browsing is capable of using an outproxy but in the case of traffic destined for the clearnet does not do header rewriting, and Web Browsing falls back to the Proxy configured in Firefox. The I2P Browsing will be expanded to
    • I2P Amnesiac Browsing: Use for General Browsing, stores no history and uses an HTTP Proxy with a very short tunnel-close timeout and no key-reuse.
    • I2P Social Networking: Use this for logging into social network accounts, forums, and other interactive asynchronous public communication platforms where your identity is behaviorally linkable. This has a very long tunnel-close timeout and key-reuse until specifically invoked.
    • I2P Blogging: Use this for posting content to the web interface of your blog or to other similar websites that you create content on.
  • Visiting clearweb

Video

  • Video of the plugin in action

Documents

  • Browser Outline: This document is an outline of each of the browser extension's feature panels in presentation form.
  • Smart Lander Design: This is the original outline of the smart landing page which became the I2P home page within the browser and the drop-down control panel.
  • Other extensions: and how they work with this one.

Super Extra Important Background Info:

This plugin's viability is directly related to the viability of Mozilla and Tor's work on hardening Firefox itself and of particular interest are the "Uplift" and "Fusion(Firefox Using Onions)" projects.

Links about Project Uplift

  • Tor Uplift is a project which brings important features of the Tor Browser to the mainstream of Firefox users by including patches from Tor Browser Bundle into Firefox where it is appropriate.
  • First Party Isolation is a feature in Firefox and other browsers which keeps information from leaking across first-party domains.
  • Fingerprinting is a technique where a tracker attempts to extract unique information about a user from a side-channel in order to create an identifier that can be used to correlate the user across many sites.
  • Fennec is Firefox for Android and this link has some analysis of the privacy consequences of the Android platform.
  • Tracking in Firefox is surveyed here.

Project uplift seems to have largely been accomplished?

Links about Project Fusion

  • Project Fusion or Firefox using Onions is a joint Mozilla/Tor effort to create an enhanced Private Browsing mode for Firefox which uses Tor.
  • Notes from a meeting about Fusion.
  • Tor at the Heart: Firefox is a blog about Tor and the relationship they have to Firefox re: TBB, Fusion.

The Other Version

New versions of this extension create an I2P in Private Browsing mode instead, using container tabs.

Since this is a drastic change to the behavior of the old plugin, and since there is no UI a new entry for the new plugin has been made at a new location on addons.mozilla.org.

  • This is the new version: [link]

  • This is the old version: [link]

Android usage:

Use the old version, on either an old version of Firefox(pre-68) or by enabling this custom collection: [Recommended Plugins] https://addons.mozilla.org/en-US/firefox/collections/14614396/I2P-Browser-Fork/

i2p-in-private-browsing-mode-firefox's People

Contributors

eyedeekay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i2p-in-private-browsing-mode-firefox's Issues

Plugin Tab: I2P-Bote

An I2P-Bote plugin tab is a good idea too, but a low priority since Bote isn't very active right now.

Android

Somewhere in the past few releases I broke Android, probably while I was making the window-management less irritating. Find+fix.

Internationalize website

The plugin itself supports multiple languages, but the website does not. I should fix that up ASAP.

Uplifting 2: audio stuff

Work with Mozilla to disable fingerprintable audio API's when privacy.resistFingerprinting=true.

Option to re-enable WebRTC

WebRTC can't be disabled on a per-tab basis, so I'm going to add a checkbox(disabled by default) for optionally re-enabling it.

privacy-breach-generic false positive with lintian

We make a request to proxy.i2p, a sort of "loopback" site, to ensure that the proxy is ready for the browser and provide user feedback. Lintian sees proxy.i2p as a remote site, which it isn't. Given this, the Warning issued by lintian is a false positive. This should be handled somehow.

Handling I2P Loopbacks-type addresses and httptunnel Pluggable Loopbacks

proxy.i2p is a locally hosted tunnel that only your HTTP Proxy tunnel can visit. As such, it's a special case for the extension, since there is no great risk to visiting your own localhost in this way and since the extension needs to use it even if it doesn't know it should be using the I2P context. This concept is being extended for browsing with "pluggable" loopbacks in an experimental standalone http proxy, which provide friendly names for router console applications in the same basic way.

Tidy up the settings and document where they come from and what they do

Now that this is getting more and cooler features, I need to go over what all the settings are, how they're configured, which ones are obsolete and which ones needs to be created to fully realize all the cool stuff this plugin can do. This should be done before I even introduce settings for the torrent RPC protocols which makes it another blocker for the next version.

Uplifting 1: webgl

Work with Mozilla to finish webgl requirements for resistFingerprinting.

Honor Contextual Identities when Clearing Cookies

Right now the clear data button clears the data for the whole browser. Instead, it should clear as little as is reasonable from the main contextual identity and clear the cookies, cache, etc from the i2pbrowser and routerconsole contextual identities.

Tested-On: Documentation

It's possible that people will want to run this extension on variant Firefox browsers. There are some where I know it won't work, like Waterfox which only has XUL extensions, and many where it may or may not. It has in the past been used with Firefox ESR, Firefox, I2P Browser, Iceweasel, Icecat, Fennec, and Icecat Mobile at various points. Somehow I need to be able to automatically test for compatibility with each one, especially on mobile devices.

Relationships to other projects

This is super easy to hack on. Maybe too easy to abandon even if IBB is objectively better in most ways except browser updates. Plus, it could be used in a similar way to Tor tabs in Brave or Icecat and can be signed by Mozilla. I need to clearly enumerate the pros and cons of each approach.

Private Browsing with i2p a'la Brave

Starting from regular browsing, open "Private Browsing with I2P" mode. Also solves my plugin updates without outproxies issue(#4) but maybe creates another one(#6)? Solve #1 first.

Secure configuration of tunnels for RPC remotes

Eventually we'll have to have configuration for different RPC endpoints for I2PControl and Bittorrent, from there it's not a stretch to let remote clients be controlled over i2p tunnels as well, but in this case we need to make sure that we require the password to be changed from the default and possibly look into using encrypted leasesets here too.

Native Messaging with i2pcontrol

In order to talk to i2pcontrol I need to set up rules for making a "Native Messaging" connection with an I2P router. In order to do that, I'll need to figure out how to add a native messaging manifest to the resources in the I2P router.

FoxyProxy Compatibility?

This extension currently Breaks the expected behavior of FoxyProxy by enforcing it's rules over those described by FoxyProxy. This one might be more trouble than it's worth, in fact I think it probably is, but if it isn't, this is a nice-to-have for some of the longtime Foxy users to ease their transition.

Torbrowser

Are there any plans to support the Torbrowser?

Something strange going on with Twitter logins

There is a chance this extension may be breaking Twitter logins in some circumstances. How is not immediately apparent to me from the information I have, however it's infinitely redirecting people which could either arise from the outproxy configuration, or Twitter sign-on is broken because some aspect of it is being blackholed or redirected mistakenly by the webextension. Or maybe Twitter's wrong, but they have a bigger staff than me so I'll assume I'm wrong first.

More intuitive history management, better programming interface

Right now history management is from before it used contextual identities, with some hacks on top. It needs to be changed to a better interface, which simply takes a contextual identity and clears history based on that information. This will improve security, reliability, and be useful in non-I2P contexts in the future.

Other Containerizers

Right now this extension conflicts with other extensions that containerize websites, including extensions that come from Mozilla itself. Co-Exist with these extensions.

Re-Internationalize

I absolutely gutted the strings for the extension recently and haven't made the pages translatable again yet.

I wonder if I understand enough Spanish to write a Spanish translation myself. I will probably give that a shot too.

Plugin Tab: MuWire

This is the first plugin that will get it's own container tab and protocol handler in this extension. This will only work with the Java I2P Plugin version of the MuWire application.

Better SOCKS defaults

SOCKS is not used by default and still requires manual configuration. When a user selects SOCKS but leaves host:port undefined, defaults localhost:4446 should be used.

Descriptive Proxy Error Page

When the proxy isn't ready, but the user enters an I2P browsing tab, provide a descriptive error page to guide the user to a solution, even if that solution is to tell them to wait 2 minutes.

States should be described:

  • Router Not Present: There is no indication that I2P is installed on the system. Direct them to an I2P distribution.
  • HTTP Proxy Not Ready: The router is present, but the HTTP Proxy is not up yet. Wait 2 minutes, if t>2 minutes, direct them to /i2ptunnel to troubleshoot.

Re-Name it, at least on distribution channels

i2psetproxy.js doesn't really tell much about what this plugin does anymore. I2P in Private Browsing is probably better. I don't think I depend too much on this repository being named i2psetproxy.js for like, CI or anything, but if any issues do come up then I guess I'll write about them here as I find and resolve them.

The Great Lint Rolling

There are like a bunch of linter errors for me to clean up. Most of them are pretty boring Javascript-syntax stuff that doesn't make that much difference, but it's a chance to go over the code and tidy it up by definition. I'm partly done, will close this issue when I am completely done on branch lint-roll

Uplifting 3: Letterboxing

I dunno what's up here. This setting is privacy.resistFingerprinting.letterboxing=true or something like that. If seems like the privacy.websites.resistFingerprinting API should enables privacy.resistFingerprinting.

In-i2p updates?

Can I even do that? Without messing with omni.ja or whatever else?

Be Unobtrusive

This plugin has to interfere with normal browser operation just a little bit, but it shouldn't ever do it unnecessarily. Setting the home page was a big #fail, we don't do that anymore (in trunk). Besides that, more testing for peaceful co-existence with other plugins and examination of what happens when a proxy.onRequest function does not resolve a proxyInfo object and the browser presumably falls back. I do know that if the proxy is set via network preferences or about:config it will fall back to that proxy, but I want to make sure there are no exceptions to that rule.

Dark mode, theme tolerance

The plugin should not interfere with dark mode or themes installed in the browser except when dealing with I2P sites. If dark mode can be detected, providing dark-themed contextual ID tabs becomes a goal.

WebRTC state not reflected accurately if Snowflake is pre-installed

In certain circumstances, the WebRTC state will default to enabled but forced down the proxy, which is set per-tab. In some of those cases, I2P in Private Browsing, which displays a checkbox to reflect WebRTC enabled/disabled state, will show WebRTC as disabled when it is infact enabled. This doesn't seem to affect WebRTC obedience, so it doesn't introduce a vulnerability, but it does need to be corrected ASAP. Likely solution is to just check WebRTC state at a different point.

Whonix

I2P integration in Whonix is running into the problem of making the router console available(Which requires either a proxy exception or an extra proxy like Privoxy) without making the whole localhost available. Since that's a problem this can solve, after I deal with the linting stuff I need to get back in touch with them. Right now I'm also (ab)using include-binaries, I'll need to resolve that too.

Reseed over WebRTC Data Channel

This can't be done in just this extension, but this extension is probably an important component of a future plan in which this is straightforward. This is the trickiest thing I've tried so far, K, let's define some phases here...

Phase 0: Design

We're pretty different from Tor in the places where Snowflake would really matter, but it's an inspiring effort and a cool product. This process probably won't bear much resemblance to Snowflake when it's all designed, but Snowflake was the original inspiration for the idea.

What we want to do is make it possible for I2P users to easily reseed eachother in a peer-to-peer way when necessary. It must be done no more often than a normal reseed, and it must only ever be client initiated.

This is not a webRTC transport for I2P. That would be an entirely different project. Especially if it were to do something genuinely insane like try to incorporate browser users not otherwise running I2P into the routing process. That would be crazy, right? Right? (It might not actually be that crazy but I have enough to think about right now). This is only for reseeds.

Questions

  • Where to get the reseed file? Locally or from a reseed server? Probably a server, and we act as a proxy, but we need to examine advantages and disadvantages of each. Maybe both, server then a local fallback?
  • Do we need to geolocate and never fetch a reseed file for a user in a country which is already automatically in hidden mode? Probably yes. Might want to never make them reseed helpers anyway.
  • How to distribute the reseed file? If it comes from a server it will be signed by a key we already trust, that's fine, but if it comes from somewhere local we may want to use an interstitial

Components

  • Browser Extension - This repo. We use it because we can to some extent assume that people using this extension are also using I2P and can thus provide a reseed from a local source if need be.
  • Javascript Import - Placed on web pages, a'la Snowflake and or Flashproxy. Shows a download link that says "Download reseed file over WebRTC," uses a (random?) extension user.
  • Native Proxy - Runs locally, obviates the need to download the reseed in a browser by fetching it over WebRTC on behalf of the router. Will start out as a "Bridge" but eventually be incorporated into I2P if successful.
    1. Go version, using pion/webrtc
    2. Java version, using whatever that Guardian Project library is probably

Phase 1: Manual Mode

Components required

  • Browser Extension
  • Javascript Import

Phase 2: Bridged Prototype

  • Native Proxy, Go Version

Phase 3: Router Incorporation

  • Native Proxy, Java Version

Moar Bookmarks

A larger set of default bookmarks in their own directory would probably be good. Stuff like the forums, zzz's forums, gitlab, stats, identiguy, postman, echobot test, fingerprint test, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.