Example #1
0
        private void UpdateLeakProtectionStatus(VpnState state)
        {
            switch (UpdatedLeakProtectionStatus(state))
            {
            case true:
                _firewall.EnableLeakProtection(state.RemoteIp);
                break;

            case false:
                _firewall.DisableLeakProtection();
                break;
            }
        }
Example #2
0
        private void UpdateLeakProtectionStatus(VpnState state)
        {
            switch (UpdatedLeakProtectionStatus(state))
            {
            case true:
                var dnsLeakOnly    = _serviceSettings.SplitTunnelSettings.Mode == SplitTunnelMode.Permit;
                var firewallParams = new FirewallParams(state.RemoteIp, dnsLeakOnly);
                _firewall.EnableLeakProtection(firewallParams);
                break;

            case false:
                _firewall.DisableLeakProtection();
                break;
            }
        }