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

@@ -30,7 +30,6 @@ func (m *Mullvad) BuildConf(connection models.OpenVPNConnection,
"sndbuf 524288",
"rcvbuf 524288",
"tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
"fast-io",
"script-security 2",
// Added constant values
@@ -53,6 +52,10 @@ func (m *Mullvad) BuildConf(connection models.OpenVPNConnection,
lines = append(lines, "auth "+settings.Auth)
}
if connection.Protocol == constants.UDP {
lines = append(lines, "fast-io")
}
if settings.Provider.ExtraConfigOptions.OpenVPNIPv6 {
lines = append(lines, "tun-ipv6")
} else {