• Stars
    star
    567
  • Rank 78,634 (Top 2 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Run applications through VPN tunnels with temporary network namespaces

vopono logo

vopono is a tool to run applications through VPN tunnels via temporary network namespaces. This allows you to run only a handful of applications through different VPNs simultaneously, whilst keeping your main connection as normal.

vopono includes built-in killswitches for both Wireguard and OpenVPN.

Currently Mullvad, AzireVPN, MozillaVPN, ProtonVPN, iVPN, NordVPN, AirVPN, HMA (HideMyAss) and PrivateInternetAccess are supported directly, with custom configuration files also supported with the --custom argument.

For custom connections the OpenConnect and OpenFortiVPN protocols are also supported (e.g. for enterprise VPNs). See the vopono User Guide for more details.

Screenshot

Screenshot showing an example with firefox, google-chrome-stable and lynx all running through different VPN connections:

Screenshot

Supported Providers

Provider OpenVPN support Wireguard support
Mullvad βœ… βœ…
AzireVPN βœ… βœ…
iVPN βœ… βœ…
PrivateInternetAccess βœ… βœ…**
ProtonVPN βœ… ❓*
MozillaVPN ❌ βœ…
NordVPN βœ… ❌
HMA (HideMyAss) βœ… ❌
AirVPN βœ… ❌

* For ProtonVPN you can generate and download specific Wireguard config files, and use them as a custom provider config. See the User Guide for details - note that port forwarding is currently not supported for ProtonVPN.

** Port forwarding is not currently supported for PrivateInternetAccess.

Usage

Set up VPN provider configuration files:

$ vopono sync

Note when creating and uploading new Wireguard keypairs there may be a slight delay until they are usable (about 30-60 seconds on Mullvad for example).

Run Firefox through an AzireVPN Wireguard connection to a server in Norway:

$ vopono exec --provider azirevpn --server norway firefox

You should run vopono as your own user (not using sudo) as it will handle privilege escalation where necessary. For more details around running as a systemd service, etc. see the User Guide.

vopono can handle up to 255 separate network namespaces (i.e. different VPN server connections - if your VPN provider allows it). Commands launched with the same server prefix and VPN provider will share the same network namespace.

Default configuration options can be saved in the ~/.config/vopono/config.toml file, for example:

firewall = "NfTables"
provider = "Mullvad"
protocol = "Wireguard"
server = "usa-us22"

Note that the values are case-sensitive.

See the vopono User Guide for much more detailed usage instructions (including handling daemons and servers).

Installation

AUR (Arch Linux)

Install the vopono-git package with your favourite AUR helper.

$ yay -S vopono-git
$ vopono sync

Alternatively use the vopono-bin package if you don't want to compile from source.

Raspberry Pi (Raspbian)

Download and install the vopono_x.y.z_armhf.deb package from the releases page:

$ sudo dpkg -i vopono_0.2.1_armhf.deb

You will need to install OpenVPN (available in the Raspbian repos):

$ sudo apt install openvpn

You can then use vopono as above (note that the Chromium binary is chromium-browser):

$ vopono sync --protocol openvpn mullvad
$ vopono exec --provider mullvad --server sweden chromium-browser

Screenshot of vopono with OpenVPN running on Raspbian:

Raspbian Screenshot

Note Wireguard is not in the Raspbian repositories, so installing it is not trivial. You can follow this guide to attempt it, but note that not only do you need to install Wireguard and wireguard-tools to have wg available, but also the linux-headers to ensure it works correctly (i.e. you don't just get Protocol not supported errors when trying to establish a connection).

Check the User Guide for details on port forwarding and using vopono with daemons and servers, in case you want to use your Raspberry Pi to run privoxy or transmission-daemon, etc.

Debian + Ubuntu

Install the deb package provided on the releases page.

Fedora + OpenSUSE

Install the rpm package provided on the release page (choose the correct version).

Other Linux

Either use the compiled binaries on the release page, or install from source with Cargo as documented below.

From this repository (with Cargo)

Run the install script provided: install.sh - this will cargo install the repository and copy over the configuration files to ~/.config/vopono/

Note the minimum supported Rust version is 1.43. You can check your version with:

$ rustc --version

Known issues

  • When launching a new application in an existing vopono namespace, any modifications to the firewall rules (i.e. forwarding and opening ports) will not be applied (they are only used when creating the namespace).
  • OpenVPN credentials are always stored in plaintext in configuration - may add option to not store credentials, but it seems OpenVPN needs them provided in plaintext.
  • There is no easy way to delete MozillaVPN devices (Wireguard keypairs) - unlike Mullvad this cannot be done on the webpage. I recommend using MozWire to manage this.
  • gnome-terminal will not run in the network namespace due to the client-server model - see issue #48
  • Port forwarding from inside the network namespace to the host (e.g. for running transmission-daemon) does not work correctly when vopono is run as root - see issue #84

License

vopono is licensed under the GPL Version 3.0 (or above), see the LICENSE file or https://www.gnu.org/licenses/gpl-3.0.en.html

Etymology

vopono is the pronunciation of the letters VPN in Esperanto.

Se vi ankaŭ parolas Esperanton, bonvolu serĉi min en la kanalo de Discord de Rust Programming Language Community.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, will be licensed under the GPLv3 (or above), without any additional terms or conditions.

Many thanks to NilIrl's MozWire for the investigation of the MozillaVPN API.

More Repositories

1

data-oriented-example

Example of Data Oriented Design in Rust
Rust
47
star
2

chip8go

A simple CHIP-8 interpreter/emulator in Go
Go
24
star
3

arch-i3-usb

Preset files to create a fully functional, persistent live USB installation of Arch Linux with i3 via ALMA
Vim Script
20
star
4

async-rust-example

Example of async programming in Rust
Rust
18
star
5

s3rename

Tool to mass-rename S3 keys
Rust
17
star
6

rust-lambda-test

Toy example of Rust program for deployment in AWS Lambda
Rust
15
star
7

rust-interview-qs

Practice interview problems solved in Rust
Rust
12
star
8

Doping-Effects-in-Graphene

Theoretical modelling of doping effects and magnetic field effects on the quantum transport in Graphene.
Fortran
12
star
9

micro_lambda

Small tutorial example of an AWS Lambda custom runtime in Rust
Rust
10
star
10

rust_ses_example

Example ingestion process using AWS SES and Lambda
Rust
9
star
11

raytracer_challenge_scala

Raytracer challenge book project implemented in Scala
Scala
5
star
12

WWF-solver

A solver for Words With Friends, to be written in OOP Python
Python
4
star
13

basic_tcp_proxy

Basic TCP proxy crate in Rust
Rust
4
star
14

jamesmcm.github.io

Jupyter Notebook
3
star
15

git-test---k-r-c-exercises

Testing Git setup, using K&R C exercises
C
2
star
16

w4tron

Small tron game in wasm4
Rust
2
star
17

joust.rs

A simple Joust-like game written in Rust and WebAssembly
Rust
2
star
18

scala-sudoku-solver

Simple 9x9 Sudoku solver in Scala
Scala
2
star
19

sdfm

sdfm - Simple Dotfile Manager in Rust
Rust
2
star
20

aoc2019_rust

Advent of Code 2019 in Rust
Rust
2
star
21

esp32_wifi_tank

A Wifi-controlled tank/rover built with an ESP32 control board and Rust
Rust
2
star
22

coursera-problems

Coursera solutions for ML problems, etc.
MATLAB
1
star
23

Iron-Concentration-Plotter

Plots the Iron Concetration from QSSPC and PL data
Python
1
star
24

libvopono

Backend crate for vopono.
Rust
1
star
25

StimScripts

Repository of scripts for porting stimuli to psychopy
Python
1
star
26

rabbitmq-test

Test of small pipeline with RabbitMQ
Python
1
star
27

cargo-deb-aarch64-debian

Docker image to build aarch64 / armv8 deb file with Github action
Shell
1
star