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
Commits on Source (653)
Showing with 1352 additions and 175 deletions
/pkg/config/version/version.go export-subst
name: 'mac and windows nightly build'
# **What it does**: Generate unsigned macOS app and installer artifacts.
# **Why we have it**: To build nightlies.
# **Who does it impact**: Release/test.
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
provider_name:
description: 'The name of the providers branding that needs to be applied to the GUI app'
required: true
default: 'riseup'
type: choice
options:
- riseup
- calyx
- floatdemo
- demolib
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 1 * * *'
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build-win:
defaults:
run:
shell: C:\msys64\usr\bin\bash.exe -e -o pipefail {0}
runs-on:
- windows-2019
steps:
- name: Setup Golang 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install build dependencies from chocolatey
run: choco install sigcheck aqt wget curl
- run: choco install qt-installer-framework --version 4.7.0
- run: git config --global core.autocrlf input
- name: Checkout
uses: actions/checkout@v4
- name: Install Qt6 SDK using aqt
run: cd $USERPROFILE && aqt install-qt windows desktop 6.6.2 win64_mingw
- name: Build app
env:
PROVIDER: riseup
run: |
export PATH=$(cygpath $USERPROFILE/6.6.2/mingw_64/bin):$(cygpath $SYSTEMDRIVE/Qt/QtIFW-4.7.0/bin):$PATH
export PATH=$(cygpath $SYSTEMDRIVE/msys64/mingw64/bin):$(cygpath $SYSTEMDRIVE/msys64/usr/bin):$PATH
make vendor
make build
make installer
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Upload build/qt/release/riseup-vpn.exe
uses: actions/upload-artifact@v4
with:
name: riseup-vpn-exe-${{ github.sha }}
path: build/qt/release/riseup-vpn.exe
- name: Upload build/installer/RiseupVPN-installer-*.exe
uses: actions/upload-artifact@v4
with:
name: riseup-vpn-installer-${{ github.sha }}
path: build/installer/*.exe
build-mac:
strategy:
matrix:
os:
- macOS-13
- macOS-12
# - macOS-14 is broken becuase of missing openvpn build
runs-on:
- ${{ matrix.os }}
steps:
- name: Setup Golang 1.22
uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: go version
- name: Install build dependencies from brew
run: brew install make create-dmg
- name: Install aqt installer
run: pipx install aqtinstall
- name: Setup Qt6 using aqt
run: aqt install-qt mac desktop 6.6.2 clang_64 -O ~/Qt6
- name: Install Qt installer framework
run: >
cd /tmp &&
curl -LO https://download.qt.io/official_releases/qt-installer-framework/4.7.0/QtInstallerFramework-macOS-x64-4.7.0.dmg &&
hdiutil attach QtInstallerFramework-macOS-x64-4.7.0.dmg &&
cd /Volumes/QtInstallerFramework-macOS-x64-4.7.0/QtInstallerFramework-macOS-x64-4.7.0.app/Contents/MacOS &&
./QtInstallerFramework-macOS-x64-4.7.0 in --da -c --al
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Build macOS installer
run: |
export PATH=~/Qt6/6.6.2/macos/bin:~/Qt/QtIFW-4.7.0/bin:$PATH
export PROVIDER=riseup
make vendor
make build
make installer
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: Upload build/qt/release/riseup-vpn.app
uses: actions/upload-artifact@v4
with:
name: riseup-vpn-app-${{ github.sha }}-${{ matrix.os }}
path: build/installer/*.app
......@@ -3,6 +3,7 @@ __pycache__
build
dist
deploy
staging_dir
/bitmask-vpn
cmd/bitmask-vpn/bitmask-vpn
/bitmask-helper
......@@ -10,6 +11,7 @@ cmd/bitmask-helper/bitmask-helper
/bitmask-connect
cmd/bitmask-connect/bitmask-connect
gui/i18n/*.qm
gui/providers/providers.json
/snap
locales/*/out.gotext.json
......@@ -20,5 +22,17 @@ lib/*
qtbuild/*
providers/assets
debian/files
.*.swp
*.exe
# IDE
.idea
.vs
# Arch Linux package
ArchLinux/src
ArchLinux/pkg
ArchLinux/bitmask-vpn
ArchLinux/*.tar.zst
---
stages:
- lint
- build
- push
- trigger
- vendor
- package
build_test:
image: registry.0xacab.org/leap/bitmask-vpn:latest
image: registry.0xacab.org/jkito/bitmask-vpn:latest
stage: build
script:
- make generate
- make test
- patch -p1 < docker/*.patch
# TODO missing xcb package in the docker image. investigate what to install to run minimal tests.
# - make test_ui
- make build
- PROVIDER=bitmask && make vendor && make build
tags:
- linux
artifacts:
paths:
- 'qtbuild/release/riseup-vpn'
expire_in: 1 month
- 'build/qt/release'
expire_in: 1 week
# branded_push:
# image: registry.0xacab.org/leap/bitmask-vpn:latest
# stage: push
# only:
# - master
# script:
# # install the command-line openssh client to manage private keys
# - apt install -y openssh-client
# # activate the ssh-agent
# - eval $(ssh-agent -s)
# # load the private key, which is accessed vi a gitlab CI secret environment variable
# # We're using tr to fix line endings which makes ed25519 keys work
# # without extra base64 encoding.
# - ssh-add <(echo "$RISEUP_VPN_PACKAGE_SSH_KEY")
# - mkdir -p ~/.ssh
# # ensure that ssh will trust a new host, instead of asking
# - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
# # we also need to configure name and email for git user
# - git config user.name "Gitlab CI"
# - git config user.email "gitlabci@0xacab.org"
# # Add the remote repository and push to it - sometimes it already exists, and it causes the pipeline to fail, so we only add if its not already there
# - git remote -v |grep -q riseup-vpn || git remote add riseup-vpn git@0xacab.org:leap/riseup-vpn_package.git
# - git push --force riseup-vpn HEAD:incoming
lint:
image: golangci/golangci-lint:v1.59-alpine
stage: build
script:
- golangci-lint run --timeout=5m
tags:
- linux
build_macos:
stage: build
script:
- export PROVIDER=riseup
- make vendor
- make -j4 build
- make installer
tags:
- macos
artifacts:
paths:
- 'build/installer/*.app'
expire_in: 1 week
build_Arch_Linux_package:
image: archlinux
stage: package
before_script:
- "pacman -Suy base-devel --noconfirm"
- "useradd non_root"
- "echo 'non_root ALL=NOPASSWD: ALL' >> /etc/sudoers"
- "mkdir -p /home/non_root/build"
- "cp -r . /home/non_root/build"
- "chown -R non_root:non_root /home/non_root"
script:
# makepkg does not run as root, but it needs sudo to install dependencies
- "cd /home/non_root/build && sudo -u non_root make package_arch"
- "cd /home/non_root/build && pacman -U ArchLinux/*tar.zst --noconfirm"
# artifacts must be relative to the working directory (e.g. /builds/leap/bitmask-vpn)
- "cp /home/non_root/build/ArchLinux/*.tar.zst $CI_PROJECT_DIR"
artifacts:
paths:
- '*.tar.zst'
expire_in: 1 week
tags:
- linux
build_debian12_package:
stage: package
# we use backports because we need go1.22
image: debian:bookworm-backports
before_script:
- "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y make sudo"
- "make depends"
- "DEBIAN_FRONTEND=noninteractive apt-get install -y -q golang-1.22"
- "update-alternatives --install /usr/bin/go go /usr/lib/go-1.22/bin/go 0"
- 'ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease'
script:
- "PROVIDER=bitmask make vendor"
- "PROVIDER=bitmask QMAKE=qmake6 make package_deb"
- "make clean"
- "PROVIDER=riseup make vendor"
- "PROVIDER=riseup QMAKE=qmake6 make package_deb"
after_script:
- "mv deploy/*.deb build/riseup/build"
artifacts:
paths:
- "build/riseup/build/"
expire_in: 1 week
tags:
- linux
# trigger_deb:
# image: registry.0xacab.org/leap/buster_amd64:latest
# stage: trigger
# script:
# - echo "Triggering CI pipeline on https://0xacab.org/leap/riseup-vpn_package/pipelines"
# - "curl -X POST -F token=$RISEUP_VPN_DEB_TRIGGER_TOKEN -F ref=master https://0xacab.org/api/v4/projects/1916/trigger/pipeline"
build_ubuntu22_package:
stage: package
image: ubuntu:22.04
before_script:
- "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y software-properties-common make sudo"
- "add-apt-repository ppa:longsleep/golang-backports -y"
- "DEBIAN_FRONTEND=noninteractive apt-get install -y -q golang-go"
- "make depends"
- 'ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease'
script:
- "PROVIDER=bitmask make vendor"
- "PROVIDER=bitmask QMAKE=qmake6 make package_deb"
- "make clean"
- "PROVIDER=riseup make vendor"
- "PROVIDER=riseup QMAKE=qmake6 make package_deb"
after_script:
- "mv deploy/*.deb build/riseup/build"
artifacts:
paths:
- "build/riseup/build/"
expire_in: 1 week
tags:
- linux
vendorize:
image: registry.0xacab.org/leap/bitmask-vpn:latest
stage: vendor
build_ubuntu24_package:
stage: package
image: ubuntu:24.04
before_script:
- "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y make sudo"
- "make depends"
- 'ln -s $(qmake6 -query "QT_INSTALL_BINS")/lrelease /usr/local/bin/lrelease'
script:
#- 'PROVIDERS="riseup calyx" make build_all_providers'
- 'PROVIDERS="riseup" make build_all_providers'
- "PROVIDER=bitmask make vendor"
- "PROVIDER=bitmask QMAKE=qmake6 make package_deb"
- "make clean"
- "PROVIDER=riseup make vendor"
- "PROVIDER=riseup QMAKE=qmake6 make package_deb"
after_script:
- "mv deploy/*.deb build/riseup/build"
artifacts:
name: installers-$CI_COMMIT_REF_NAME
paths:
- 'deploy/*.snap'
# - 'deploy/RiseupVPN-*.exe'
# - 'deploy/RiseupVPN-*.pkg'
# - 'deploy/riseup-vpn_*.deb'
# - 'deploy/CalyxVPN-*.exe'
# - 'deploy/CalyxVPN-*.pkg'
# - 'deploy/calyx-vpn_*.deb'
expire_in: 1 month
- "build/riseup/build/"
expire_in: 1 week
tags:
- linux
issues:
exclude-use-default: true
exclude-dirs-use-default: true
exclude-files:
- ".*\\.cpp$"
- ".*\\.h$"
- ".*\\.sh$"
- ".*\\.py$"
- ".*\\.qml$"
exclude-dirs:
- "gui"
linters:
disable-all: true
enable:
- errcheck
- gosimple
- ineffassign
- govet
- unused
- gofmt
[main]
host = https://rest.api.transifex.com
lang_map = fa_IR: fa, kn_IN: kn
[o:otf:p:bitmask:r:bitmask-desktop]
source_file = gui/i18n/base.ts
type = QT
resource_name = LEAP Desktop VPN
file_filter = gui/i18n/main_<lang>.ts
minimum_perc = 80
Ruben Pollan <meskio@sindominio.net>
Kali Kaneko <kali@leap.se>
micah <micah@riseup.net>
elijah <elijah@riseup.net>
kwadronaut <kwadronaut@puscii.nl>
Micah Anderson <micah@riseup.net>
Natalie Eskinazi <n.l.eskinazi@gmail.com>
Pj4NJFIVsq <n3k0@riseup.net>
t h <t@h>
# Maintainer: Pea <peanut2 [aaaaat] systemli [dooot] org>
pkgname=bitmask-vpn-git
pkgrel=1
pkgdesc="Bitmask is an open source application to provide easy and secure encrypted communication with a VPN"
pkgver=0.24.6.rc.1.r10.g4ee5fba
arch=("x86_64")
license=("GPL-3.0-only")
url="https://0xacab.org/leap/bitmask-vpn"
conflicts=('riseup-vpn' 'riseup-vpn-git')
#source=("git+$url.git")
source=("bitmask-vpn::git+file://$(pwd)/../")
sha256sums=('SKIP')
# qt6-tools has /usr/lib/qt6/bin/lrelease
makedepends=('git' 'make' 'go' 'qt6-tools')
depends=('qt6-base' 'qt6-declarative' 'qt6-svg' 'openvpn' 'python' 'lxsession' 'iptables')
pkgver() {
cd bitmask-vpn
git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd bitmask-vpn
export GOCACHE="$srcdir/GOCACHE"
PROVIDER=bitmask make vendor
}
build() {
cd bitmask-vpn
export GOCACHE="$srcdir/GOCACHE"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
export PROVIDER=bitmask
export QMAKE=qmake6
export LRELEASE=/usr/lib/qt6/bin/lrelease
make build -j $(nproc)
}
check() {
cd bitmask-vpn
export GOCACHE="$srcdir/GOCACHE"
CI="dont run integration tests as they are broken" make test
}
package() {
cd bitmask-vpn
install -Dm755 build/qt/release/bitmask-vpn "$pkgdir/usr/bin/bitmask-vpn"
install -Dm755 helpers/bitmask-root "$pkgdir/usr/bin/bitmask-root"
install -Dm644 helpers/se.leap.bitmask.policy "$pkgdir/usr/share/polkit-1/actions/se.leap.bitmask.policy"
install -Dm644 build/bitmask/debian/bitmask-vpn.desktop "$pkgdir/usr/share/applications/bitmask-vpn.desktop"
install -Dm644 build/bitmask/debian/icons/scalable/bitmask-vpn.png "$pkgdir/usr/share/icons/hicolor/128x128/apps/bitmask-vpn.png"
}
development
===========
- ...
0.24.10
=======
- ui: use NumberAnimation for state change animation
- update obfsvpn go module to v1.3.1-0.20241121155258-e6b06efc4456
- [README] Print how to start bitmask-vpn after building it
- [management] Add tests for parsing port of a management message
- Log port of connected OpenVPN gateway
- [management] Improve error handling in *StateEvent.parts()
- show error message when app already running
- remove use of deprecated ioutil module
- fix crash during start when helper not installed
- ovpn: don't redeclare status variable
- ovpn: stop openvpn from management interface
- Add introducer to storage before using it when supplied via env
- Initialize and close bitmask-core storage
- Improve error handling when checking downloaded pem cert
- Update calls to DoGeolocationLookup after API change
- Update to latest bitmask-core (commit 0812b9aadf98)
- enable setting introducer url using env variable
- chore: replace ioutil with io module
- Strip port of menshen host before resolving with logDnsLookup
- update l10n
- create 0.24.10-rc.2 release
- installer: get uid and gid only for macos
- Update urls in provider config for bitmask provider
- installer: get uid and gid only for macos
- Update urls in provider config for bitmask provider
- helper: use unix socket for local api
- change obfsvpn version to v1.1.0
- Do geolocation lookup
- Add STUNServers countryCodeLookupURL fields to provider config (geolocation lookup)
- [config] Clean code (move CaCert to global var list)
- [menshen] Use NewConfigFromURL instead of NewConfig
- Update bitmask-core dependency
- Replace which with command -v
- Update obfsvpn to v1.3.0
- [bitmask-root] Don't redirect port 53 traffic of vpn gateways
- [bitmask-root] Don't return generator in get_gateways
- Fix log message that logs whitelisted gateway ip in firewall
- config: enable UDP for openvpn by default
- docs: add instructions for deb source package and uploading to ppa
- deb: add intermediate makefile target to prepare deb package
- Add python3 build dependency in control template
- Update debian changelog template
- deb: update patch for deb package to build with qt6.4
- build: donot rename built app binary
- build: pass in PROVIDER env variable to getparam script
- installer: name helper launchd service based on app name
- qmake: pass RELEASE variable to qmake invocation
- build: use RELEASE_DIR for path to release build dir
- qmake: configure for release builds when env RELEASE is yes
- ci: donot manually apply patch in debian package jobs
- ci: add gitlab ci job for building on macos
- build: update openvpn build script to work on arm64 host
- [Makefile] Don't overwrite QMAKE env when calling build.sh
- [Makefile] Fix racecondition in Makefile
- [Makefile] Remove install_go target
- [Makefile] Add default target allinone (clean/vendor/build)
- [Makefile] Use unlink only on Windows for make clean
- Remove gui/providers/providers.json from git repo
- ci: Remove debian job. Not needed anymore
- ci: rename arch CI job to build_Arch_Linux_package
- ci: build deb packages for Debian 12, Ubuntu 22.04 and Ubuntu 24.04
- ci: Fix CI fail "toolchain not available"
- ci: remove ineffective chmod from build step of macOS job
0.24.8
======
- Reduces the size of splash screen image
- Disable obfs4 and kcp checkbox in preferences for riseup
- Removes duplicate languages in the language picker in preferences
- Language picker in preferences shows languages sorted alphabetically
- Updates translation files
- Adds region to language selections menu when available
- Improves UI responsiveness when connect or disconnect fails
- Disable automatic openvpn connection during app start
- Fixes a local privilege escalation security bug when using "--install-helpers"
- Change bitmask branded app name to Bitmask from BitmaskVPN
- Fixes bug where MOTD message box was not shown for RiseupVPN
- Show bridge icon when KCP transport is selected
- Show license page during installation
- Uninstalls previous version before installing current version
- Adds accessibility hints to connection button
- Exposes KCP support in the UI
- Adds new bitmask-vpn package for Arch Linux
- Fixes a bug preventing use of the app by non-admin users on windows
- Fixes a bug on macOS preventing users from manual location selection
- Fixes a bug where the app's close routine was called twice
- Fixes a bug where log file was not closed while quitting the app
- Fixes a bug where the correct app name was not shown in installer error messages
- Updates to latest obfsvpn
- Updates to latest bitmask-core
- Updates translation files
- Adds missing iptables dependency to ubuntu package
0.24.6-rc.1
======
- Adds better debug and informational logs
- Partially implement menshen V5 API
- Partially implements the new Bitmask and Riseup designs
- Addition of PPA for ubuntu numbat
- Adds timeout for http connections
- Adds error checking to various places in the code
0.24.5
======
- fix missing dependencies on .deb package
- Shorten too long strings in translations
- Fix bitmask branded windows UI and remove riseup crow from about
- Connection status text width trimmed to be inside parent container
- Bitmask branded desktop build pointing to demo instance of lillypad
- Add Supported OS's to the readme
- Update the debian package to build using Qt6
- Update GUI to Qt6
- Fix bitmask-helper install script for macOS and windows
0.21.11
=======
- Complete UI revamp
- Do not fail if ipv6 is disabled (GNU/Linux)
- UDP support
- Obfs4 support
- Experimental snowflake support for bootstrap (not exposed in UI yet)
- Disable autostart on first run
- Provider "message of the day"
- primitive version check for windows, osx.
- #569 avoid installing in custom paths to mitigate security issue in windows
0.21.6
======
- First iteration of the gateway selector.
- Allow to select obfs4 gateways (bridges) to bypass censorship.
- Ability to define explicitely allowed addresses for local networks.
- Make the donate dialog less intrusive (#470)
- Updated translations. New locales: greek, farsi, hungarian, dutch, polish and uyghur.
cmake_minimum_required(VERSION 3.16)
project(bitmask VERSION 1.0 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(QT NAMES Qt5 Qt6 REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2 Svg Widgets LinguistTools)
find_library(LIB_TO_INCLUDE goshim lib)
#qt_standard_project_setup()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
qt_add_executable(bitmask WIN32 MACOSX_BUNDLE
gui/handlers.cpp gui/handlers.h
gui/main.cpp
gui/qjsonmodel.cpp gui/qjsonmodel.h
lib/libgoshim.h
)
qt_add_qml_module(bitmask
URI bitmask
VERSION ${PROJECT_VERSION}
QML_FILES
gui/main.qml
gui/themes/themes.js
gui/themes/theme-riseup.js
gui/themes/Riseup.qml
gui/themes/theme-calyx.js
gui/themes/Calyx.qml
gui/themes/ThemeObject.qml
gui/components/MainView.qml
gui/components/ThemedPage.qml
gui/components/Splash.qml
gui/components/FadeBehavior.qml
gui/components/Home.qml
gui/components/Header.qml
gui/components/Footer.qml
gui/components/About.qml
gui/components/MaterialRadioButton.qml
gui/components/MaterialRadioIndicator.qml
gui/components/WrappedRadioButton.qml
gui/components/MaterialCheckBox.qml
gui/components/StatusBox.qml
gui/components/Systray.qml
gui/components/Help.qml
gui/components/Locations.qml
gui/components/SignalIcon.qml
gui/components/Preferences.qml
gui/components/BoldLabel.qml
gui/components/LightLabel.qml
gui/components/VPNButtonBase.qml
gui/components/VPNMouseArea.qml
gui/components/VerticalSpacer.qml
gui/components/Icon.qml
gui/components/MaterialButton.qml
gui/components/VPNState.qml
gui/components/InitErrors.qml
gui/components/ErrorBox.qml
gui/components/MotdBox.qml
gui/components/NavigationDrawer.qml
RESOURCES
gui/qtquickcontrols2.conf
gui/resources/icon-noshield.svg
gui/resources/location.svg
gui/resources/settings.svg
gui/resources/power.svg
gui/resources/language.svg
gui/resources/lightning.svg
gui/resources/close.svg
gui/resources/donate.svg
gui/resources/tools.svg
gui/resources/help.svg
gui/resources/about.svg
gui/resources/bridge.svg
gui/resources/gear-fill.svg
gui/resources/reception-0.svg
gui/resources/reception-2.svg
gui/resources/reception-4.svg
gui/resources/reception-0@24.svg
gui/resources/reception-4@24.svg
gui/resources/arrow-left.svg
gui/resources/globe.svg
gui/resources/spy.gif
gui/resources/quit.svg
gui/resources/alert.svg
gui/resources/angle-right.svg
gui/resources/snowflake.svg
gui/resources/ravens.svg
gui/resources/ravens.gif
gui/resources/riseup-icon.svg
gui/resources/calyx/calyx-shield-green.png
gui/resources/calyx/calyx-hand.png
gui/resources/calyx/calyx-red-shield.png
gui/resources/calyx/calyx-yellow-shield.png
gui/resources/fonts/Poppins-Regular.ttf
gui/resources/fonts/Poppins-Bold.ttf
gui/resources/fonts/Montserrat-SemiBold.ttf
gui/resources/fonts/Roboto-Regular.ttf
gui/resources/fonts/Roboto-Bold.ttf
gui/assets/icon/png/black/vpn_off.png
gui/assets/icon/png/black/vpn_on.png
gui/assets/icon/png/black/vpn_wait_0.png
gui/assets/icon/png/black/vpn_wait_1.png
gui/assets/icon/png/black/vpn_wait_2.png
gui/assets/icon/png/black/vpn_wait_3.png
gui/assets/icon/png/white/vpn_off.png
gui/assets/icon/png/white/vpn_on.png
gui/assets/icon/png/white/vpn_wait_0.png
gui/assets/icon/png/white/vpn_wait_1.png
gui/assets/icon/png/white/vpn_wait_2.png
gui/assets/icon/png/white/vpn_wait_3.png
gui/assets/img/bird.jpg
gui/providers/providers.json
NO_RESOURCE_TARGET_PATH
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/release
)
set_source_files_properties("gui/providers/providers.json"
PROPERTIES QT_RESOURCE_ALIAS "providers.json"
)
set_source_files_properties("gui/resources/fonts/Montserrat-SemiBold.ttf"
PROPERTIES QT_RESOURCE_ALIAS "monserrat-bold.ttf"
)
set_source_files_properties("gui/resources/fonts/Poppins-Bold.ttf"
PROPERTIES QT_RESOURCE_ALIAS "poppins-bold.ttf"
)
set_source_files_properties("gui/resources/fonts/Poppins-Regular.ttf"
PROPERTIES QT_RESOURCE_ALIAS "poppins-regular.ttf"
)
set_source_files_properties("gui/resources/fonts/Roboto-Bold.ttf"
PROPERTIES QT_RESOURCE_ALIAS "roboto-bold.ttf"
)
set_source_files_properties("gui/resources/fonts/Roboto-Regular.ttf"
PROPERTIES QT_RESOURCE_ALIAS "roboto.ttf"
)
# Avoid collision between executable name and QML module directory (QTBUG-98568).
if(NOT WIN32 AND NOT APPLE)
set_property(TARGET bitmask PROPERTY OUTPUT_NAME bitmask_app)
endif()
target_compile_definitions(bitmask PRIVATE
QT_DEPRECATED_WARNINGS
)
target_link_libraries(bitmask PRIVATE
# Remove: L../../lib
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt::QuickControls2
Qt::Svg
Qt::Widgets
${LIB_TO_INCLUDE}
pthread
)
# Resources:
set_source_files_properties("providers/riseup/assets/icon.svg"
PROPERTIES QT_RESOURCE_ALIAS "icon.svg"
)
set(vendor_resource_files
"providers/riseup/assets/icon.svg"
)
qt_add_resources(bitmask "vendor"
PREFIX
"/vendor/"
BASE
"providers/riseup"
FILES
${vendor_resource_files}
)
qt_add_translations(bitmask TS_FILES
gui/i18n/base.ts
gui/i18n/main_de.ts
gui/i18n/main_el.ts
gui/i18n/main_es_ES.ts
gui/i18n/main_es-rAR.ts
gui/i18n/main_es.ts
gui/i18n/main_et.ts
gui/i18n/main_fa_IR.ts
gui/i18n/main_fi.ts
gui/i18n/main_fr.ts
gui/i18n/main_hu.ts
gui/i18n/main_it.ts
gui/i18n/main_lt.ts
gui/i18n/main_nl.ts
gui/i18n/main_pl.ts
gui/i18n/main_pt-rBR.ts
gui/i18n/main_ru.ts
gui/i18n/main_th.ts
gui/i18n/main_tr.ts
gui/i18n/main_ug.ts
gui/i18n/main_zh-rTW.ts
gui/i18n/main_zh.ts
)
if(MACOS)
target_link_libraries(bitmask PRIVATE
"-framework CoreFoundation"
"-framework Security"
)
endif()
install(TARGETS bitmask
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
qt_generate_deploy_qml_app_script(
TARGET bitmask
FILENAME_VARIABLE deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR
DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
MACOS_BUNDLE_POST_BUILD
)
install(SCRIPT ${deploy_script})
This diff is collapsed.
Build
-----
# Bitmask - Desktop client
Install dependencies:
## Supported operating systems
**Bitmask** needs the following minimum versions of supported operating systems:
### On Windows
**Bitmask** has been tested to work on windows 10 and 11 it might not work on earlier version of windows.
### On MacOS
- **Bitmask** has been tested to work on last three releases of MacOS (Monteray, Ventura and Sonoma)
- **Bitmask** currently needs rossetta to be enable to work on Apple hardware (M1, M2)
### On Linux
- **Bitmask** has been tested to work on the latest version of Debian, Ubuntu, Fedora and Arch Linux
- Packages are only available for Ubuntu, Debian and Arch Linux
## Install
## Build
Clone this repo, install dependencies and build the application. Dependencies assume debian packages, or homebrew for osx. For Windows OS see corresponding section below. For other systems try manually, or send us a patch. bitmask-vpn can be branded for a specific provider by specifying the env variable PROVIDER during the build process; we currently support three providers: riseup, calyx, and bitmask. To create a client branded for 'riseup', run:
```
git clone git@0xacab.org:leap/bitmask-vpn.git && cd bitmask-vpn
sudo make depends # do not use sudo in osx
PROVIDER=riseup make vendor
make build
sudo build/qt/release/riseup-vpn --install-helpers # on Linux and Mac
LOG_LEVEL=TRACE build/qt/release/riseup-vpn
```
With `--install-helpers` the `bitmask-root` helper gets copied to `/usr/sbin`.
# Ubuntu
If you're using Ubuntu, you can use [leapcodes ppa](https://launchpad.net/~leapcodes/+archive/ubuntu/riseup-vpn).
```
sudo add-apt-repository ppa:leapcodes/riseup-vpn
sudo apt update
sudo apt install riseup-vpn
```
# Debian
The package is available as "riseup-vpn" in Debian Bookworm, albeit at an older version. To get the same, you could run:
```
sudo apt install riseup-vpn
```
The latest version is available for Debian Bookworm via backports. See the [offcial page](https://backports.debian.org/Instructions/) for instructions on how to set it up. If you are using Debian Testing/Unstable, riseup-vpn's latest version is available there as well.
If you're using an older version of Debian, then we do not have a package for the same. However, if you really desire a debian package you can build your own for the time being:
```
debuild -us -uc
sudo dpkg -i ../riseup-vpn*.deb
```
You can also run
```
PROVIDER=riseup make vendor
PROVIDER=riseup QMAKE=qmake6 make package_deb
```
sudo make depends
Then install the built package with `apt install -f ./deploy/*.deb`.
# Arch Linux
There are two AUR packages for Arch Linux. There is [riseup-vpn-git](https://aur.archlinux.org/packages/riseup-vpn-git) that tracks main branch, so expect some instabilities (early birds catch the bugs they say, and we're thankful for that). There is also [riseup-vpn](https://aur.archlinux.org/packages/riseup-vpn) with the latest stable release.
```
yay riseup-vpn
```
Build the application:
## Snap
There is also a package in the [Snap store](https://snapcraft.io/riseup-vpn).
```
git clone 0xacab.org/leap/bitmask-vpn && cd bitmask-vpn
make build
sudo snap install riseup-vpn
```
You need at least go 1.11. If you have something older and are using ubuntu, you can do:
## Build
Clone this repo, install dependencies and build the application. Dependencies assume debian packages, or homebrew for osx. For Windows OS see corresponding section below. For other systems try manually, or send us a patch. bitmask-vpn can be branded for a specific provider by specifying the env variable PROVIDER during the build process; we currently support three providers: riseup, calyx, and bitmask. To create a client branded for 'riseup', run:
```
make install_go
git clone git@0xacab.org:leap/bitmask-vpn.git && cd bitmask-vpn
sudo make depends # do not use sudo in osx
PROVIDER=riseup make vendor
make build
```
For other situations, have a look at https://github.com/golang/go/wiki/Ubuntu or https://golang.org/dl/
To build you need at least go 1.22.
## Test
You can run some tests too.
```
sudo apt install qml-module-qttest
make test
make test_ui
```
## Windows
As for now app can be build on Win OS using `Cygwin` terminal.
OSX
---
#### Precondition
You need to have installed and added to your user PATH (mentioned version tested in Win10):
1) Go (>= go1.20)
2) QT (>= Qt6.6)
3) QtIFW (>= QtIFW-4.0.0)
4) Cygwin64 (>= 2.905 64 bit)
5) Using Cygwin `Package Select` window install `python3` and `make` packages.
You can install dependencies with homebrew:
**Note:** for \#5 you don't need to add packages to PATH they will available in `cygwin` after installation.
#### Get Source
```
git clone 0xacab.org/leap/bitmask-vpn && cd bitmask-vpn
make depends
make build
git clone git@0xacab.org:leap/bitmask-vpn.git && cd bitmask-vpn
```
Test
----
#### Build
Build script uses a symbolic link in one of the stages. Unfortunately Cygwin can't create native symlink from local non
admin user due to windows security restriction. To avoid this issue we need to call next target from cygwin terminal as
Administrator. This need to be done only once.
```bash
make relink_vendor
```
After `relink_vendor` use this to build the app:
```bash
make build
```
sudo apt install qml-module-qttest
make test
make test_ui
After successful build application will be available at: `build/qt/release/riseup-vpn.exe`
#### Test
To run tests:
```bash
make test
make test_ui
```
## Logging
Log files:
Linux: `~/.config/leap/systray.log`
Windows: `%LocalAppData%\leap\systray.log `
Mac: `~/Library/Preferences/leap/systray.log`
Log levels can be set via environment variable (`LOG_LEVEL=TRACE`, `LOG_LEVEL=DEBUG`, default log level is `INFO`). The cpp/qml part logs to stderr if env `DEBUG=1` is set. If `OPENVPN_LOG_TO_FILE=1` is set, the OpenVPN process writes its logs to [os.TempDir()](https://pkg.go.dev/os#TempDir)/leap-vpn.log. The verbosity of OpenVPN can be specified with env `OPENVPN_VERBOSITY` (sets `--verb`).
Translations
------------
We use [transifex](https://www.transifex.com/otf/bitmask/RiseupVPN/) to coordinate translations. Any help is welcome!
We use [transifex](https://www.transifex.com/otf/bitmask/bitmask-desktop/) to coordinate translations. Any help is welcome!
Bugs?
-----
Bugs? Crashes? UI feedback? Any other suggestions or complains?
---------------------------------------------------------------
When you report an issue include the following information:
When you are willing to [report an issue](https://0xacab.org/leap/bitmask-vpn/-/issues) please
use the search tool first. if you cannot find your issue, please make sure to
include the following information:
* what you expected to see
* what you got
* the version of the program. You can check the version on the about page.
* the platform you're using and the installation method.
* the version of the program. You can check the version on the "about" menu.
* what you expected to see.
* what you got instead.
* the logs of the program. The location of the logs depends on the OS:
* linux: `/home/<your user>/.config/leap/systray.log`
* gnu/linux: `/home/<your user>/.config/leap/systray.log`
* OSX: `/Users/<your user>/Library/Preferences/leap/systray.log`, `/Applications/RiseupVPN.app/Contents/helper/helper.log` & `/Applications/RiseupVPN.app/Contents/helper/openvpn.log`
* windows: `C:\Users\<your user>\AppData\Local\leap\systray.log`, `C:\Program Files\RiseupVPN\helper.log` & `C:\Program Files\RiseupVPN\openvp.log`
#TARGET = $$BINARY_NAME
TARGET = $$TARGET
QT += quickcontrols2 svg
CONFIG += qt staticlib
windows:CONFIG += console
unix:DEBUG:CONFIG += debug
CONFIG += c++17 strict_c++
CONFIG += qtquickcompiler
RELEASE = $$RELEASE
equals(RELEASE, "yes") {
message("[qmake] doing release build")
CONFIG += release
# debug_and_release is default on windows
# and needs to be explicitly disabled
win32:CONFIG -= debug_and_release
} else {
message("[qmake] doing debug build")
CONFIG += force_debug_info
CONFIG += debug_and_release
}
windows:CONFIG -= console
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
QMAKE_MACOSX_DEPLOYMENT_TARGET = 12
QMAKE_TARGET_BUNDLE_PREFIX = se.leap
QMAKE_BUNDLE = $$TARGET
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
!defined(VENDOR_PATH, var):VENDOR_PATH="providers/riseup"
......@@ -17,13 +42,13 @@ ICON = $$VENDOR_PATH/icon.png
macx {
ICON = $$VENDOR_PATH/assets/icon.icns
LIBS += -framework Security
LIBS += -framework Security -framework CoreFoundation -lresolv
}
win32 {
RC_ICONS = $$VENDOR_PATH/assets/icon.ico
}
QT += qml quick widgets
QT += qml widgets quick
SOURCES += \
gui/main.cpp \
......@@ -64,3 +89,8 @@ CONFIG += lrelease embed_translations
TRANSLATIONS += $$files(gui/i18n/*.ts, true)
RESOURCES += $$files(gui/i18n/*.qm, true)
# see https://stackoverflow.com/questions/5960192/qml-qt-openurlexternally#5960581
# Needed for bringing browser from background to foreground using
# QDesktopServices: https://bugreports.qt.io/browse/QTBUG-8336
TARGET.CAPABILITY += SwEvent
motd-cli
MOTD (message of the day)
=========================
This is a stub until a more sophisticated motd mechanism can be implemented in
the future, with better platform integration.
Providers can opt-in to the motd feature (only riseup is using it at the moment).
If motd is enabled for a given provider, the client will attempt to fetch
the motd.json file from a well-known URL, and will display the first valid
message on the splash screen.
The structure of the `motd.json` file is like follows:
```
{
"motd": [{
"begin": "01 Nov 21 00:00 -0700",
"end": "31 Jan 22 00:00 -0700",
"type": "daily",
"platform": "all",
"urgency": "normal",
"text": [
{ "lang": "en",
"str": "This is a <a href='https://leap.se'>test!</a>"},
{ "lang": "es",
"str": "Esto es una <a href='https://leap.se'>pruebita!</a>"}
]}
]
}
```
Valid values are:
* Begin, End are date strings, in the format: "01 Jan 21 00:00:00 -0700".
* Type: "once" for a one-shot message, "daily" for a message that is displayed daily during the specified duration.
* Platform: one of "windows", "osx", "snap", "linux", or "all".
* Urgency: either "normal" or "critical".
The text message can contain links.
You can use the `motd-cli` tool in this folder to parse and validate the json:
```
go build
❯ ./motd-cli
file: motd-example.json
count: 1
Message 1 ✓
-----------
Type: daily ✓
Platform: all ✓
Urgency: normal ✓
Languages: 2 ✓
```
Use `motd-cli -url https://example.com/motd.json` to validate a remote file.
Notes: I'm considering adding an explicit layer of verification of the motd
payload. Please comment on
[#554](https://0xacab.org/leap/bitmask-vpn/-/issues/554) if you have an opinion
on this.
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
"0xacab.org/leap/bitmask-vpn/pkg/motd"
)
const OK = "✓"
const WRONG = "☓"
func main() {
file := flag.String("file", "", "file to validate")
url := flag.String("url", "", "url to validate")
flag.Parse()
f := *file
u := *url
var m motd.Messages
var err error
if u != "" {
fmt.Println("url:", u)
f = downloadToTempFile(u)
} else {
if f == "" {
f = filepath.Join("../../pkg/motd/", motd.ExampleFile)
}
fmt.Println("file:", f)
}
m, err = motd.ParseFile(f)
if err != nil {
panic(err)
}
fmt.Printf("count: %v\n", m.Length())
fmt.Println()
for i, msg := range m.Messages {
fmt.Printf("Message %d %v\n-----------\n", i+1, mark(msg.IsValid()))
fmt.Printf("Type: %s %v\n", msg.Type, mark(msg.IsValidType()))
fmt.Printf("Platform: %s %v\n", msg.Platform, mark(msg.IsValidPlatform()))
fmt.Printf("Urgency: %s %v\n", msg.Urgency, mark(msg.IsValidUrgency()))
fmt.Printf("Languages: %d %v\n", len(msg.Text), mark(msg.HasLocalizedText()))
for _, t := range msg.Text {
fmt.Printf(t.Str)
}
if !msg.IsValid() {
os.Exit(1)
}
}
}
func downloadToTempFile(url string) string {
resp, err := http.Get(url)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, err := ioutil.TempFile("/tmp/", "motd-linter")
if err != nil {
panic(err)
}
defer out.Close()
_, _ = io.Copy(out, resp.Body)
fmt.Println("File downloaded to", out.Name())
return out.Name()
}
func mark(val bool) string {
if val {
return OK
} else {
return WRONG
}
}
{
"motd": [{
"begin": "01 Nov 21 00:00 -0700",
"end": "31 Jan 22 00:00 -0700",
"type": "daily",
"platform": "all",
"urgency": "normal",
"text": [
{ "lang": "en",
"str": "%20___________%0A%3C%20RiseupVPN%20%3E%0A%20-----------%0A%20%20%20%20%20%20%20%20%5C%20%20%20%5E__%5E%0A%20%20%20%20%20%20%20%20%20%5C%20%20%28oo%29%5C_______%0A%20%20%20%20%20%20%20%20%20%20%20%20%28__%29%5C%20%20%20%20%20%20%20%29%5C%2F%5C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C----w%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20%20%20%20%20%7C%7C"},
{ "lang": "es",
"str": "¡Gracias por usar RiseupVPN! Por favor reportanos <a href='https://0xacab.org/leap/bitmask-vpn'>cualquier bug o petición</a>."}
]}
]
}
......@@ -5,8 +5,7 @@ import json
import os
import sys
from provider import getDefaultProvider
from provider import getDefaultProviders
from provider import getProviderData
OUTFILE = 'providers.json'
......@@ -22,14 +21,15 @@ def generateProvidersJSON(configPath, outputJSONPath):
# For multi-provider, just add more providers to the dict
providers = {}
defaultProvider = getDefaultProvider(config)
defaultProviders = getDefaultProviders(config)
providers['default'] = defaultProvider
providers['default'] = defaultProviders[0]
providers['providers'] = []
providerData = getProviderData(defaultProvider, config)
addCaData(providerData, configPath)
providers['providers'].append(providerData)
for p in defaultProviders:
providerData = getProviderData(p, config)
addCaData(providerData, configPath)
providers['providers'].append(providerData)
os.makedirs(os.path.dirname(outputJSONPath), exist_ok=True)
with open(outputJSONPath, 'w', encoding='utf-8') as f:
json.dump(providers, f, ensure_ascii=False, indent=4)
......
......@@ -8,29 +8,33 @@ import time
from string import Template
from provider import getDefaultProvider
from provider import getDefaultProviders
from provider import getProviderData
OS_CONFIG = {
'osx': """
<!-- osx -->
<TargetDir>@ApplicationsDir@/$APPNAME.app</TargetDir>
<TargetDir>/Applications/$APPNAME</TargetDir>
<StartMenuDir>$APPNAME.app</StartMenuDir>
<RunProgram>open</RunProgram>
<RunProgramDescription>Start $APPNAME now!</RunProgramDescription>
<RunProgramArguments>
<Argument>@TargetDir@</Argument>
<Argument>@TargetDir@/$APPNAME.app</Argument>
</RunProgramArguments>
<WizardStyle>mac</WizardStyle>
<!-- end osx -->
""",
'windows': """
<TargetDir>@ApplicationsDir@/$APPNAME</TargetDir>
<!-- windows -->
<TargetDir>c:/Program Files (x86)/$APPNAME</TargetDir>
<StartMenuDir>$APPNAME</StartMenuDir>
<RunProgram>@TargetDir@/$BINNAME.exe</RunProgram>
<RunProgramArguments>
</RunProgramArguments>
<WizardStyle>Modern</WizardStyle>
<!-- end windows -->
"""
}
......@@ -42,7 +46,7 @@ def getData():
provider = os.environ.get('PROVIDER')
if not provider:
provider = getDefaultProvider(config)
provider = getDefaultProviders(config)[0]
return getProviderData(provider, config)
def generateQtInstallerBoilerplate(data, platform, outDir):
......
......@@ -6,7 +6,7 @@ import sys
import configparser
from provider import getDefaultProvider
from provider import getDefaultProviders
from provider import getProviderData
......@@ -24,7 +24,7 @@ if __name__ == "__main__":
configFile = os.path.join(VENDOR_PATH, 'vendor.conf')
config = configparser.ConfigParser()
config.read(configFile)
provider = getDefaultProvider(config)
provider = getDefaultProviders(config)[0]
data = getProviderData(provider, config)
if len(sys.argv) != 2:
......