コード例 #1
0
        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();
        }
コード例 #2
0
 public async Task ReconnectAsync(VpnReconnectionSettings settings = null)
 {
     await Enqueue(() => _vpnReconnector.ReconnectAsync(
                       _vpnConnector.LastServer, _vpnConnector.LastProfile, settings));
 }