summaryrefslogtreecommitdiff
path: root/pkg/vpn/openvpn.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vpn/openvpn.go')
-rw-r--r--pkg/vpn/openvpn.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go
index 38a64a9..530f567 100644
--- a/pkg/vpn/openvpn.go
+++ b/pkg/vpn/openvpn.go
@@ -25,6 +25,7 @@ import (
"strconv"
"strings"
+ "0xacab.org/leap/bitmask-vpn/pkg/vpn/bonafide"
"0xacab.org/leap/shapeshifter"
)
@@ -244,6 +245,14 @@ func (b *Bitmask) ListGateways(provider string) ([]string, error) {
return gatewayNames, nil
}
+func (b *Bitmask) GetGatewayDetails(label string) (interface{}, error) {
+ gw, err := b.bonafide.GetGatewayDetails(label)
+ if err != nil {
+ return bonafide.Gateway{}, err
+ }
+ return gw, nil
+}
+
// UseGateway selects a gateway, by label, as the default gateway
func (b *Bitmask) UseGateway(label string) error {
b.bonafide.SetManualGateway(label)