EFForg/https-everywhere — pull request #379 by diracdeltas (2014-07-24 23:43:41+00:00)
Title: Add toggle mode for HTTP Nowhere

Many people, including the celebrated Jimmy Wales, have asked us to include an "HTTP Nowhere" mode in HTTPS Everywhere. Inspired by Chris Wilper's HTTP Nowhere add-on v1.0 (https://addons.mozilla.org/en-us/firefox/addon/http-nowhere/, licenced GPLv3), I added this feature.

Currently it does this by changing Firefox's default HTTP proxy (accessible in about:preferences) to a null proxy (`localhost:4`) while enabled.

TODOs:
* Probably better to register our own proxy filter for HTTP requests instead of changing the default HTTP proxy.
* Replace the confusing page that says "The proxy server is refusing connections" with a custom page telling the user that they are unable to load a site because HTTP Nowhere is active. I have no idea how to modify Firefox's internal error pages; if this is impossible, maybe we need to use an nsIProtocolHandler for "http://" instead of proxying.