Перейти к файлу
Eugen Sawin baedf1f44b Minor version bump. 2014-09-05 23:40:08 +02:00
config Removed 'follow-redirect' module. 2014-09-02 22:34:52 -07:00
keys Initial. 2014-05-20 03:03:56 +02:00
lib Removed 'follow-redirect' module. 2014-09-02 22:34:52 -07:00
test Added url expander plugin. 2014-09-02 22:34:47 -07:00
.gitignore Add logs to gitignore. 2014-07-28 15:58:17 +02:00
.jscsrc Add heap profiling metrics. 2014-09-01 20:56:23 +02:00
.jshintignore Move StatsD backend out of repo. 2014-07-08 22:52:31 +02:00
.jshintrc Bump up max cyclomatic complexity for HTTP/1.1 cacheability testing. 2014-08-06 23:33:09 +02:00
.travis.yml Changed mozjpeg module and install nasm in travis. 2014-07-23 22:49:28 +02:00
LICENSE Updated license. 2014-05-23 20:31:01 +02:00
README.md Changed mozjpeg module and install nasm in travis. 2014-07-23 22:49:28 +02:00
package.json Minor version bump. 2014-09-05 23:40:08 +02:00
proxy Rename start script. 2014-07-02 18:14:13 +02:00

README.md

Janus - Privacy & Compression Proxy

Build Status

Requirements

Installation

Get the code first.

git clone https://github.com/mozilla/node-janus

Next, use NPM to install all the dependencies.

cd node-janus  
npm install

Configuration and Usage

Proxy

You can find the default proxy configuration in config/default.yml. All settings are exposed and documented there.

You may edit the settings directly in the default configuration file or preferably override some of settings using a custom configuration file, see the node-config documentation for more details about the configuration system.

To start the proxy, just run

./proxy

The only command-line arguments supported are -h for help and -v for showing the version.

Firefox

You need Firefox Nightly for SPDY proxy support. When using self-signed certificates, you need to add it to Firefox first. To do this, use Firefox to call the proxy via its host-port combination.

https://<proxy.host>:<proxy.port>/

This should prompt you to add an exception for the self-signed certificate.

Automatic Client Configuration Using the Add-On

The prefered way for using the proxy is by installing the Janus add-on. When using the add-on, you can conveniently configure the optional features of the proxy and view some statistics on bandwidth savings.

Should you have reasons to set up the proxy without the add-on, please follow the manual instructions next.

Manual Client Configuration

Desktop

You can configure the secure proxy in Preferences/Advanced/Network/Settings. Select Automatic proxy configuration URL and set it to your custom PAC file or use the default configuration served by the integrated PAC server.

http://<pac.host>:<pac.port>

This will serve a suitable PAC file with the proper host and ports set. Check config/default.yml for the default PAC server connection details.

Android

For Fennec the steps are similar. Open about:config and set network.proxy.autoconfig_url to the location of your PAC file or the Janus PAC server. To load the PAC file and activate the proxy, set network.proxy.type to 2.

Production Deployment

Additional Requirements

By default, the proxy uses a basic in-memory cache and does only log basic metric stats. Additionally, the proxy supports a Redis-based caching solution and StatsD metrics reporting.

To enable the Redis cache, you need to have a running Redis server instance. The proxy-side configuration is straight-forward using config/default.yml, where you set the host and port accordingly and switch caching modes by setting cache.type.

To view and process the full metrics, you need a receiver compatible to StatsD metrics. To establish a connection, simply set the metrics.statsd settings accordingly in config/default.yml or your local overriding config files.

Development

Additional Requirements

Tests

To run all tests use

npm test

To get coverage statistics use

npm run-script coverage