Fix: none encryption preset for PIA
- Set cipher and auth to `none` - Add `ncp-disable` OpenVPN option in every case
This commit is contained in:
@@ -2,7 +2,6 @@ package privateinternetaccess
|
|||||||
|
|
||||||
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"
|
||||||
@@ -25,8 +24,8 @@ func (p *PIA) BuildConf(connection models.OpenVPNConnection,
|
|||||||
X509CRL = constants.PiaX509CRLStrong
|
X509CRL = constants.PiaX509CRLStrong
|
||||||
certificate = constants.PIACertificateStrong
|
certificate = constants.PIACertificateStrong
|
||||||
default: // no encryption preset
|
default: // no encryption preset
|
||||||
defaultCipher = ""
|
defaultCipher = "none"
|
||||||
defaultAuth = ""
|
defaultAuth = "none"
|
||||||
X509CRL = constants.PiaX509CRLNormal
|
X509CRL = constants.PiaX509CRLNormal
|
||||||
certificate = constants.PIACertificateNormal
|
certificate = constants.PIACertificateNormal
|
||||||
}
|
}
|
||||||
@@ -50,6 +49,7 @@ func (p *PIA) BuildConf(connection models.OpenVPNConnection,
|
|||||||
"reneg-sec 0",
|
"reneg-sec 0",
|
||||||
"disable-occ",
|
"disable-occ",
|
||||||
"compress", // allow PIA server to choose the compression to use
|
"compress", // allow PIA server to choose the compression to use
|
||||||
|
"ncp-disable", // prevent from auto-upgrading cipher to aes-256-gcm
|
||||||
|
|
||||||
// Added constant values
|
// Added constant values
|
||||||
"auth-nocache",
|
"auth-nocache",
|
||||||
@@ -73,10 +73,6 @@ func (p *PIA) BuildConf(connection models.OpenVPNConnection,
|
|||||||
lines = append(lines, "auth "+settings.Auth)
|
lines = append(lines, "auth "+settings.Auth)
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasSuffix(settings.Cipher, "-gcm") {
|
|
||||||
lines = append(lines, "ncp-disable")
|
|
||||||
}
|
|
||||||
|
|
||||||
if !settings.Root {
|
if !settings.Root {
|
||||||
lines = append(lines, "user "+username)
|
lines = append(lines, "user "+username)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user