hotfix(windscribe): OpenVPN certificate validation

This commit is contained in:
Quentin McGaw
2022-05-07 07:05:24 +00:00
parent 9dd5e7bf1d
commit e32d251cc1

View File

@@ -5,6 +5,7 @@ import (
"math/rand"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/qdm12/gluetun/internal/models"
)
@@ -44,12 +45,20 @@ func GetConnection(servers []models.Server,
// do not use IPv6 connections for now
continue
}
hostname := server.Hostname
if selection.VPN == vpn.OpenVPN && server.OvpnX509 != "" {
// For Windscribe where hostname and
// OpenVPN x509 are not the same.
hostname = server.OvpnX509
}
connection := models.Connection{
Type: selection.VPN,
IP: ip,
Port: port,
Protocol: protocol,
Hostname: server.Hostname,
Hostname: hostname,
PubKey: server.WgPubKey, // Wireguard
}
connections = append(connections, connection)