chore: OpenVPN user and password as nullable
- Username and password can be the empty string for custom provider
This commit is contained in:
@@ -27,8 +27,8 @@ func setupOpenVPN(ctx context.Context, fw Firewall,
|
||||
return nil, "", fmt.Errorf("failed writing configuration to file: %w", err)
|
||||
}
|
||||
|
||||
if settings.OpenVPN.User != "" {
|
||||
err := openvpnConf.WriteAuthFile(settings.OpenVPN.User, settings.OpenVPN.Password)
|
||||
if *settings.OpenVPN.User != "" {
|
||||
err := openvpnConf.WriteAuthFile(*settings.OpenVPN.User, *settings.OpenVPN.Password)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("failed writing auth to file: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user