summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README images/app-diagram.pngbin44230 -> 0 bytes
-rw-r--r--README images/app-diagram.xml2
-rw-r--r--README.md137
3 files changed, 84 insertions, 55 deletions
diff --git a/README images/app-diagram.png b/README images/app-diagram.png
deleted file mode 100644
index 17d634be5e..0000000000
--- a/README images/app-diagram.png
+++ /dev/null
Binary files differ
diff --git a/README images/app-diagram.xml b/README images/app-diagram.xml
deleted file mode 100644
index b8a41198ea..0000000000
--- a/README images/app-diagram.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile type="device" userAgent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8" version="6.3.1" editor="www.draw.io"><diagram name="Page-1">7Vtbc+I2FP41zLQPyViSr4+BwLYzvewku+32UdgC3DUWtUUu/fWVbQksS4BZi2Sz2zxk8NHV5/qdI3mEJuundwXerH6lCclG0EmeRuh2BGHoQv6/Ijw3BM9HDWFZpElDAnvCffovEURHULdpQkqlI6M0Y+lGJcY0z0nMFBouCvqodlvQTF11g5diRWdPuI9xRrRuf6YJWwkq8KN9w08kXa7E0iH0m4Y5jj8vC7rNxXojiBb1X9O8xnIusW65wgl9bJHQdIQmBaWs+bV+mpCsYq1kmxzHnuVeR2i8YuuMPwD+s26eHRgM+gzmL1eQnLWXOzSfHzYjHnC2lRN2V3hcpYzcb3BcPT9ybVGXTHC5Iol4WKRZNqEZLeqhknNoXLKCfiatlhs/dMahccfiHR9IwchTiyTe4B2ha8KKZ95FtHqSp0JXQSieH/eS3/VZtYTuIkHEQtuWu7n3POM/BNsOiAQGg3nYYdtsNoOTiYlts9lt5PuW2OaqbOMUjW1uaGAb8j0LbAP+RVVvMuFcnJl46DiTSc1dCzwE0k8eUT1o4qEV1XOBxsI1KUvu2kqNlSTh/lE80oKt6JLmOJvuqePa6dXsdFQ2k6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vFIJU5eE2XRUyw2E2fMFSZaCX1T7eT++qmtpvH6Z3s5vJtIdc1VApbK4NqQSpv3RNAE493axkK/YEDAI8F4t5UD2hAmGkYzHg6VgMWjn71bOau+ntx0/fB++BqyYSIIIa7z0D60FogfVId2fcoVQsqhhfo5ZLw2R0okD5piKaXi7nf/0LoCbYvLtR8sq42e3iZrHCwVqI2y3uhx3VHIazXb08e89ooWtsucKb6mdVoi/rHmYrP5IQLxbQnBAn/tz3LJ2GdE9ePcfVHIFvyIc9/7Ck+zqCyOCCSbKNSaEjm6HlhTgh83Bu4ibyUYQSS9yEWnnh2oXA8aCPgBeEEla+RLUh0lX1pj4iss/cCvyF4Usz13RZ7GLcBOAixRtRoWld1ThUvHHeWlTqFXukC1BuOlkv2fQXsqvZTE4eD8KSt5xuAZslFODCSHV8o0Hpl90iCYD/m+7LlEgi66ixv+nqpxayArrdJN+c9UKL1ishnzxUgsOMVx7IqgMs1Tv1jwXufv/4oSqffA9pu9dB61Cm0ifQupWKCbpMrVnJy6FyftW5oQC/t8x8l4W/wIWKczNzz+mkOuJjikOZebe/vHdnKzMHSM93dlUlfCDxecshANmslwfdiwUDY4Blr6/D8t1tx4PHm9ZrhsGpW41v2zWdd9ZuQn+9z9qVG+eq3skAd+GyYuey2MnvVLqXy9Q7Xyc+VNFKbJdARkgvpq1x3nyHVfu/hwoKl3FBSH4BsJSRBTsXKg1OR84BTupZE3QNZ03QdNZko3aEIk02MjdZL9f6XapvXhzAU1MO6AQ6jkVWpMEf919CN4a1/9ocTf8D</diagram></mxfile> \ No newline at end of file
diff --git a/README.md b/README.md
index 92b6e40fed..728b6295fc 100644
--- a/README.md
+++ b/README.md
@@ -4,21 +4,55 @@ The back- and frontend for the Mullvad VPN app.
## Status
-There is a [beta release available](https://mullvad.net/en/guides/beta-app/) for macOS.
+There is a beta release for macOS available on
+[our website](https://mullvad.net/en/guides/beta-app/) and on
+[github](https://github.com/mullvad/mullvadvpn-app/releases/).
Support for Linux, Windows, Android and iOS is in the making.
+## Checking out the code
-## Developing
-
-First you need to install all the javascript dependencies by running
-```bash
-yarn install
+This repository contains a submodule, so clone it recursively:
```
-then you can start the program using
-```bash
-yarn run develop
+git clone --recursive https://github.com/mullvad/mullvadvpn-app.git
```
+## Install toolchains and dependencies
+
+1. Get the latest stable Rust toolchain. This is easy with rustup, follow the instructions on
+[rustup.rs](https://rustup.rs/).
+
+1. Get Node.js (version 8 or 9) and the latest version of yarn. On macOS these can be installed via
+homebrew:
+ ```bash
+ brew install node yarn
+ ```
+
+## Building and running the backend (mullvad-daemon)
+
+1. Build the backend without optimizations (debug mode) with:
+ ```
+ cargo build
+ ```
+
+1. Run the backend daemon debug binary with verbose logging to the terminal with:
+ ```
+ sudo ./target/debug/mullvad-daemon -vv
+ ```
+ It must run as root since it it modifies the firewall and sets up virtual network interfaces
+ etc.
+
+## Building and running the frontend (electron app)
+
+1. Install all the JavaScript dependencies by running:
+ ```bash
+ yarn install
+ ```
+
+1. Start the frontend in development mode by running:
+ ```bash
+ yarn run develop
+ ```
+
If you change any javascript file while the development mode is running it will automatically
transpile and reload the file so that the changes are visible almost immediately.
@@ -30,42 +64,47 @@ to run a specific version of the backend you can just start it yourself and the
it and behave accordingly.
-## Packaging
+## Packaging the app
-By running
-```bash
-yarn run pack
-```
-you create installation packages for windows, linux and MacOS. Note that you have to have run
-`yarn install` at least once to download the javascript dependencies.
+1. Follow the [Install toolchains and dependencies](#install-toolchains-and-dependencies) steps
-If you only want to build for a specific OS you run
-```bash
-yarn run pack:OS
-```
-as in `yarn run pack:linux`.
+1. Build the backend in optimized release mode with:
+ ```
+ ./build.sh
+ ```
-The artifact (.dmg, .deb, .msi) version is the `version` property of `package.json`.
+1. Install build dependencies if you are on Linux
+ ```bash
+ sudo apt install icnsutils graphicsmagick
+ ```
-### Build dependencies
+1. Install all JavaScript dependencies (unless you already have) and package the application with:
+ ```bash
+ yarn install
+ yarn run pack
+ ```
+ This will create installation packages for windows, linux and MacOS. Note that you have to have
+ run `yarn install` at least once before this step to download the javascript dependencies.
-#### Linux
+ If you only want to build for a specific OS you run
+ ```bash
+ yarn run pack:OS
+ ```
+ as in `yarn run pack:linux`.
-```bash
-sudo apt install icnsutils graphicsmagick
-```
+ The artifact (.dmg, .deb, .msi) version is the `version` property of `package.json`.
-## Command line tools
+## Command line tools for frontend development
- `$ yarn run develop` - develop app with live-reload enabled
- `$ yarn run flow` - type-check the code
- `$ yarn run lint` - lint code
- `$ yarn run pack` - prepare app for distribution for macOS, Windows, Linux. Use `pack:mac`,
- `pack:win`, `pack:linux` to generate package for single target.
+ `pack:win` or `pack:linux` to generate package for single target.
- `$ yarn run test` - run tests
-## Structure
+## Repository structure
- **app/**
- **redux/** - state management
@@ -74,33 +113,25 @@ sudo apt install icnsutils graphicsmagick
actions/backend.
- **lib/** - shared classes and utilities
- **assets/** - graphical assets and stylesheets
- - **config.js** - static configuration file
+ - **config.json** - links to external components
- **app.js** - entry file for renderer process
- **main.js** - entry file for background process
- **routes.js** - routes configurator
- - **store.js** - redux store configurator
- - **enums.js** - common enums used across components
-- **test/** - tests
-- **scripts/** - support scripts for development
+ - **transitions.js** - transition rules between views
+ - **types.js** - common Flow types used across the app
+- **build.sh** - Builds the backend in release mode. Will be extended to take care of more parts
+ of the release compiling and packaging.
+- **Cargo.toml** - Main Rust workspace definition. See this file for which folders here are backend
+ Rust crates.
+- **client-binaries/** - Git submodule containing binaries shipped with the client. Most notably
+ the OpenVPN binaries.
+- **format.sh** - Script that runs rustfmt to format the Rust code
- **init.js** - entry file for electron, points to compiled **main.js**
-
-## App diagram
-
-![App diagram](README%20images/app-diagram.png)
-
-## View layout
-
-Most of application layouts consist of header bar area and main content area. Three of components
-from `components/Layout` help to assemble each view, i.e:
-
-```
-<Layout>
- <Header />
- <Container>
- { /* content goes here */ }
- </Container>
-</Layout>
-```
+- **mullvad-daemon/** - Main Rust crate building the backend daemon binary
+- **scripts/** - support scripts for development
+- **test/** - frontend tests
+- **uninstall.sh** - Temporary script to help uninstall Mullvad VPN, all settings files, caches and
+ logs.
# License