private async Task DowngradeUserAsync(VpnPlanChangedEventArgs e, User user) { if (user.MaxTier < ServerTiers.Plus) { _appSettings.SecureCore = false; _appSettings.PortForwardingEnabled = false; } if (user.MaxTier < ServerTiers.Basic) { _appSettings.NetShieldEnabled = false; } await _vpnReconnector.ReconnectAsync(); }
public async Task ReconnectAsync(VpnReconnectionSettings settings = null) { await Enqueue(() => _vpnReconnector.ReconnectAsync( _vpnConnector.LastServer, _vpnConnector.LastProfile, settings)); }