Fix: Use name prefix for TLS check for IVPN

This commit is contained in:
Quentin McGaw (desktop)
2021-06-19 16:34:50 +00:00
parent 535a136a27
commit 208374fc54

View File

@@ -2,6 +2,7 @@ package ivpn
import (
"strconv"
"strings"
"github.com/qdm12/gluetun/internal/configuration"
"github.com/qdm12/gluetun/internal/constants"
@@ -15,6 +16,8 @@ func (i *Ivpn) BuildConf(connection models.OpenVPNConnection,
settings.Cipher = constants.AES256cbc
}
namePrefix := strings.Split(connection.Hostname, ".")[0]
lines = []string{
"client",
"dev tun",
@@ -43,7 +46,7 @@ func (i *Ivpn) BuildConf(connection models.OpenVPNConnection,
"auth-user-pass " + constants.OpenVPNAuthConf,
"proto " + connection.Protocol,
connection.RemoteLine(),
"verify-x509-name " + connection.Hostname, // + " name-prefix"
"verify-x509-name " + namePrefix + " name-prefix",
}
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)