Fix: Openvpn custom config: remove user set
This commit is contained in:
@@ -28,7 +28,8 @@ func Test_OpenVPN_JSON(t *testing.T) {
|
||||
"custom_config": "",
|
||||
"version": "",
|
||||
"encryption_preset": "",
|
||||
"ipv6": false
|
||||
"ipv6": false,
|
||||
"procuser": ""
|
||||
}`, string(data))
|
||||
var out OpenVPN
|
||||
err = json.Unmarshal(data, &out)
|
||||
|
||||
@@ -64,6 +64,7 @@ func modifyCustomConfig(lines []string,
|
||||
strings.HasPrefix(line, "down "),
|
||||
strings.HasPrefix(line, "verb "),
|
||||
strings.HasPrefix(line, "auth-user-pass "),
|
||||
strings.HasPrefix(line, "user "),
|
||||
len(settings.Cipher) > 0 && strings.HasPrefix(line, "cipher "),
|
||||
len(settings.Cipher) > 0 && strings.HasPrefix(line, "data-ciphers"),
|
||||
len(settings.Auth) > 0 && strings.HasPrefix(line, "auth "),
|
||||
|
||||
Reference in New Issue
Block a user