Fix: cyberghost: explicit-exit-notify only for UDP

This commit is contained in:
Quentin McGaw (desktop)
2021-07-31 14:02:02 +00:00
parent 130bebf2c6
commit c17b351efb

View File

@@ -35,7 +35,6 @@ func (c *Cyberghost) BuildConf(connection models.OpenVPNConnection,
// Cyberghost specific
// "redirect-gateway def1",
"ncp-disable",
"explicit-exit-notify 2",
"script-security 2",
"route-delay 5",
@@ -56,6 +55,10 @@ func (c *Cyberghost) BuildConf(connection models.OpenVPNConnection,
lines = append(lines, utils.CipherLines(settings.Cipher, settings.Version)...)
if connection.Protocol == constants.UDP {
lines = append(lines, "explicit-exit-notify")
}
if strings.HasSuffix(settings.Cipher, "-gcm") {
lines = append(lines, "ncp-ciphers AES-256-GCM:AES-256-CBC:AES-128-GCM")
}