public async Task Connect() { var request = new VpnConnectionRequest( Servers(), VpnProtocol.Auto, VpnConfig(), new VpnCredentials(_config.GuestHoleVpnUsername, _config.GuestHoleVpnPassword)); await _vpnServiceManager.Connect(request); }
public async Task Connect_PicksFastestServer() { // Arrange List <Server> expectedServers = new List <Server> { _torServer, _standardServer, _p2pServer }; _vpnServiceManager.Connect(Arg.Any <VpnConnectionRequest>()) .Returns((arg) => AssertConnectionAsync(arg, expectedServers)); _appSettings.FeaturePortForwardingEnabled = true; _appSettings.PortForwardingEnabled = false; // Act await _profileConnector.Connect(_candidates, _profile); }
private async Task Connect(IEnumerable <Server> servers, VpnProtocol protocol) { var request = new VpnConnectionRequest( Servers(servers), protocol, VpnConfig(), _vpnCredentialProvider.Credentials()); await _vpnServiceManager.Connect(request); _logger.Info("Connect requested"); _modals.CloseAll(); }
public async Task Connect(VpnConnectionRequest connectionRequest) { await InvokeAction(() => _decorated.Connect(connectionRequest)); }