chore(provider/utils): do not check for empty wg keys
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
@@ -30,10 +29,6 @@ type Storage interface {
|
|||||||
servers []models.Server, err error)
|
servers []models.Server, err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
|
||||||
ErrWireguardPublicKeyMissing = errors.New("wireguard public key is missing")
|
|
||||||
)
|
|
||||||
|
|
||||||
func GetConnection(provider string,
|
func GetConnection(provider string,
|
||||||
storage Storage,
|
storage Storage,
|
||||||
selection settings.ServerSelection,
|
selection settings.ServerSelection,
|
||||||
@@ -57,11 +52,6 @@ func GetConnection(provider string,
|
|||||||
continue
|
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
|
hostname := server.Hostname
|
||||||
if selection.VPN == vpn.OpenVPN && server.OvpnX509 != "" {
|
if selection.VPN == vpn.OpenVPN && server.OvpnX509 != "" {
|
||||||
// For Windscribe where hostname and
|
// For Windscribe where hostname and
|
||||||
|
|||||||
Reference in New Issue
Block a user