From c665b13cecda9f8fcfaeac3b8ef9a2309b82c539 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 28 Sep 2024 17:51:47 +0000 Subject: [PATCH] fix(settings): prevent using FREE_ONLY and PORT_FORWARD_ONLY together with protonvpn (see #2470) --- internal/configuration/settings/serverselection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/configuration/settings/serverselection.go b/internal/configuration/settings/serverselection.go index 4ae3b07e..a257da15 100644 --- a/internal/configuration/settings/serverselection.go +++ b/internal/configuration/settings/serverselection.go @@ -273,6 +273,8 @@ func validateFeatureFilters(settings ServerSelection, vpnServiceProvider string) switch { case *settings.OwnedOnly && vpnServiceProvider != providers.Mullvad: return fmt.Errorf("%w", ErrOwnedOnlyNotSupported) + case vpnServiceProvider == providers.Protonvpn && *settings.FreeOnly && *settings.PortForwardOnly: + return fmt.Errorf("%w: together with free only filter", ErrPortForwardOnlyNotSupported) case *settings.StreamOnly && !helpers.IsOneOf(vpnServiceProvider, providers.Protonvpn, providers.VPNUnlimited): return fmt.Errorf("%w", ErrStreamOnlyNotSupported)