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 632 additions and 304 deletions
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)
7. Upload builds, renew the *-latest* symlinks and their `lastver` files (important!)
# 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, CodigoSurVPN etc...*
*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**.
......
module 0xacab.org/leap/bitmask-vpn
go 1.14
go 1.22.2
require (
0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2
git.torproject.org/pluggable-transports/goptlib.git v1.1.0
0xacab.org/leap/obfsvpn v1.3.1-0.20241121155258-e6b06efc4456
git.torproject.org/pluggable-transports/goptlib.git v1.3.0
git.torproject.org/pluggable-transports/snowflake.git v1.1.0
github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264 // indirect
github.com/OperatorFoundation/shapeshifter-ipc v0.0.0-20170814234159-11746ba927e0 // indirect
github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a751b0500f4 // indirect
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2
github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a
github.com/cretz/bine v0.2.0
github.com/dchest/siphash v1.2.1 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/dchest/siphash v1.2.3 // indirect
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
github.com/pion/webrtc/v3 v3.0.15
github.com/rakyll/statik v0.1.7
github.com/sevlyar/go-daemon v0.1.5
github.com/pion/webrtc/v3 v3.2.44
github.com/smartystreets/goconvey v1.6.4
github.com/xtaci/kcp-go/v5 v5.6.1
github.com/xtaci/smux v1.5.15
golang.org/x/sys v0.0.0-20210423082822-04245dca01da
github.com/xtaci/kcp-go/v5 v5.6.11
github.com/xtaci/smux v1.5.24
// Do not update obfs4 past e330d1b7024b, a backwards incompatible change was
// made that will break negotiation!! riseup should move to the newest asap.
gitlab.com/yawning/obfs4.git v0.0.0-20231012084234-c3e2d44b1033 // indirect
golang.org/x/sys v0.28.0
)
require (
0xacab.org/leap/bitmask-core v0.0.0-20241213164419-d3c23078a4e0
0xacab.org/leap/menshen v0.0.0-20241122184833-0524d7e093d5
github.com/natefinch/npipe v0.0.0-20160621034901-c1b8fa8bdcce
github.com/prometheus-community/pro-bing v0.4.0
github.com/rs/zerolog v1.33.0
github.com/stretchr/testify v1.9.0
)
require (
0xacab.org/leap/tunnel-telemetry v0.0.0-20240830081933-7328bb50078b // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/asdine/storm/v3 v3.2.1 // indirect
github.com/babolivier/go-doh-client v0.0.0-20201028162107-a76cff4cb8b6 // indirect
github.com/cloudflare/circl v1.3.9 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
github.com/go-openapi/runtime v0.28.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/klauspost/reedsolomon v1.12.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/onsi/ginkgo/v2 v2.13.2 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pion/datachannel v1.5.7 // indirect
github.com/pion/dtls/v2 v2.2.11 // indirect
github.com/pion/ice/v2 v2.3.28 // indirect
github.com/pion/interceptor v0.1.29 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.12 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.14 // indirect
github.com/pion/rtp v1.8.6 // indirect
github.com/pion/sctp v1.8.18 // indirect
github.com/pion/sdp/v3 v3.0.9 // indirect
github.com/pion/srtp/v2 v2.0.18 // indirect
github.com/pion/stun v0.6.1 // indirect
github.com/pion/transport/v2 v2.2.5 // indirect
github.com/pion/turn/v2 v2.1.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/quic-go/quic-go v0.47.0 // indirect
github.com/refraction-networking/utls v1.6.7 // indirect
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.com/templexxx/cpu v0.1.0 // indirect
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
github.com/templexxx/xorsimd v0.4.2 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/xtaci/kcp-go v5.4.20+incompatible // indirect
gitlab.com/yawning/edwards25519-extra v0.0.0-20231005122941-2149dcafc266 // indirect
gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib v1.5.0 // indirect
go.etcd.io/bbolt v1.3.10 // indirect
go.mongodb.org/mongo-driver v1.16.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
This diff is collapsed.
......@@ -3,10 +3,11 @@ package main
/* a wrapper around bitmask that exposes status to a QtQml gui.
Have a look at the pkg/backend module for further enlightment. */
import (
"C"
"unsafe"
import "C"
import "unsafe"
import (
"0xacab.org/leap/bitmask-vpn/pkg/backend"
)
......@@ -31,10 +32,8 @@ func SwitchOff() {
}
//export UseLocation
func UseLocation(label string) {
// a bit of a hack to force the compiler to copy the string
// so the original C++ string will not be used as it will be changed down the line
location := string([]byte(label))
func UseLocation(label *C.char) {
location := C.GoString(label)
backend.UseLocation(location)
}
......@@ -44,8 +43,9 @@ func UseAutomaticGateway() {
}
//export SetTransport
func SetTransport(transport string) {
backend.SetTransport(string(transport))
func SetTransport(transport *C.char) {
tp := C.GoString(transport)
backend.SetTransport(tp)
}
//export GetTransport
......@@ -92,6 +92,8 @@ func InitializeBitmaskContext(provider string,
opts.Obfs4 = obfs4
opts.DisableAutostart = disableAutostart
opts.StartVPN = startVPN
opts.DisableAutostart = true
opts.SkipLaunch = true
go backend.InitializeBitmaskContext(opts)
}
......
......@@ -5,14 +5,15 @@ set -e
# set -x
# --------------------
XBUILD=${XBUILD-no}
LRELEASE=${LRELEASE-lrelease}
VENDOR_PATH=${VENDOR_PATH-providers/riseup}
APPNAME=${APPNAME-BitmaskVPN}
XBUILD="${XBUILD:-no}"
LRELEASE="${LRELEASE:-lrelease}"
VENDOR_PATH="${VENDOR_PATH:-providers/riseup}"
APPNAME="${APPNAME:-Bitmask}"
LDFLAGS_VER="-X 0xacab.org/leap/bitmask-vpn/pkg/config/version.appVersion=${VERSION}"
OSX_TARGET=10.11
OSX_TARGET=12
WIN64="win64"
GO=`which go`
GO=`command -v go`
PROJECT=bitmask.pro
TARGET_GOLIB=lib/libgoshim.a
......@@ -20,7 +21,7 @@ SOURCE_GOLIB=gui/backend.go
MAKE=${MAKE:=make}
QTBUILD=build/qt
RELEASE=$QTBUILD/release
RELEASE_DIR=$QTBUILD/release
DEBUGP=$QTBUILD/debug
PLATFORM=$(uname -s)
......@@ -39,6 +40,11 @@ then
MAKEFLAGS=
fi
if [ "$CC" == "cc" ]
then
CC="gcc"
fi
if [ "$XBUILD" == "$WIN64" ]
then
# TODO allow to override vars
......@@ -48,7 +54,7 @@ then
else
if [ "$QMAKE" == "" ]
then
QMAKE=`which qmake`
QMAKE="$(command -v qmake6 || command -v qmake)"
fi
fi
......@@ -59,9 +65,6 @@ function init {
}
function buildGoLib {
echo "[+] Using go in" $GO "[`go version`]"
$GO generate -mod=vendor ./pkg/config/version/genver/gen.go || echo "[!] Error on go generate"
if [ "$PLATFORM" == "Darwin" ]
then
GOOS=darwin
......@@ -73,13 +76,15 @@ function buildGoLib {
if [ "$XBUILD" == "no" ]
then
echo "[+] Building Go library with standard Go compiler"
CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -mod=vendor -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -buildmode=c-archive \
-ldflags="${LDFLAGS_VER} -extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
fi
if [ "$XBUILD" == "$WIN64" ]
then
echo "[+] Building Go library with mxe"
echo "[+] Using cc:" $CC
CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -ldflags="-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -ldflags="${LDFLAGS_VER} \
-extar=$AR -extld=$LD -extldflags=$LDFLAGS" -o $TARGET_GOLIB $SOURCE_GOLIB
fi
}
......@@ -87,7 +92,8 @@ function buildQmake {
echo "[+] Now building Qml app with Qt qmake"
echo "[+] Using qmake in:" $QMAKE
mkdir -p $QTBUILD
$QMAKE -early QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT
$QMAKE -early QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH="${VENDOR_PATH}" \
RELEASE=${RELEASE} TARGET=${TARGET} $PROJECT
#CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release
}
......@@ -98,29 +104,32 @@ function renameOutput {
if [ "$DEBUG" == "1" ]
then
echo "[+] Selecting DEBUG build"
mv $DEBUGP/bitmask $RELEASE/$TARGET
mv $DEBUGP/bitmask $RELEASE_DIR/$TARGET
else
echo "[+] Selecting RELEASE build"
mv $RELEASE/bitmask $RELEASE/$TARGET
strip $RELEASE/$TARGET
mv $RELEASE_DIR/bitmask $RELEASE_DIR/$TARGET
strip $RELEASE_DIR/$TARGET
fi
echo "[+] Binary is in" $RELEASE/$TARGET
echo "[+] Binary is in" $RELEASE_DIR/$TARGET
elif [ "$PLATFORM" == "Darwin" ]
then
rm -rf $RELEASE/$TARGET.app
mv $RELEASE/bitmask.app/ $RELEASE/$TARGET.app/
mv $RELEASE/$TARGET.app/Contents/MacOS/bitmask $RELEASE/$TARGET.app/Contents/MacOS/$APPNAME
rm -rf $RELEASE_DIR/$TARGET.app
mv $RELEASE_DIR/bitmask.app/ $RELEASE_DIR/$TARGET.app/
mv $RELEASE_DIR/$TARGET.app/Contents/MacOS/bitmask $RELEASE_DIR/$TARGET.app/Contents/MacOS/$APPNAME
# bsd sed
sed -i '' "s/>bitmask/>${APPNAME}/" $RELEASE/$TARGET.app/Contents/Info.plist
echo "[+] App is in" $RELEASE/$TARGET
sed -i '' "s/>bitmask/>${APPNAME}/" $RELEASE_DIR/$TARGET.app/Contents/Info.plist
echo "[+] App is in" $RELEASE_DIR/$TARGET
else # for MINGWIN or CYGWIN
mv $RELEASE/bitmask.exe $RELEASE/$TARGET.exe
mv $RELEASE_DIR/bitmask.exe $RELEASE_DIR/$TARGET.exe
fi
}
function buildDefault {
echo "[+] Building BitmaskVPN"
$LRELEASE bitmask.pro
echo "[+] Building Bitmask"
if [ "$LRELEASE" != "no" ]
then
$LRELEASE bitmask.pro
fi
if [ "$BUILD_GOLIB" == "yes" ]
then
buildGoLib
......@@ -130,7 +139,6 @@ function buildDefault {
$MAKE -C $QTBUILD clean
$MAKE -C $QTBUILD $MAKEFLAGS all
renameOutput
echo "[+] Done."
}
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import "../themes/themes.js" as Theme
......@@ -44,7 +44,7 @@ ThemedPage {
Image {
id: aboutIcon
height: 60
source: "../resources/icon-noshield.svg"
source: customTheme.iconSplash
fillMode: Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter
}
......@@ -90,7 +90,7 @@ ThemedPage {
//: %3 -> donation text if activated
//: %4 -> terms of service
let _txt = qsTr(
"<style>a:link {color: '" + Theme.green + "';}</style><p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> %3 <p>By using this application, you agree to the <a href=\"%4\">Terms of Service</a>. This service is provided as-is, without any warranty, and is intended for people who work to make the world a better place.</p>").arg(_name).arg(_provider).arg(_donateTXT).arg(_tosURL)
"<style>a:link {color: '" + Theme.green + "';}</style><p>%1 is an easy, fast, and secure VPN service from %2. %1 does not require a user account, keep logs, or track you in any way.</p> %3 <p>By using this application, you agree to the Terms of Service available at <a href=\"%4\">%4</a>. This service is provided as-is, without any warranty, and is intended for people, who work to make the world a better place.</p>").arg(_name).arg(_provider).arg(_donateTXT).arg(_tosURL)
return _txt
}
......
import QtQuick 2.5
import QtQuick.Controls 2.14
import QtQuick
import QtQuick.Controls
import "../themes/themes.js" as Theme
import "../themes"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
import "../themes/themes.js" as Theme
Item {
......
......@@ -22,8 +22,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import QtQuick 2.15
import QtQml 2.15
import QtQuick
import QtQml
Behavior {
id: root
......
import QtQuick 2.15
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Effects
import "../themes/themes.js" as Theme
ToolBar {
Material.foreground: "black"
Material.elevation: 10
background: Rectangle {
implicitHeight: 48
color: "transparent"
Rectangle {
width: parent.width
height: 1
anchors.bottom: parent.bottom
color: "transparent"
}
}
Material.background: customTheme.bgColor
Material.foreground: "black" // TODO customize too
Material.elevation: 0
visible: isFooterVisible()
Item {
Rectangle {
id: footerRow
width: root.width
width: root.width - 18
height: 48
radius: 8
color: "white"
opacity: 0.9
ToolButton {
id: gwButton
......@@ -26,7 +36,6 @@ ToolBar {
verticalCenter: parent.verticalCenter
leftMargin: 10
left: parent.left
verticalCenterOffset: 5
}
icon {
width: 20
......@@ -40,7 +49,7 @@ ToolBar {
}
Image {
id: lightning
id: lightning
smooth: true
visible: ctx != undefined & root.selectedGateway == "auto"
width: 16
......@@ -49,15 +58,16 @@ ToolBar {
anchors {
left: gwButton.right
leftMargin: -10
verticalCenterOffset: -6
}
ColorOverlay{
anchors.fill: lightning
source: lightning
color: getLocationColor()
antialiasing: true
verticalCenter: gwButton.verticalCenter
}
}
MultiEffect {
anchors.fill: lightning
source: lightning
colorizationColor: getLocationColor()
colorization: 1.0
antialiasing: true
}
Label {
id: locationLabel
......@@ -65,9 +75,7 @@ ToolBar {
color: getLocationColor()
anchors {
left: lightning.right
verticalCenter: parent.verticalCenter
verticalCenterOffset: 7
leftMargin: (ctx != undefined & root.selectedGateway == "auto") ? 0 : -12
verticalCenter: gwButton.verticalCenter
}
MouseArea {
cursorShape: Qt.PointingHandCursor
......@@ -90,7 +98,7 @@ ToolBar {
fillMode: Image.PreserveAspectFit
anchors {
verticalCenter: parent.verticalCenter
verticalCenterOffset: 5
verticalCenterOffset: -2
right: gwQuality.left
rightMargin: 10
}
......@@ -110,24 +118,25 @@ ToolBar {
anchors {
right: parent.right
verticalCenter: parent.verticalCenter
verticalCenterOffset: 0
verticalCenterOffset: -5
topMargin: 5
rightMargin: 20
}
ColorOverlay{
anchors.fill: gwQuality
source: gwQuality
color: getSignalColor()
antialiasing: false
}
}
MultiEffect {
anchors.fill: gwQuality
source: gwQuality
colorizationColor: getSignalColor()
colorization: 1.0
antialiasing: false
}
}
function getSignalColor() {
if (ctx && ctx.status == "on") {
return "green"
return "green";
} else {
return "black"
return "black";
}
}
......@@ -154,79 +163,71 @@ ToolBar {
function locationStr() {
if (ctx && ctx.status == "on") {
if (ctx.currentLocation && ctx.currentCountry) {
let s = ctx.currentLocation + ", " + ctx.currentCountry
let s = ctx.currentLocation + ", " + ctx.currentCountry;
/*
if (root.selectedGateway == "auto") {
s = "🗲 " + s
}
*/
return s
return s;
}
}
if (root.selectedGateway == "auto") {
if (ctx && ctx.locations && ctx.bestLocation) {
//return "🗲 " + getCanonicalLocation(ctx.bestLocation)
return getCanonicalLocation(ctx.bestLocation)
return getCanonicalLocation(ctx.bestLocation);
} else {
return qsTr("Recommended")
return qsTr("Recommended");
}
}
if (ctx && ctx.locations && ctx.locationLabels) {
return getCanonicalLocation(root.selectedGateway)
return getCanonicalLocation(root.selectedGateway);
}
}
// returns the composite of Location, CC
function getCanonicalLocation(label) {
try {
let loc = ctx.locationLabels[label]
return loc[0] + ", " + loc[1]
} catch(e) {
return "unknown"
let loc = ctx.locationLabels[label];
return loc[0] + ", " + loc[1];
} catch (e) {
return "unknown";
}
}
function getLocationColor() {
if (ctx && ctx.status == "on") {
return "black"
return "black";
} else {
// TODO darker gray
return "gray"
return "gray";
}
}
function hasMultipleGateways() {
let provider = getSelectedProvider(providers)
let provider = getSelectedProvider(providers);
if (provider == "riseup") {
return true
return true;
} else {
if (!ctx) {
return false
return false;
}
return ctx.locations.length > 0
return ctx.locations.length > 0;
}
}
function getSelectedProvider(providers) {
let obj = JSON.parse(providers.getJson())
return obj['default']
let obj = JSON.parse(providers.getJson());
return obj['default'];
}
function isBridgeSelected() {
if (ctx && ctx.transport == "obfs4") {
return true
} else {
return false
}
}
function isFooterVisible() {
if (drawerOn) {
return false
return true;
}
if (stackView.depth > 1) {
return false
if (ctx && ctx.transport == "kcp") {
return true;
}
return true
return false;
}
}
import QtQuick 2.15
import QtQuick.Controls 2.4
import QtQuick.Dialogs 1.2
import QtQuick.Controls.Material 2.1
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
import QtQuick.Controls.Material
import "../themes/themes.js" as Theme
......
import QtQuick 2.15
import QtQuick.Controls 2.2
import QtQuick
import QtQuick.Controls
import "../themes/themes.js" as Theme
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
Page {
StatusBox {
......
import QtQuick 2.5
import QtQuick.Layouts 1.14
import QtQuick
import QtQuick.Layouts
import "../themes/themes.js" as Theme
Image {
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
ErrorBox {
......@@ -44,6 +44,19 @@ ErrorBox {
errorText: qsTr("Could not find polkit agent.")
visible: true
}
},
State {
name: "alreadyrunning"
when: root.error == "alreadyrunning"
PropertyChanges {
target: splashProgress
visible: false
}
PropertyChanges {
target: splashErrorBox
errorText: qsTr("Application is going to quit as another instance is already running. Please use the system tray icon to open it")
visible: true
}
}
]
}
import QtQuick 2.5
import QtQuick.Controls 2.14
import QtQuick
import QtQuick.Controls
import "../themes/themes.js" as Theme
Text {
......
import QtQuick 2.15
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Effects
import "../themes/themes.js" as Theme
......@@ -80,12 +80,13 @@ ThemedPage {
topMargin: 2
//verticalCenterOffset: 3
}
ColorOverlay{
anchors.fill: lightning
source: lightning
color: "black"
antialiasing: true
}
}
MultiEffect {
anchors.fill: lightning
source: lightning
colorizationColor: "black"
colorization: 1.0
antialiasing: true
}
}
WrappedRadioButton {
......@@ -313,9 +314,11 @@ ThemedPage {
function isBridgeSelected() {
if (ctx && ctx.transport == "obfs4") {
return true
} else {
return false
}
if (ctx && ctx.transport == "kcp") {
return true
}
return false
}
function getManualAnchor() {
......
This diff is collapsed.