From 71c51a7455f66f379e173af53d02174831ea30e4 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Mon, 5 Sep 2022 15:50:02 +0000 Subject: [PATCH] chore(provider/utils): do not check for empty wg keys --- internal/provider/utils/connection.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/internal/provider/utils/connection.go b/internal/provider/utils/connection.go index b3420045..24887a61 100644 --- a/internal/provider/utils/connection.go +++ b/internal/provider/utils/connection.go @@ -1,7 +1,6 @@ package utils import ( - "errors" "fmt" "math/rand" @@ -30,10 +29,6 @@ type Storage interface { servers []models.Server, err error) } -var ( - ErrWireguardPublicKeyMissing = errors.New("wireguard public key is missing") -) - func GetConnection(provider string, storage Storage, selection settings.ServerSelection, @@ -57,11 +52,6 @@ func GetConnection(provider string, continue } - if selection.VPN == vpn.Wireguard && server.WgPubKey == "" { - return connection, fmt.Errorf("%w: for server hostname %s and ip %s", - ErrWireguardPublicKeyMissing, server.Hostname, ip) - } - hostname := server.Hostname if selection.VPN == vpn.OpenVPN && server.OvpnX509 != "" { // For Windscribe where hostname and