hotfix(windscribe): OpenVPN certificate validation
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/configuration/settings"
|
"github.com/qdm12/gluetun/internal/configuration/settings"
|
||||||
|
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||||
"github.com/qdm12/gluetun/internal/models"
|
"github.com/qdm12/gluetun/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -44,12 +45,20 @@ func GetConnection(servers []models.Server,
|
|||||||
// do not use IPv6 connections for now
|
// do not use IPv6 connections for now
|
||||||
continue
|
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{
|
connection := models.Connection{
|
||||||
Type: selection.VPN,
|
Type: selection.VPN,
|
||||||
IP: ip,
|
IP: ip,
|
||||||
Port: port,
|
Port: port,
|
||||||
Protocol: protocol,
|
Protocol: protocol,
|
||||||
Hostname: server.Hostname,
|
Hostname: hostname,
|
||||||
PubKey: server.WgPubKey, // Wireguard
|
PubKey: server.WgPubKey, // Wireguard
|
||||||
}
|
}
|
||||||
connections = append(connections, connection)
|
connections = append(connections, connection)
|
||||||
|
|||||||
Reference in New Issue
Block a user