Fix: only use Openvpn fast-io when using UDP

This commit is contained in:
Quentin McGaw
2021-05-18 23:46:20 +00:00
parent 13e75aaf20
commit a9589d8d5b
5 changed files with 16 additions and 5 deletions

View File

@@ -38,7 +38,6 @@ func (n *Nordvpn) BuildConf(connection models.OpenVPNConnection,
"mssfix " + strconv.Itoa(int(settings.MSSFix)),
"reneg-sec 0",
"comp-lzo no",
"fast-io",
"key-direction 1",
"ping 15",
"ping-restart 0",
@@ -60,6 +59,10 @@ func (n *Nordvpn) BuildConf(connection models.OpenVPNConnection,
"auth " + settings.Auth,
}
if connection.Protocol == constants.UDP {
lines = append(lines, "fast-io")
}
if !settings.Root {
lines = append(lines, "user "+username)
}