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