Skip to content

Commit

Permalink
fix(settings): prevent using FREE_ONLY and PORT_FORWARD_ONLY together…
Browse files Browse the repository at this point in the history
… with protonvpn (see #2470)
  • Loading branch information
qdm12 committed Sep 28, 2024
1 parent 970b21a commit c665b13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/configuration/settings/serverselection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c665b13

Please sign in to comment.