Beispiel #1
0
        public void OnVpnConnecting_SplitTunnelBlockMode_BlockInternet(SplitTunnelMode mode)
        {
            // Arrange
            var killSwitch = GetKillSwitch(mode);

            // Act
            killSwitch.OnVpnConnecting(GetConnectingVpnState());

            // Assert
            _firewall.Received(1).EnableLeakProtection(RemoteIp);
        }
Beispiel #2
0
        public void OnVpnConnected_WhenSplitTunnelPermitMode_DoNotBlockInternet()
        {
            // Arrange
            var killSwitch = GetKillSwitch(SplitTunnelMode.Permit);

            // Act
            killSwitch.OnVpnConnected(GetConnectedVpnState());

            // Assert
            _firewall.Received(0).EnableLeakProtection(new FirewallParams("127.0.0.1", false));
        }
Beispiel #3
0
        public void OnVpnConnected_WhenSplitTunnelPermitMode_DoNotBlockInternet()
        {
            // Arrange
            Service.KillSwitch.KillSwitch killSwitch = GetKillSwitch(SplitTunnelMode.Permit);

            // Act
            killSwitch.OnVpnConnected(GetConnectedVpnState());

            // Assert
            _firewall.Received(0)
            .EnableLeakProtection(new FirewallParams("127.0.0.1", dnsLeakOnly: false, interfaceIndex: 0, persistent: false));
        }