a simple command line tool to get RiseupVPN up and running
Project description
riseup-vpn-configurator
Riseup offers Personal VPN service for censorship circumvention, location anonymization and traffic encryption. To make this possible, it sends all your internet traffic through an encrypted connection to riseup.net, where it then goes out onto the public internet.
Unlike most other VPN providers, Riseup does not log your IP address.
Riseup has a VPN client called RiseupVPN. This VPN client is super easy to use! You just install it and run it—no configuration, no account registration.
There is already a riseup-vpn package in AUR. But there a few things I don't like:
- the software is pretty bloated (unnecessary GUI, I got
could not find polkit agent
error messages) - the autostart feature just put's a file into
~/.config/autostart
which doesn't work with i3 - the VPN does not use the best available crypto/ciphers (TLS1.2 instead of TLS1.3)
- it's not possible to exclude routes from the VPN
The riseup-vpn-configurator is a simple command line tool that tries to solve these problems. It generates an OpenVPN configuration file that can be used by systemctl
.
Installation
Please don't install it as user and run it as root, as this makes it very easy for an attacker to escalate privileges. You can install the Arch Linux AUR package or use it with pip install --user riseup-vpn-configurator
as root. Check out the How to use it
below to get the VPN up and running. You can start RiseupVPN with systemctl start openvpn-client@riseup
and autostart it with systemctl enable openvpn-client@riseup
. Please keep in mind that the client certificate is only valid for 90 and you have to update it manually.
kmille@linbox:~ riseup-vpn-configurator --help
usage: riseup-vpn-configurator [-h] [-v] [-d] [-u] [--uninstall] [-l] [-b] [-c] [-g] [-s] [--version]
options:
-h, --help show this help message and exit
-v, --verbose show verbose output
-d, --default-config print default config file risup-vpn.yaml
-u, --update update gateway list and client certificate/key
--uninstall remove all files
-l, --list-gateways show available VPN server
-b, --benchmark use with --list - pings the gateway and shows the latency
-c, --check-config check syntax of /etc/riseup-vpn.yaml. Generates default config
-g, --generate-config
Generate openvpn config (/etc/openvpn/client/riseup.conf)
-s, --status show current state of riseup-vpn
--version show version
Default config file /etc/riseup-vpn.yaml
---
# /etc/riseup-vpn.yaml
server: vpn07-par.riseup.net
protocol: udp
port: 53
# your local subnet is excluded by default
excluded_routes:
- 1.1.1.1
- 192.168.123.0/24
How to use it
Installation (as a dev)
We need to run the tool with root permissions (for example to write to /etc). Running the tests also need root privileges (because we use chown). Therefore, I recommend running the dev environment also as root user.
root@linbox:tmp git clone https://github.com/kmille/riseup-vpn-configurator.git
root@linbox:tmp cd riseup-vpn-configurator
root@linbox:riseup-vpn-configurator poetry install
poetry run python riseup_vpn_configurator/__init__.py --help
root@linbox:riseup-vpn-configurator poetry run pytest -v -s -x --pdb
root@linbox:riseup-vpn-configurator poetry run flake8 --ignore=E501 riseup_vpn_configurator/
root@linbox:riseup-vpn-configurator poetry run mypy riseup_vpn_configurator/
How it works
The code for the RiseupVPN Linux client can be found here. It uses OpenVPN. Everyone uses the same client certificate/key to authenticate. The client certificate is only valid for 90 days. The VPN gateway list and client certificate can be fetched by a public API.
Monitoring with py3status
If you use py3status as i3bar implementation, you can use monitor_riseupvpn.py for monitoring.
Known issues
RiseupVPN does not support IPv6. It's routed over the tunnel but then gets blocked. Also, the VPN hangs after suspend (see Arch Wiki). To solve this issue, the AUR package uses openvpn-reconnect as a dependency.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for riseup_vpn_configurator-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c9b0860c4d9579420accacda9f82c7379d0a0bbe130e4c876142e0f0aeee68 |
|
MD5 | ab1b84857d69c7564805930637a966b7 |
|
BLAKE2b-256 | e8be4ca11c036a81f610e97b30d7f44e3737c24dd378a7c704a18256ed2f96cf |
Hashes for riseup_vpn_configurator-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7afe31ed028f2a98e839aa090c65543dd67d271c6ba8342af623d86a280c3523 |
|
MD5 | 11f1e6bd6e432e0d90d42b0f640e281e |
|
BLAKE2b-256 | 70b2c0806ac75e33bcd5af6ae5f4abb461a36ad30444f305c87c5e30882727ed |