2021-05-23 17:40:14 +00:00
|
|
|
package utils
|
|
|
|
|
|
2021-05-31 18:54:36 +00:00
|
|
|
import (
|
|
|
|
|
"github.com/qdm12/gluetun/internal/constants"
|
|
|
|
|
)
|
2021-05-23 17:40:14 +00:00
|
|
|
|
|
|
|
|
func CipherLines(cipher, version string) (lines []string) {
|
2021-05-31 18:54:36 +00:00
|
|
|
switch version {
|
|
|
|
|
case constants.Openvpn24:
|
2021-05-23 17:40:14 +00:00
|
|
|
return []string{"cipher " + cipher}
|
|
|
|
|
default: // 2.5 and above
|
|
|
|
|
return []string{
|
|
|
|
|
"data-ciphers-fallback " + cipher,
|
|
|
|
|
"data-ciphers " + cipher,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|