summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/qml/main.qml1
-rw-r--r--pkg/backend/api.go1
-rw-r--r--pkg/vpn/bonafide/gateways.go3
3 files changed, 5 insertions, 0 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index daffda2..3d83b31 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -181,6 +181,7 @@ ApplicationWindow {
ctx = JSON.parse(jsonModel.getJson())
// TODO pass QML_DEBUG variable to be hyper-verbose
//console.debug(jsonModel.getJson())
+
gwSelector.model = Object.keys(ctx.locations)
if (ctx.donateDialog == 'true') {
diff --git a/pkg/backend/api.go b/pkg/backend/api.go
index 53800b3..96f3072 100644
--- a/pkg/backend/api.go
+++ b/pkg/backend/api.go
@@ -81,6 +81,7 @@ func UseAutomaticGateway() {
func SetTransport(label string) {
ctx.bm.SetTransport(label)
+ go trigger(OnStatusChanged)
}
func GetTransport() *C.char {
diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go
index a0d41fb..53ab320 100644
--- a/pkg/vpn/bonafide/gateways.go
+++ b/pkg/vpn/bonafide/gateways.go
@@ -97,6 +97,9 @@ func (p *gatewayPool) listLocationFullness(transport string) map[string]float64
}
if len(p.recommended) != 0 {
for _, gw := range p.recommended {
+ if gw.gateway.Transport != transport {
+ continue
+ }
if _, ok := cm[gw.gateway.Location]; ok {
continue
}