Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

How to install

JHK edited this page Jul 6, 2012 · 3 revisions

Requirements

  • Java JDK at least in version 6
  • Maven
  • optipng
  • jpegoptim
  • openssl (for SPDY only)

On a Ubuntu 12.04 you can install all the requirements with a single line: sudo apt-get install openjdk-7-jdk maven optipng jpegoptim openssl

HTTP Proxy

To get the HTTP proxy running is pretty easy.

Setting up the Server

  1. Get the code: git clone https://github.com/JHK/jLange.git
  2. Build the project: cd jLange && mvn clean install
  3. Run the proxy: ./run.sh

Setting up the Client

function FindProxyForURL(url, host) {
    if (shExpMatch(url, "http://*")) { return "PROXY localhost:8080; DIRECT"; }
    return "DIRECT";
}
  1. Create or edit a PAC file (e.g. ~/pac.js) with content above (replace localhost with your proxy):
  2. Update your browser to use this file for proxy detection

Enable HTTP pipelining for proxy in Firefox

  1. Visit about:config
  2. Set network.http.proxy.pipelining to true

Enable HTTP pipelining for proxy in Chrome/Chromium

No further setup needed due chrome currently does not support HTTP pipelining for proxies.

SPDY Proxy

For a SPDY proxy you need to build a certificate signed from a CA, so this might getting more complicated.

Setting up the Server

  1. Get the code: git clone https://github.com/JHK/jLange.git
  2. Build the project: cd jLange && mvn clean install
  3. Setup a CA: ./tools/create_ca.sh (keep the password in mind)
  4. Create a server certificate: ./tools/create_self_signed_cert.sh
    • To sign the certificate you need the password of the CA
    • The CN must be the IP or Hostname of the proxy server
  5. Copy proxy properties: cp ./src/main/resources/jLange.properties .
  6. Setup proxy:
    • org.jlange.proxy.spdy.enabled=true
    • org.jlange.proxy.spdy.ssl.store=pki/CA/private/rootserver.jks
    • org.jlange.proxy.spdy.ssl.key=<YOUR_CERTIFICATE_PASSWORD>
  7. Run the proxy: ./run.sh
    • This script includes a parameter for the jvm to include NPN support which is mandatory for getting SPDY running

Setting up the Client

Currently only Chrome/Chromium with at least version 20 support SPDY proxies.

function FindProxyForURL(url, host) {
    if (shExpMatch(url, "http://*")) { return "HTTPS localhost:8443; DIRECT"; }
    return "DIRECT";
}
  1. Create or edit a PAC file (e.g. ~/pac.js) with content above (replace localhost with your proxy):
  2. Update your browser to use this file for proxy detection
  3. Import ca.crt into the trusted certificates