Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • m1ghtfr3e/bitmask-vpn
  • leap/bitmask-vpn
  • meskio/bitmask-vpn
  • kali/bitmask-vpn
  • nsheep/bitmask-vpn
  • nilesh/bitmask-vpn
  • micah/bitmask-vpn
  • kwadronaut/bitmask-vpn
  • th/bitmask-vpn
  • wxl/bitmask-vpn
  • Nowa-Ammerlaan/bitmask-vpn
  • elijah/bitmask-vpn
  • happysalada/bitmask-vpn
  • JUZZZEE/bitmask-vpn
  • jkito/bitmask-vpn
  • panetone/bitmask-vpn
  • hsilva/bitmask-vpn
  • S0b0tkaZ11gy/bitmask-vpn
  • polster/bitmask-vpn-pahoeohe
  • Kulibin/bitmask-vpn
  • TheMimoGz/bitmask-vpn
  • fifi/bitmask-vpn
  • fly/bitmask-vpn
  • VlKozlove/bitmask-vpn
  • DonMephedrone/bitmask-vpn
  • Arti/bitmask-vpn
  • annxxxxx/bitmask-vpn
  • Arti/arti-bitmask-vpn-fork
  • peanut2/bitmask-vpn
29 results
Show changes
Showing
with 520 additions and 267 deletions
ppa howto
=========
* Add changes to changelog (bump native dot-version, change release)
* Upload changes file
.. code:: bash
debuild -i -S
dput --force ppa:kalikaneko/ppa ../riseup-vpn_0.21.2.2_source.changes
Using kali's ppa
----------------
.. code:: bash
sudo gpg --homedir=/tmp --no-default-keyring --keyring /usr/share/keyrings/kali-ppa-archive-keyring.gpg --keyserver keyserver.ubuntu.com --recv-keys 0xbe23fb4a0e9db36ecb9ab8be23638bf72c593bc1
sudo add-apt-repository ppa:kalikaneko/ppa
sudo apt update
sudo apt install riseup-vpn
git integration
===============
All seems to be more smooth with the "new" (ahem) github integration (once things *are* working).
Some tips:
- We've got different repos. `riseup-vpn-snap` is the *snap* repo. Import code from upstream, just merge it with `-X theirs`
- If the snap doesn't change, just use `make bump_snap` for upgrading the version from git (TODO we could write this also into the hardcoded version).
- Otherwise, just do `make vendor` and import the snapcraft.yaml generated from the template.
local builds
------------
multipass is the recommended way, but canonical does use lxd so at times some paths etc change.
For your own sanity:
- get a zfs pool on a fast device, and get yourself acquainted with lxd to use that pool.
- don't get too frustrated with networking + lxd. restarting any iptables in your host (if using bridges) usually helps.
- you can use `make local_snap` to use your local lxd infra. it launches with
`--debug`, so you'll be dropped into a local shell to see what the fuck the
manual build of Qt is complaining about.
existential helpline
--------------------
* don't despair. we've all been there.
* snapcraft forum is useful.
* all tech is crap: don't think that you'll be happy reimplementing the whole
app in electron or whatnot. just don't. enjoy life while you can.
* https://forum.snapcraft.io/t/the-sorry-state-of-snapping-qt5-apps/22809
* https://github.com/mozilla-mobile/mozilla-vpn-client/blob/main/scripts/qt5_compile.sh
if you have some time
---------------------
* look into a `clang` build. qt builds fine, but last time I tried there was
some incompatible version (?) that didn't let the qmake build finish.
launchpad
=========
In launchpad, you need to configure a git source for your project, and define a snap recipe for that source.
Be warned that launchpad does an automatic import every 6 hours.
If you need to do manual builds, you first need to trigger an import. Look for the "import now" button in your source page:
https://code.launchpad.net/~leapsnaps/riseupvpn/+git/riseup_vpn
Then you can trigger a manual build:
https://code.launchpad.net/~leapsnaps/+snap/riseup-vpn/+request-builds
......@@ -2,25 +2,33 @@ windows build
=============
The build currently expects MINGW64 environment, on a native windows host.
A cross-compiling procedure (at least for the application binaries) should be possible in the near future, using mxe. (There's already some support for it in `gui/build.sh`).
You should instal: make, wget, as well as a recent Qt5 version (for instance, with chocolatey: choco install make && choco install wget).
You should instal: make, wget, as well as a recent Qt6 version (for instance, with chocolatey: choco install make && choco install wget).
For installing Qt6 use the [`aqt`](https://github.com/miurahr/aqtinstall) tool to install a portable version of Qt.
(In order to avoid makefiles, you are welcome to submit a port of the build scripts using powershell or cscript - see the build.wsf script in openvpn-build for inspiration).
It's recommended to use bash for windows for compatibility (the version that is distributed with git works well so far). In order to avoid makefiles, you are welcome to submit a port of the build scripts using powershell or cscript - see the build.wsf script in openvpn-build for inspiration.
For the installer, install QtIFW for windows (tested with version 3.2.2).
Assuming you have the vendor path in place and correctly configured, all you need to do is `make installer`::
It is useful to source a file with all the needed environment variables::
cat ../build-env
export PATH="/c/Qt/Qt5/bin/":"/c/Qt/QtIFW-3.2.2/bin":$PATH
export WINCERTPASS=certificatepass
export VENDOR_PATH=providers
export PROVIDER=riseup
make generate # FIXME this is not called in win
make vendor && make installer
If you're doing a final release::
export RELEASE=yes
Assuming you have the vendor path in place and correctly configured, all you need to do is `make installer`::
source ../build-env
make vendor
make build
make installer
checking signatures
......@@ -40,7 +48,9 @@ ask again.
adding metadata to binaries
---------------------------
the steps to do release signatures are::
If you're doing a final release::
export RELEASE=yes
make build
make dosign
......@@ -51,6 +61,9 @@ or all together as::
make package_win_release
Please make sure to cleanup the build/ and lib/ dirs if you're building for more than
one vendor.
Uploading installer
-------------------
......
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'bitmask-vpn'
copyright = '2019, LEAP Encryption Access Project'
author = 'LEAP Encryption Access Project'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.19.7'
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'bitmask-vpndoc'
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'bitmask-vpn.tex', 'bitmask-vpn Documentation',
'LEAP Encryption Access Project', 'manual'),
]
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'bitmask-vpn', 'bitmask-vpn Documentation',
[author], 1)
]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'bitmask-vpn', 'bitmask-vpn Documentation',
author, 'bitmask-vpn', 'One line description of project.',
'Miscellaneous'),
]
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# I have time, how can I help?
## Packaging
* Look into `AppImage` + https://github.com/probonopd/linuxdeployqt.
We've not considered that option too much in the past, but it might give us
a decent, self-contained alternative to snap etc.
## Linux
* Revamp vpn helper architecture: there're problems, of course, but we can try
to isolate the client gui from the vpn helper itself (and "ship it" as
a binary under the single bundle, as I do now with bitmak-root). An idea
that's been floating around for a long time is to recycle the helper
interface, and have a long-lived privileged helper that does the vpn
connection using openvpn3 libr.
elijah was initially supporting a short-lived helper (what we have right now
with bitmask-root), but perhaps the integration can be done right with pkexec
or otherwise (separate users in linux etc). This has the additional advantage
of allowing us to do a very early startup, and not to depend so much on
pkexec + ubuntu's quirks (portability!).
# Other discrete projects
* Secure, automated upgrade mechanism (look at TUF and the Qt Updater Framework).
* Log viewer / log sender
* VPN Traffic panel (statistics, ip, gw health, graph for upload/download speeds)
* Migrate codebase to Qt6
* Reduce the size of custom static builds
* Apple + Windows stores
* Convert snap to use a qt5 base (so that updates are kept small).
* Provider-agnostic bitmask.
* Private bridges mechanism.
* QR-bootstrap
......@@ -58,6 +58,18 @@ Make sure that "pgrep bitmask-helper" does not return any pid.
Now you can move /Applications/RiseupVPN.app to the Trash, and launch a
recent installer to get a clean install.
Firewall
~~~~~~~~
In the unfortunate event that a crash lets you with a non-usable connection, you can restore the firewall by hand:
.. code:: bash
# if you see drop ... <bitmask_gateways>, the fw is on
sudo pfctl -a com.apple/250.BitmaskFirewall -sr
# clean it up!
sudo pfctl -a com.apple/250.BitmaskFirewall -F all
Windows
-------
In Windows you can use PowerShell to see if there's an old service Running (it
......@@ -73,3 +85,35 @@ You can also stop it (needs admin)
PS C:\Users\admin> Stop-Service bitmask-helper-v2
To force logging:
.. code:: bash
QT_FORCE_STDERR_LOGGING=1 ./riseup-vpn.exe
We should probably restrict this to non-release versions only.
Environment Variables
~~~~~~~~~~~~~~~~~~~~~
The envs are only used for debugging and developing. The envs affecting the logging behavior are documented in the logging section in the `README <https://0xacab.org/leap/bitmask-vpn/-/blob/main/README.md?ref_type=heads#logging>`_.
- ``SKIP_VERSION_CHECK``: Do not check if there is an update available
- ``LEAP_DRYRUN``: Don't route traffic over VPN (run openvpn with "--pull-filter ignore route" argument) and do not touch firewall rules
- ``MOTD_URL``: Overwrite the MOTD (message of the day) url
- ``SNAP``: If not empty, we expect to be in a Snap environment (client was installed by Snap)
- ``UDP``: If we use UDP, UDP is set to 1. If we use TCP, UDP is set to 0. The value is read by the bitmask-root helper which sets firewall rules on Linux
- ``LEAP_PROVIDER``: Select the provider to use. Must be one of the providers listed in ``gui/providers/providers.json``. File is generated by the Makefile which runs ``./branding/scripts/gen-providers-json``
obfs4
~~~~~
- ``LEAP_PRIVATE_BRIDGE_CERT``: Specify the cert string for the obfs4 bridge to be used
- ``LEAP_PRIVATE_BRIDGE``: Specify the host:port for the obfs4 bridge to be used
Only implemented in v3/vpnweb:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ``LEAP_GW``: Specify the gateway hostname to connect with. It needs to be one of the gateway returned by vpnweb
- ``LEAP_OPENVPN_EXTRA_CONFIG``: Specify a file with extra OpenVPN arguments to use. File should be in json format (in key value format like {"--dev": "tun"} or {"--persist-key": true})
- ``LEAP_KCP``: Enforce the use of KCP in obfsvpn
# QML
* https://github.com/Furkanzmc/QML-Coding-Guide/blob/master/README.md
......@@ -4,3 +4,9 @@ QML best practices
* lint your qml files::
make qmllint
Debugging
---------
In windows you need to add some flags to obtain QML debug:
QT_FORCE_STDERR_LOGGING=1 QT_LOGGING_DEBUG=1 ./riseup-vpn.exe
# headless mode
As a wise person once said, "you don't want to struggle with Qt every day".
## backend
There's a barebones binary that launches the same backend that the qt5 client uses.
You will need a `providers.json` file containing the parameters for you own deployment. This is usually generated during the vendoring step, but you can manually edit the one for riseup:
```
go build ./cmd/bitmaskd
```
You might need to install the helpers (bitmask-root, polkit policies etc...). Do it manually, or use the embedded files (It will ask for sudo).
```
./bitmaskd -i
```
With the polkit files in place, you can now run bitmask backend in the foreground:
```
./bitmaskd -d gui/providers/providers.json
```
TODO: make it a proper daemon, logging etc.
If you find problems while running (like polkit asking for password every time), you probably need to debug your polkit installation. Every system has its quirks, and bitmask has mostly been tested in debian-based desktops. For arch, you might need to add your user to group wheel.
## firewall
While testing, you are likely to get the iptables firewall leaving you with blocked outgoing connections. You can control `bitmask-root` manually:
```
sudo /usr/sbin/bitmask-root help
sudo /usr/sbin/bitmask-root firewall stop
```
## cli
There's no cli at the moment, but you can use the web api. To authenticate, you need to pass a token that is writen to a temporary file when the backend is initialized:
```
curl -H "X-Auth-Token:`cat /tmp/bitmask-token`" http://localhost:8000/vpn/status
curl -H "X-Auth-Token:`cat /tmp/bitmask-token`" http://localhost:8000/vpn/start
curl -H "X-Auth-Token:`cat /tmp/bitmask-token`" http://localhost:8000/vpn/stop
```
......@@ -3,7 +3,7 @@ Howto i18n
The translations are done in transifex. To help us contribute your translations there and/or review the existing
ones:
https://www.transifex.com/otf/bitmask/bitmask-vpn/
https://www.transifex.com/otf/bitmask/bitmask-desktop/
When a string has being modified you need to regenerate the locales:
```
......@@ -11,9 +11,29 @@ When a string has being modified you need to regenerate the locales:
```
To fetch the translations from transifex (API\_TOKEN is the transifex API token):
To fetch the translations from transifex you need to use the Transifex cli:
https://developers.transifex.com/docs/cli and an api (API\_TOKEN is the transifex API
token)
```
API_TOKEN='xxxxxxxxxxx' make locales
API_TOKEN='xxxxxxxxxxx' tx pull
```
If you want to add a new language create an empty file `gui/i18n/main_$lang.ts` before running `make locales`.
If you want to add a new language you can:
```
API_TOKEN='xxxxxxxxxxx' tx pull -a
```
Sometimes language codes are not what you expect. This applies for missing languages as
well. When you check in transifex, you can also see what is used there, for example fa_IR
or es_AR, es or es_CU. When you want to use some language in general instead of some
regional version you can use the mapping in the .tx/config. Examples: fa_IR maps to fa.
For this project we expect files to be like main_es_AR.ts or main_pl.ts See
https://doc.qt.io/QtForMCUs-2.5/qtul-cmake-getting-started.html
Testing the translations
------------------------
Pass the language env vars:
LANG=es_ES LANGUAGE=es_ES make run
How to create VMs for building and testing
============================================================
For Debian and Ubuntu, we want to support the two latest LTS (long term support) releases. For each release, we need to build packages for each distro.
Release overview
- https://www.debian.org/releases/
- https://www.releases.ubuntu.com/
Download and setup VMs
-------------------------
To get VMs, you can use:
- quickemu https://github.com/quickemu-project/quickemu
- create Virtualbox VMs by hand
- vagrant
.. code:: bash
mkdir -p ~/leap/vms & cd ~/leap/vms
quickget xubuntu 24.04
quickget xubuntu 22.04
quickget debian 12.5.0 xfce
quickget debian 11.9.0 xfce
# start vm and install OS (with --display spice you have a shared clipboard)
quickemu --vm xubuntu-24.04.conf --display spice
Install tools & dependencies
---------------------------------
.. code:: bash
# install base
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y firefox featherpad tmux vim git make fd-find ripgrep magic-wormhole
# install make deps (check branding/templates/debian/control-template)
sudo apt install golang make pkg-config g++ git libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev libqt6qml6 qt6-declarative-dev dh-golang libgl-dev qt6-5compat-dev qt6-declarative-dev-tools qt6-l10n-tools
# install deps (check branding/templates/debian/control-template)
sudo apt install libqt6core6 libqt6gui6 libqt6qml6 libqt6widgets6 libstdc++6 libqt6svg6 qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-dialogs qml6-module-qtquick-layouts qml6-module-qtqml-workerscript qml6-module-qtquick-templates qml6-module-qt-labs-settings qml6-module-qtquick-window qml6-module-qt-labs-platform qml6-module-qtcore qml6-module-qt5compat-graphicaleffects openvpn policykit-1-gnome
sudo ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease
If go < 1.20 (Debian 12)
---------------------------------
The go package of Debian 12 is too old (< 1.20). Please install the `golang-go` package of `bookworm-backports`.
- https://backports.debian.org/Instructions/
- https://packages.debian.org/bookworm-backports/golang/golang
Build desktop client
---------------------------------
You can override the version with env VERSION= (required for all targets)
.. code:: bash
git clone https://0xacab.org/leap/bitmask-vpn.git
cd bitmask-vpn
sudo make depends
PROVIDER=bitmask make vendor
QMAKE=qmake6 make build
# install helper on Linux (only for manual testing, gets installed by the pckage)
build/qt/release/bitmask-vpn --install-helpers
Build deb package
---------------------------------
.. code:: bash
# create debian package (you can also set the version with VERSION=)
make package_deb
sudo dpkg -i deploy/bitmask-vpn_0.24.5-66-gd52c528_amd64.deb
# Release procedure
## Prepare source code repo for release
1. Generate the changelog and update the `CHANGELOG` file
```
$ git log --format="- %s" <last_release_tag>..HEAD
```
2. Open a Merge request with the above change
3. Create an annotated tag for the release version, the version for the app is taken from the o/p of `git desribe`
```
# tag should point to the commit that updated the CHANGELOG file
$ git tag -a 0.24.8 HEAD
```
## Build Installers for Windows and MacOS
### Steps to build the windows installer (needs Windows 10 or higher):
1. Generate the installer `.exe` file
```
$ make vendor # make sure to set the PROVIDER env variable to the correct provider
$ make build
$ make installer
```
2. Sign the installer:
```
PS> signtool sign /f .\leap.pfx /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /p <password_for_cert> <path_to_installer.exe>
```
### Steps to build the MacOS installer (needs MacOS 12 or higher):
1. Generate the installer `.app` file
```
$ make vendor # make sure to set the PROVIDER env variable to the correct provider
$ make build
$ make installer
```
2.Sign the MacOS installer:
```
$ export CODESIGN_IDENTITY=<codesign_id>
$ codesign --sign "${CODESIGN_IDENTITY}" --options runtime --timestamp --force <path_to_installer.app/Content/MacOS/installer_executable>
```
3. Create DMG to upload for Apple notarization
```
$ mkdir -p build/installer/out && cp -R build/installer/<installer.app> build/installer/out
$ cd build/installer
$ hdiutil create -volname <installer_name> -srcfolder out -ov -format UDZO <output_dmg_name.dmg>
```
4. Upload DMG for notarization
```
$ export APP_PASSWORD=<app_password>
$ xcrun notarytool submit --verbose --apple-id=<appleid> --team-id=<teamid> --password ${APP_PASSWORD} --wait --timeout 30m <path_to_dmg>
# To get logs or the notarization response for debugging
$ xcrun notarytool logs <notarization_id> --apple-id=<appleid> --team-id=<teamid> --password ${APP_PASSWORD}
```
>**IMPORTANT:** Upload builds, renew the *-latest* symlinks and their `lastver` files
>**NOTE:** Update packages for Ubuntu in the [leapcodes PPA](./build-ppa.md)
Release procedure
=====================
1. Bump the static release file in `pkg/version`. After a release, this should read something like `0.21.2+git`. This file is used to generate version strings from tarballs.
2. Tag the release
3. Build the latest builder image:
```
make builder_image
```
3. Build the snap package:
With everything ready on the docker image, this one should be built "in a snap"
(badum-tsss).
```
make package_snap_in_docker
```
4. Build the windows installer:
(TBD)
5. Build the OSX package:
(TBD)
6. Build the debian package:
(TBD)
docs/screenshots/about.png

56.5 KiB

docs/screenshots/locations.png

28.7 KiB

docs/screenshots/preferences.png

47.3 KiB

# Git
- Sign all commits and releases
- Do *not* include merge commits. Rebase your MRs always on top of master
before merging - we want a lineal history.
- Use the [tags] on commit messages.
- When possible, reference the issues this is Closing or Related to.
# How to uninstall Desktop LEAP VPN
*Applies to RiseupVPN, CalyxVPN, and Bitmask.*
**For the time being, it's important that you follow this instructions and uninstall manually: if
you remove the app by some other means, it's likely that you will end up with a broken network**.
## Windows
1. Turn VPN OFF, close the app.
2. Open the folder where the application is installed (Usually `C:\Program Files (x64)\RiseupVPN\`).
3. Click on `uninstall.exe`
## OSX
1. Turn VPN OFF, close the app.
2. Open the folder where the application is installed (Usually `/Applications/RiseupVPN/`).
3. Click on `uninstall.app`
## Linux
Check your package manager.
This diff is collapsed.