Maintenance: generate Openvpn conf for 2.4 or 2.5
This commit is contained in:
15
internal/provider/utils/cipher.go
Normal file
15
internal/provider/utils/cipher.go
Normal 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user