From b14d048e6089233f5c698426652e85bfa1d89488 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 23 Mar 2021 17:10:45 +0100 Subject: Don't expose the full gateway out of the vpn module We just care about locations and fullness. --- pkg/vpn/openvpn.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'pkg/vpn/openvpn.go') diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go index 298ea75..1447458 100644 --- a/pkg/vpn/openvpn.go +++ b/pkg/vpn/openvpn.go @@ -25,7 +25,6 @@ import ( "strconv" "strings" - "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide" "0xacab.org/leap/shapeshifter" ) @@ -231,17 +230,8 @@ func (b *Bitmask) VPNCheck() (helpers bool, privilege bool, err error) { return b.launch.check() } -func (b *Bitmask) ListGatewaysByCity(transport string) (map[string]bonafide.Gateway, error) { - gwForCities, err := b.bonafide.PickGatewayForCities(transport) - return gwForCities, err -} - -func (b *Bitmask) GetGatewayDetails(host string) (interface{}, error) { - gw, err := b.bonafide.GetGatewayDetails(host) - if err != nil { - return bonafide.Gateway{}, err - } - return gw, nil +func (b *Bitmask) ListLocationFullness(transport string) map[string]float64 { + return b.bonafide.ListLocationFullness(transport) } // UseGateway selects a gateway, by label, as the default gateway -- cgit v1.2.3