Maintenance: generate Openvpn conf for 2.4 or 2.5

This commit is contained in:
Quentin McGaw
2021-05-23 17:40:14 +00:00
parent a8c574219d
commit da65f3b016
18 changed files with 91 additions and 28 deletions

View File

@@ -0,0 +1,15 @@
package utils
import "strings"
func CipherLines(cipher, version string) (lines []string) {
switch {
case strings.HasPrefix(version, "2.4"):
return []string{"cipher " + cipher}
default: // 2.5 and above
return []string{
"data-ciphers-fallback " + cipher,
"data-ciphers " + cipher,
}
}
}