change(openvpn): Openvpn 2.4 no longer supported
This commit is contained in:
@@ -2,25 +2,15 @@ package utils
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/qdm12/gluetun/internal/constants/openvpn"
|
||||
)
|
||||
|
||||
func CipherLines(ciphers []string, version string) (lines []string) {
|
||||
func CipherLines(ciphers []string) (lines []string) {
|
||||
if len(ciphers) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch version {
|
||||
case openvpn.Openvpn24:
|
||||
return []string{
|
||||
"cipher " + ciphers[0],
|
||||
"ncp-ciphers " + strings.Join(ciphers, ":"),
|
||||
}
|
||||
default: // 2.5 and above
|
||||
return []string{
|
||||
"data-ciphers-fallback " + ciphers[0],
|
||||
"data-ciphers " + strings.Join(ciphers, ":"),
|
||||
}
|
||||
return []string{
|
||||
"data-ciphers-fallback " + ciphers[0],
|
||||
"data-ciphers " + strings.Join(ciphers, ":"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user