Confirmed users
438
edits
No edit summary |
|||
(28 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<big><big>'''The Janus proxy experiment has ended. | |||
The code remains on [https://github.com/mozilla/node-janus github], but we are no longer actively developing it.'''</big></big> | |||
Janus is a | |||
== Overview == | |||
'''Janus is a compression and privacy proxy ''' with the goal to provide more secure and efficient mobile browsing. | |||
The [https://wiki.mozilla.org/index.php?title=Mobile/Janus#Goals goals section] gives some details on our objectives and the ways we want to achieve them. | |||
The Janus Proxy is currently using the experimental [http://www.chromium.org/spdy/spdy-whitepaper SPDY protocol] but will use the upcoming new [http://tools.ietf.org/html/draft-ietf-httpbis-http2-13 HTTP/2] standard when it is finalized. | |||
The proxy does compress and re-encode media files using techniques described in the [https://wiki.mozilla.org/index.php?title=Mobile/Janus#Features features section]. | |||
=== Communication Channels === | |||
==== Chat ==== | |||
You can reach the developers of the proxy on the '''#janus''' channel on the Mozilla IRC network. | |||
==== Mailing List ==== | |||
For asynchronous discussions, use the [https://mail.mozilla.org/listinfo/janus-dev janus-dev] mailing list. | |||
==== Bug Reports ==== | |||
The easiest way to report bugs is using the '''Report Bug''' feature on the Janus add-on. That would report your client settings and the additional information you provide to give us enough context to reproduce the issue. | |||
Alternatively, you can directly create a [https://github.com/mozilla/node-janus/issues GitHub issue] to report the problem you've encountered. Please make sure to provide explicit ''steps to reproduce'' the issue and also note your client configuration and browser version. | |||
=== Janus Proxy === | |||
The [https://github.com/mozilla/node-janus Janus Proxy source code] is hosted on GitHub. | |||
We are using [https://github.com/mozilla/node-janus/issues GitHub issues] to track bugs and features. | |||
=== Firefox (for Android) === | |||
The Janus Proxy requires secure SPDY (soon HTTP/2) proxy support on the browser, which are supported on Firefox 33 and up. | |||
Currently (August 2014), the supported Firefox versions are served on the [https://www.mozilla.org/en-US/firefox/channel/#aurora Aurora] or [http://nightly.mozilla.org Nightly] channels. | |||
Required or desired '''features''' that Janus could utilize are tracked here | |||
* {{bug|378637}} - Add support for connecting to HTTP proxy over HTTPS | |||
* {{bug|366559}} - Firefox/Gecko should support LZMA as an HTTP transfer-encoding method | |||
* {{bug|1010068}} - Disable OCSP on Firefox for Android | |||
* {{Bug|944117}} - Implement support for WebM Alpha | |||
Known '''issues''' affecting Janus are tracked here | |||
* {{bug|1014589}} - Fennec crashes on page load when connected with SPDY proxy | |||
* {{Bug|1047485}} - HTTPS sites slow when SPDY proxy in use | |||
* {{Bug|1025582}} - CORS request intermittently fails after refreshing page rapidly | |||
=== Janus Add-On === | |||
To make the configuration of the proxy easier, we provide the [https://github.com/mozilla/janus-addon Janus add-on] for your Firefox (for Android) browser. | |||
The add-on settings give you also more control over the desired behavior of the proxy like compression levels and give you access to some experimental features. | |||
=== Firefox OS === | |||
We are also working on providing support for the proxy on Firefox OS, the progress is being tracked in {{Bug|1041389}}. | |||
== Goals == | == Goals == | ||
The goal of Janus is to | The main goal of the Janus Proxy is to provide a better mobile browsing experience by '''enhancing privacy''', '''reducing the download sizes''' of web content and therefore '''decrease load times''' on slow connections. | ||
* Reduce | |||
* Reduce page load times | Here are our objectives: | ||
* | * Increase user privacy ''by encryption'' | ||
* Reduce bandwidth requirements ''by data compression'' | |||
* Reduce page load times on slow connections ''using efficient transmission protocols'' | |||
The potential advantages for users are | |||
* Encryption of traffic on insecure WiFi networks | |||
* Increased mileage on limited data plans | |||
* Faster browsing on slow connections | |||
== Features == | |||
To achieve the [https://wiki.mozilla.org/index.php?title=Mobile/Janus#Goals goals], we discuss the features of the Janus Proxy and their implementation statuses in this section. | |||
=== Status === | |||
{| class="wikitable" | |||
|- | |||
! Feature !! colspan="5"|Status !! Version !! See also | |||
|- | |||
| [[Mobile/Janus#Transmission_Protocol|SPDY]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|i|Add-on}} || {{JanusFeatureStatus|i|Fennec}} || {{JanusFeatureStatus|i|Desktop}} || {{JanusFeatureStatus|ni|B2G}} || 0.1 || {{bug|378637}} [http://www.chromium.org/spdy/spdy-whitepaper spec] | |||
|- | |||
| [[Mobile/Janus#Transmission_Protocol|HTTP/2]] || {{JanusFeatureStatus|ni|Proxy}} || {{JanusFeatureStatus|ni|Add-on}} || {{JanusFeatureStatus|i|Fennec}} || {{JanusFeatureStatus|i|Desktop}} || {{JanusFeatureStatus|ni|B2G}} || || [http://tools.ietf.org/html/draft-ietf-httpbis-http2-14 spec] | |||
|- | |||
| [[Mobile/Janus#Text_Compression|Text compression / gzip]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|i|Add-on}} || {{JanusFeatureStatus|i|Fennec}} || {{JanusFeatureStatus|i|Desktop}} || {{JanusFeatureStatus|ni|B2G}} || 0.2 || | |||
|- | |||
| [[Mobile/Janus#Text_Compression|Text compression / xz]] || {{JanusFeatureStatus|off|Proxy}} || {{JanusFeatureStatus|ni|Add-on}} || {{JanusFeatureStatus|ni|Fennec}} || {{JanusFeatureStatus|ni|Desktop}} || {{JanusFeatureStatus|ni|B2G}} || 0.3 || {{bug|366559}} {{gh|mozilla|node-janus|13}} | |||
|- | |||
| [[Mobile/Janus#Image_Compression|Image compression / libjpeg-turbo]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|i|Add-on}} || || || || 0.4 || | |||
|- | |||
| [[Mobile/Janus#Image_Compression|Image compression / mozjpeg]] || {{JanusFeatureStatus|off|Proxy}} || {{JanusFeatureStatus|i|Add-on}} || || || || 0.2 || {{Bug|500500}} {{gh|mozilla|node-janus|34}} | |||
|- | |||
| [[Mobile/Janus#Image_Compression|Image compression / pngquant]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|i|Add-on}} || || || || 0.4 || | |||
|- | |||
| [[GIF to video]] || {{JanusFeatureStatus|i|Proxy}} ||{{JanusFeatureStatus|off|Add-on}} || {{JanusFeatureStatus|i|Fennec}} || {{JanusFeatureStatus|i|Desktop}} || {{JanusFeatureStatus|ni|B2G}} || 0.2 || {{gh|mozilla|node-janus|16}} | |||
|- | |||
| [[Video compression / H.264]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|ni|Add-on}} || || || || 0.4 || {{gh|mozilla|node-janus|48}} {{gh|mozilla|node-janus|49}} | |||
|- | |||
| [[Adblock]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|off|Add-on}} || || || || 0.2 || | |||
|- | |||
| [[Mobile/Janus#Caching|Caching]] || {{JanusFeatureStatus|off|Proxy}} ||{{JanusFeatureStatus|off|Add-on}} || || || || 0.2 || {{gh|mozilla|node-janus|42}} {{gh|mozilla|node-janus|3}} | |||
|- | |||
| [[Safe Browsing]] || {{JanusFeatureStatus|ni|Proxy}} || {{JanusFeatureStatus|ni|Add-on}} || || || || || | |||
|- | |||
| [[Dynamic compression rate ]] || {{JanusFeatureStatus|ni|Proxy}} ||{{JanusFeatureStatus|ni|Add-on}} || || || || || | |||
|- | |||
| [[Mobile/Janus#Metrics|Metrics]] || {{JanusFeatureStatus|i|Proxy}} || || || || || 0.3 || {{gh|mozilla|node-janus|45}} {{gh|mozilla|node-janus|32}} {{gh|mozilla|node-janus|30}} {{gh|mozilla|node-janus|28}} {{gh|mozilla|node-janus|24}} {{gh|mozilla|node-janus|12}} [https://github.com/mozilla/statsd-console-backend statsd-console-backend] | |||
|- | |||
| [[Mobile/Janus#Metrics|Metrics / memory and GC]] || {{JanusFeatureStatus|i|Proxy}} || || || || || 0.4 || {{gh|mozilla|node-janus|52}} | |||
|- | |||
| [[Mobile/Janus#Tests|Tests / performance]] || {{JanusFeatureStatus|i|Proxy}} || || || || || || {{gh|mozilla|node-janus|53}} | |||
|- | |||
| [[Mobile/Janus#Bug_Reports|Bug reports]] || {{JanusFeatureStatus|i|Proxy}} || {{JanusFeatureStatus|i|Add-on}} || || || || 0.3 || {{gh|mozilla|node-janus|38}} | |||
|} | |||
<!-- | |||
{{gh|mozilla|node-janus|}} | |||
{{JanusFeatureStatus|STATUS|PLATFORM}} | |||
STATUS = np | i | ni | off | |||
PLATFORM = Proxy | Desktop | Android | B2G | |||
--> | |||
=== Open Issues (suitable for contributors) === | |||
If you want to contribute to the project and don't know where to start, this list should give you an idea of what we are currently working on or planning to. | |||
Alternatively, you may also directly pick a [[Mobile/Janus#Feature|feature]] to improve or an [https://github.com/mozilla/node-janus/issues issue] to attack. | |||
{| class="wikitable" | |||
|- | |||
! Issue !! Description !! Mentors !! See also | |||
|- | |||
| HTTP/2 || Migrate to HTTP/2, adjust handling, test for regressions || snorp, esawin || {{gh|mozilla|node-janus|15}} [https://github.com/molnarg/node-http2 node-http2] | |||
|- | |||
| Add-on || Update to HTTPS PAC, fix/remove scrollbar on Linux, add quality control settings || snorp, esawin || {{gh|mozilla|node-janus|67}} [https://github.com/mozilla/janus-addon janus-addon] | |||
|- | |||
| Image worker || Fix image-worker issues, rewrite to TCP/HTTP interface, enable per-request settings || sylvain, esawin || {{gh|mozilla|janus-image-worker|2}} | |||
|} | |||
=== Transmission Protocol === | |||
Routing requests through a SPDY proxy does require less open TCP connections (multiplexing), decreases packet sizes (header compression) and reduces the number of packets (header caching) compared to HTTP/1.1. Low bandwidth and high latency connections should benefit from this. | |||
=== Image Compression === | |||
The current trend on the Web shows an increase in average page size, especially due to high-resolution images. Additional image compression and downsizing should decrease the bandwidth requirements and enable faster page loads. | |||
We want to reduce images sizes with no noticeable quality degradation, or with a dynamic quality setting controlled by the user. | |||
=== Text Compression === | |||
We use '''gzip''' and possibly '''xz'''. ''TODO'' | |||
=== Caching === | |||
''TODO'' | |||
=== Safe Browsing === | |||
''TODO'' | |||
Other crazy stuff we could do: | === Other === | ||
Other '''crazy''' stuff we could (technically) do: | |||
* Man-in-the-middle HTTPS traffic only for images (so they get recompressed) with user consent | * Man-in-the-middle HTTPS traffic only for images (so they get recompressed) with user consent | ||
* Convert animated GIF to H264/WebM/whatever. gfycat.com does this now with apparently good results | * Convert animated GIF to H264/WebM/whatever. gfycat.com does this now with apparently good results | ||
* Pre-Shumwayize Flash content | * Pre-Shumwayize Flash content | ||
* Automatic readability mode for some sites | * Automatic readability mode for some sites | ||
* Add support for adaptive streaming (MPEG-DASH) for servers that don't support it. Transcode to lower bitrates. | * Add support for adaptive streaming (MPEG-DASH) for servers that don't support it. Transcode to lower bitrates. | ||
** Proxy HLS sites as MPEG-DASH | ** Proxy HLS sites as MPEG-DASH | ||
* | * Pre-rendering of pages | ||
Taras crazy stuff: | Taras crazy stuff: | ||
* http://zsync.moria.org.uk/ content that changes a little bit, but frequently | * http://zsync.moria.org.uk/ content that changes a little bit, but frequently | ||
* Can also do this for web cut/n/paste. Server could insist on serving zsync summaries of common files(eg css libs, js libs like jquery) and client would do a distance search locally to see if it has anything similar and then only do range requests needed to construct the new version. | |||
<code> | <code> | ||
Currently we send if-modified-since: | Currently we send if-modified-since: | ||
Line 44: | Line 176: | ||
** server could spdy-push partial files(eg only css that gets used) + zsync of rest of contents so client can request missing pieces for other pages on the website(this can hugely reduce transfer sizes)...If i remember correctly from https://bugzilla.mozilla.org/show_bug.cgi?id=834865 70%+ of css is leftover cruft...Note this might be easier to do having sites be aware of this and bundling a library that supports having css/js broken up into multiple files & supports waiting on missing pieces | ** server could spdy-push partial files(eg only css that gets used) + zsync of rest of contents so client can request missing pieces for other pages on the website(this can hugely reduce transfer sizes)...If i remember correctly from https://bugzilla.mozilla.org/show_bug.cgi?id=834865 70%+ of css is leftover cruft...Note this might be easier to do having sites be aware of this and bundling a library that supports having css/js broken up into multiple files & supports waiting on missing pieces | ||
== Research == | |||
== | |||
=== Image Compression === | === Image Compression === | ||
Line 245: | Line 320: | ||
==== Bandwidth is the decisive factor for page load speed ==== | ==== Bandwidth is the decisive factor for page load speed ==== | ||
Bandwidth gives the upper bound on transmission speed under optimal conditions. In realistic environments, considering the speed of light and the shortcomings of the transmission protocol, ''latency'' is the limiting factor for the maximum throughput. | Bandwidth gives the upper bound on transmission speed under optimal conditions. In realistic environments, considering the speed of light and the shortcomings of the transmission protocol, ''latency'' is the limiting factor for the maximum throughput. | ||
== Performance Analysis == | == Performance Analysis == | ||
Let's collect some ideas here how to profile | Let's collect some ideas here how to profile the prototype. | ||
Could be useful: | Could be useful: | ||
Line 319: | Line 331: | ||
* [http://www.ietf.org/rfc/rfc2187.txt Application of Internet Cache Protocol (ICP)] | * [http://www.ietf.org/rfc/rfc2187.txt Application of Internet Cache Protocol (ICP)] | ||
* [http://tools.ietf.org/html/rfc2616 HTTP/1.1] | * [http://tools.ietf.org/html/rfc2616 HTTP/1.1] | ||
* [http://tools.ietf.org/html/draft-ietf-httpbis-http2- | * [http://www.chromium.org/spdy/spdy-whitepaper SPDY] | ||
* [http://tools.ietf.org/html/draft-ietf-httpbis-http2-14 HTTP/2] | |||
* [http://tools.ietf.org/id/draft-agl-tls-nextprotoneg-00.txt Transport Layer Security (TLS) Next Protocol Negotiation Extension (NPN)] | * [http://tools.ietf.org/id/draft-agl-tls-nextprotoneg-00.txt Transport Layer Security (TLS) Next Protocol Negotiation Extension (NPN)] | ||
* [http://www.chromium.org/spdy/spdy-proxy Chromium SPDY Proxy] | * [http://www.chromium.org/spdy/spdy-proxy Chromium SPDY Proxy] |