Skip to content
This repository has been archived by the owner on May 2, 2019. It is now read-only.

Latest commit

 

History

History
192 lines (132 loc) · 7.32 KB

BUILD.md

File metadata and controls

192 lines (132 loc) · 7.32 KB

Manually building CENO

What follows are instructions for manually building CENO from source. The first thing you will need to get started with this is the git Version Control System software.

Assuming you are using the command-line git, you can obtain a copy or clone of the CENO source by running the following command

git clone https://github.com/equalitie/ceno

Building the client-side components

The client-side components include everything a user needs to use CENO to circumvent censorship. The components here provide user interface elements and utilities as well as a distribution of Freenet that will allow access to securely stored content.

The components include

  1. Firefox and Chrome browser extensions
  2. A proxy server
  3. A Freenet plugin

Prerequisites

  1. Either the Mozilla Firefox or Google Chrome (or Chromium) web browser
  2. The Google Golang compiler and toolset
  3. Node.js and NPM (For packaging the Firefox extension and building the CENO Portal pages)
  4. Apache Ant (for building the Freenet plugins)

Web Browser

To use CENO as it was intended, you will need to be using either

  1. Mozilla Firefox or
  2. Google Chrome or Chromium

Golang

First, you must have the most recent version of Google's Golang compiler installed. See the official site for instructions.

You will then have to set environment variables that will specify where Go binaries can be found and where the Go installation is located. Assuming you installed Go to /usr/local/go, run

export GOPATH=$HOME/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin

Node.js and NPM

You can download Node.js and NPM together directly from the official site. In Debian-based systems you should also install the nodejs-legacy package.

Building the client

If you have already configured the client or would like to stick with the default configuration, you can run the client by executing the following commands into your operating system's terminal program.

# <path-to-ceno> must be replaced with the path to where you cloned CENO
cd <path-to-ceno>/ceno-client/
./build.sh
CENOLANG=<language> ./client

Where language is one of the supported languages (a <language code>.json file in ceno-client/translations). E.g. en-us or fr-fr.

Packaging the browser extensions

Once packaged, either browser extension can be installed by opening it in its respective browser.

Firefox extension

Mozilla Firefox extensions using the addon SDK as CENO does can be easily built using Mozilla's new jpm tool. You can install it easily with NPM and then package the Firefox extension into an XPI file

npm install -g jpm
cd <path-to-ceno>/ceno-firefox/
jpm xpi

Chrome extension

Complete instructions for all packaging tasks are available in the Chrome developer documentation

The five steps relevant to us are as follows:

  1. Bring up the Extensions management page by going to this URL: chrome://extensions.
  2. Ensure that the "Developer mode" checkbox in the top right-hand corner is checked.
  3. Click the Pack extension button. A dialog appears.
  4. In the Extension root directory field, specify <path-to-ceno>/ceno/ceno-chrome. Ignore the second field.
  5. Click Package. The packager creates two files: a .crx file, which is the actual extension that can be installed, and a .pem file, which contains the private key.

CENO Freenet plugin

Detailed instructions for building the client can be found here.

Download the following dependencies:

Then you can use ant to generate the CENO.jar plugin.

cd ceno-freenet
ant dist

You may have to modify the ceno-freenet/build.xml file in order to match the location of the dependencies at your local setup. The distributable jar files are located under ceno-freenet/dist. Installing the CENO.jar client plugin in your Freenet node requires that you configure the WebOfTrust and Freemail official plugins. In order to do that follow the steps in this README.

Building the bridge components

The bridge components are meant to be run on a server for the benefit of users of the CENO network.

The bridge components include

  1. A Freenet plugin
  2. A Node.js HTTP server
  3. An RSS/Atom subscription service

We strongly recommend you carefully read the CENO Bridge Installation Instructions, in order to ensure your own safety and the anonymity of your Bridge's users.

Prerequisites

  1. Node.js and NPM
  2. Golang

Node.js and NPM

You can download Node.js and NPM together directly from the official site.

Golang

Go can be compiled and installed by following the instructions on golang.org.

Running the bundle server

The bundle server can be run with the following commands

cd <path-to-ceno>/ceno-bridge
npm install
CENOLANG=<language> npm start

where <language> is to be replaced with a language identifier such as en or fr. The available languages can be found in ceno-bridge/locales/.

CENOBridge Freenet plugin

CENOBridge plugin is built the same way as the CENO client plugin (instructions here).

CENOBridge plugin can be loaded to your Freenet node like any other plugin, by navigating to your node's plugins page (http://127.0.0.1:8888/plugins) and using its path in the "Add an Unofficial Plugin" subsection. You will have to configure the WebOfTrust and Freemail plugins. In order to do that, follow the instructions here.

RSS/Atom Reader

To compile the RSS/Atom reader, run the following

cd <path-to-ceno>/ceno-reader
./build.sh
CENOLANG=<language> ./reader

where <language> is one of the languages available in ceno-reader/translations/, such as en-us.

Instructions for interacting with the reader are available in an API specification.