Skip to content

Commit

Permalink
hotfix(windscribe): OpenVPN certificate validation
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed May 7, 2022
1 parent 9dd5e7b commit e32d251
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion internal/provider/utils/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e32d251

Please sign in to comment.