summaryrefslogtreecommitdiff
path: root/pkg/vpn
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-06-01 11:44:11 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-06-01 12:34:10 +0200
commitc2a582fa4915b1a820bcc5e5bc589cd9ac2e2d19 (patch)
tree170ff0fc8adc845ee219d84e0bf4fbe5b4f83a5f /pkg/vpn
parent330d11725884d301215e170a5c41e50f691109d7 (diff)
[feat] restrict locations to selected transport
Diffstat (limited to 'pkg/vpn')
-rw-r--r--pkg/vpn/bonafide/gateways.go3
1 files changed, 3 insertions, 0 deletions
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
}